Skip to content

Commit

Permalink
Gestione quantità Extra Items - rimane da introdurre il campo maxQuan…
Browse files Browse the repository at this point in the history
…tity nel modello.

git-svn-id: svn://93.63.174.84:8080/repos/locanda/trunk@852 5a08f537-7b09-473d-a1d1-551e4afdb7c2
  • Loading branch information
guido committed Jun 9, 2011
1 parent c131124 commit e27b2b4
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.common.project.facet.core.builder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.jsdt.core.javascriptValidator"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.validation.validationbuilder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
2 changes: 1 addition & 1 deletion webroot/WEB-INF/jdbc.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdbc.url=jdbc:mysql://localhost/locanda
jdbc.username=root
jdbc.password=root
jdbc.password=gu1d0
jdbc.driverClassName=com.mysql.jdbc.Driver
2 changes: 1 addition & 1 deletion webroot/js/controllers/booking.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ $(function () {
dataType: "html",
data: formInput,
success: function (data_action) {
$("div.select_container").html(data_action);
$(".type-select.extraCheckList").html(data_action);
$('.quantity').change(function () {
self.calculatePrice(this);
});
Expand Down
20 changes: 6 additions & 14 deletions webroot/jsp/contents/booking_form.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ display: none;
</div>
</div>
</s:iterator>

<!-- ADD ONE GUEST TEXT FIELDS AS DEFAULT
<s:if test="booking.guests.size() == 0">
<div class="subcolumns guest_row">
Expand All @@ -428,21 +429,12 @@ display: none;
</div>
</div>
<!-- END SECOND ACCORDION -->
<div class="type-text"><hr/></div>

<div class="type-select"><label for="">Extras:</label>
<s:iterator value="extras" var="eachExtra" >

<div class="type-check extraCheckList">
<s:checkbox id="%{#eachExtra.id}_extraCheckBox" name="bookingExtraIds" value="bookingExtraIds.contains(#eachExtra.id)" fieldValue="%{#eachExtra.id}" label="%{#eachExtra.name}" />
</div>

</s:iterator>
</div>
<div class="select_container">
<jsp:include page="extraQuantity_select.jsp" />

<div class="type-text"><hr/></div>
<div class="type-select extraCheckList"><label for="">Extras:</label>
<jsp:include page="extraQuantity_select.jsp" />
</div>

<div class="type-select">
<label for="convention"><s:text name="convention" />: </label>
<select name="booking.convention.id" id="convention" class="required">
Expand Down
15 changes: 9 additions & 6 deletions webroot/jsp/contents/extraQuantity_select.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<s:iterator value="extras" var="eachExtra" >
<s:iterator value="booking.extraItems" var="eachExtraItem" status="itemStatus">
<s:iterator value="extras" var="eachExtra" >

<div class="type-check ">
<s:checkbox id="%{#eachExtra.id}_extraCheckBox" name="bookingExtraIds" value="bookingExtraIds.contains(#eachExtra.id)" fieldValue="%{#eachExtra.id}" label="%{#eachExtra.name}" />
</div>

<s:iterator value="booking.extraItems" var="eachExtraItem" status="itemStatus">

<!--<s:if test="#eachExtraItem.extra == #eachExtra">-->
<div id="<s:property value="#eachExtra.id"/>_extraQuantity" class="type-select ">
<input type="hidden" class="idExtraItem" name="booking.extraItems[<s:property value="#itemStatus.index"/>].id" value="<s:property value="#eachExtraItem.id"/>"/>
<input type="hidden" class="idExtra" name="booking.extraItems[<s:property value="#itemStatus.index"/>].extra.id" value="<s:property value="#eachExtraItem.extra.id"/>"/>
Expand All @@ -30,8 +33,8 @@
<div class="subcl type-text"><span>&euro;: </span><s:property value="#eachExtraItem.unitaryPrice" /></div>
</div>
</div>
<!--</s:if>-->
</s:iterator>

</s:iterator>
</s:iterator>


Expand Down

0 comments on commit e27b2b4

Please sign in to comment.