Author: sichen
Date: Thu Aug 24 17:48:58 2006 New Revision: 434582 URL: http://svn.apache.org/viewvc?rev=434582&view=rev Log: Added mark as accepted action to list of shipping labels. This will update all selected shipment route segments to ACCEPTED status. Added: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=434582&r1=434581&r2=434582&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties Thu Aug 24 17:48:58 2006 @@ -701,6 +701,7 @@ ProductMakeTop=MakeTop ProductMaintenance=Maintenance ProductManufacturing=Manufacturing +ProductMarkAsAccepted=Mark as Accepted ProductMaximum=Maximum ProductMaximumPrice=Maximum Price ProductMaxSizeMessage=Displays only if largest product size is equal/less than this value Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=434582&r1=434581&r2=434582&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Thu Aug 24 17:48:58 2006 @@ -633,6 +633,12 @@ <response name="error" type="view" value="ScheduleShipmentRouteSegment"/> <response name="success" type="request" value="ScheduleShipmentsWithCarriers"/> </request-map> + <request-map uri="BatchUpdateShipmentRouteSegments"> + <security https="true" auth="true"/> + <event type="service-multi" path="" invoke="updateShipmentRouteSegment"/> + <response name="success" type="view" value="Labels"/> + <response name="error" type="view" value="Labels"/> + </request-map> <request-map uri="ScheduleShipmentsWithCarriers"> <security https="true" auth="true" direct-request="false"/> <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/> Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=434582&r1=434581&r2=434582&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original) +++ incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Thu Aug 24 17:48:58 2006 @@ -125,7 +125,8 @@ </field> </form> - <!-- multi-form to print confirmed shipping labels --> + <!-- multi-form to print confirmed shipping labels and to mark shipment route segments as accepted + (to see how this dual-action multi form works, see batchPrintMarkAsAccepted.ftl) --> <form name="Labels" type="multi" list-name="shipmentPackageRouteSegments" title="" target="BatchPrintShippingLabels" default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext" separate-columns="true"> <field name="shipmentId" title="${uiLabelMap.ProductShipmentId}"> @@ -145,6 +146,8 @@ <field name="label" title="${uiLabelMap.ProductLabel}"> <hyperlink target="viewShipmentPackageRouteSegLabelImage?shipmentId=${shipmentId}&shipmentRouteSegmentId=${shipmentRouteSegmentId}&shipmentPackageSeqId=${shipmentPackageSeqId}" description="${uiLabelMap.ProductLabel}"/> </field> + <!-- this is for multi-submitting the mark as accepted action (see batchPrintMarkAsAccepted.ftl) --> + <field name="carrierServiceStatusId"><hidden value="SHRSCS_ACCEPTED"/></field> <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field> <field name="submitButton" title="${uiLabelMap.CommonPrint}" widget-style="smallSubmit"> <submit/> Added: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl?rev=434582&view=auto ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl (added) +++ incubator/ofbiz/trunk/applications/product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl Thu Aug 24 17:48:58 2006 @@ -0,0 +1,28 @@ +<#-- + The form widget of type multi can have only one submit button, and hence only one operation on the selected labels. + To support more than one action, we can create another submit button outside the form and use a javascript + function to change the target of the multi form and submit it. + + In this case, the multi form has two actions: Print as labels, which generates a PDF of selected labels, and + mark as accepted, which updates the selected shipment route segments. The label printing button is handled + normally in the form widget. The mark action is handled here using the technique described above. If more + actions are required, we can create more submit buttons in this file with their own action-changing submit functions. + + Note that the facilityId in the form action is a trick to pass the facilityId on to the next request. + Also note that for layout purposes, the submit button in the form widget can be converted and moved here so that all + the buttons can be arranged as desired. + + @author Leon Torres ([hidden email]) +--> + + +<script> +<!-- + function markAsAccepted() { + document.Labels.action = "<@ofbizUrl>BatchUpdateShipmentRouteSegments?facilityId=${parameters.facilityId}</@ofbizUrl>"; + document.Labels.submit(); + } +//--> +</script> + +<input type="submit" class="smallSubmit" value="${uiLabelMap.ProductMarkAsAccepted}" onClick="javascript:markAsAccepted()"/> Modified: incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=434582&r1=434581&r2=434582&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Thu Aug 24 17:48:58 2006 @@ -764,6 +764,9 @@ <decorator-section name="schedule-body"> <container> <include-form name="Labels" location="component://product/webapp/facility/facility/FacilityForms.xml"/> + <platform-specific> + <html><html-template location="component://product/webapp/facility/facility/batchPrintMarkAsAccepted.ftl"/></html> + </platform-specific> </container> </decorator-section> </decorator-screen> |
Free forum by Nabble | Edit this page |