Author: jacopoc
Date: Wed Apr 11 07:02:16 2007 New Revision: 527497 URL: http://svn.apache.org/viewvc?view=rev&rev=527497 Log: Completed refactoring of store's shipment method screen. Added: ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh (with props) Removed: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreShipSetup.bsh Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreShipSetup.ftl ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?view=diff&rev=527497&r1=527496&r2=527497 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Wed Apr 11 07:02:16 2007 @@ -1876,6 +1876,12 @@ <response name="success" type="view" value="EditProductStoreShipmentCostEstimates"/> <response name="error" type="view" value="EditProductStoreShipmentCostEstimates"/> </request-map> + <request-map uri="prepareCreateShipMeth"> + <security https="true" auth="true"/> + <event type="bsf" path="/store/" invoke="prepareCreateShipMeth.bsh"/> + <response name="success" type="view" value="EditProductStoreShipSetup"/> + <response name="error" type="view" value="EditProductStoreShipSetup"/> + </request-map> <request-map uri="storeCreateShipMeth"> <security https="true" auth="true"/> <event type="service" invoke="createProductStoreShipMeth"/> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreShipSetup.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreShipSetup.ftl?view=diff&rev=527497&r1=527496&r2=527497 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreShipSetup.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreShipSetup.ftl Wed Apr 11 07:02:16 2007 @@ -16,292 +16,28 @@ specific language governing permissions and limitations under the License. --> -<script language="JavaScript" type="text/javascript"> -<!-- -function setAssocFields(select) { - var index = select.selectedIndex; - var opt = select.options[index]; - var optStr = opt.value; - var optLen = optStr.length; - var shipmentMethodTypeId = ""; - var sequenceNumber = ""; - var roleTypeId = ""; - var partyId = ""; - var delIdx = 1; - - for (i=0; i<optLen; i++) { - if (optStr.charAt(i) == '|') { - delIdx++; - } else { - if (delIdx == 1) { - partyId = partyId + optStr.charAt(i); - } else if (delIdx == 2) { - roleTypeId = roleTypeId + optStr.charAt(i); - } else if (delIdx == 3) { - shipmentMethodTypeId = shipmentMethodTypeId + optStr.charAt(i); - } else if (delIdx == 4) { - sequenceNumber = sequenceNumber + optStr.charAt(i); - } - } - } - - document.addscarr.roleTypeId.value = roleTypeId; - document.addscarr.partyId.value = partyId; - document.addscarr.shipmentMethodTypeId.value = shipmentMethodTypeId; - document.addscarr.sequenceNumber.value = sequenceNumber; -} -// --> -</script> - -<#-- Shipping Setup From Catalog->Store->Shipping--> - -<#-- New Shippment Methods--> - <div class="head2">${uiLabelMap.ProductStoreShipmentMethodAssociations}</div> - <table border="1" cellpadding="2" cellspacing="0"> - <tr> - <td><span class="tableheadtext">${uiLabelMap.ProductShipmentMethodType}</span></td> - <td><span class="tableheadtext">${uiLabelMap.PartyParty}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMinSz}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMaxSz}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMinWt}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMaxWt}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMinTot}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductMaxTot}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductAllowUSPS}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductRequireUSPS}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductAllowCo}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductRequireCo}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductIncFreeship}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductIncGeo}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductExcGeo}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductIncFeature}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductExcFeature}</span></td> - <td><span class="tableheadtext">${uiLabelMap.ProductSequence}</span></td> - <td> </td> - </tr> - <#if storeShipMethods?has_content> - <#assign idx = 0> - <#list storeShipMethods as meth> - <#assign idx = idx + 1> - <form name="methUpdate${idx}" method="post" action="<@ofbizUrl>storeUpdateShipMeth</@ofbizUrl>"> - <input type="hidden" name="productStoreShipMethId" value="${meth.productStoreShipMethId}"> - <input type="hidden" name="shipmentMethodTypeId" value="${meth.shipmentMethodTypeId}"> - <input type="hidden" name="partyId" value="${meth.partyId}"> - <input type="hidden" name="roleTypeId" value="${meth.roleTypeId}"> - <input type="hidden" name="productStoreId" value="${meth.productStoreId}"> - <input type="hidden" name="viewProductStoreId" value="${productStoreId}"> - <input type="hidden" name="newShipMethod" value="Y"> - <tr> - <td><span class="tabletext">${meth.description}</span></td> - <td><span class="tabletext">${meth.partyId}</span></td> - <td><span class="tabletext">${meth.minSize?if_exists}</span></td> - <td><span class="tabletext">${meth.maxSize?if_exists}</span></td> - <td><span class="tabletext">${meth.minWeight?if_exists}</span></td> - <td><span class="tabletext">${meth.maxWeight?if_exists}</span></td> - <td><span class="tabletext">${meth.minTotal?default(0)?string("##0.00")}</span></td> - <td><span class="tabletext">${meth.maxTotal?default(0)?string("##0.00")}</span></td> - <td><span class="tabletext">${meth.allowUspsAddr?default("N")}</span></td> - <td><span class="tabletext">${meth.requireUspsAddr?default("N")}</span></td> - <td><span class="tabletext">${meth.allowCompanyAddr?default("N")}</span></td> - <td><span class="tabletext">${meth.requireCompanyAddr?default("N")}</span></td> - <td><span class="tabletext">${meth.includeNoChargeItems?default("Y")}</span></td> - <td><span class="tabletext">${meth.includeGeoId?if_exists}</span></td> - <td><span class="tabletext">${meth.excludeGeoId?if_exists}</span></td> - <td><span class="tabletext">${meth.includeFeatureGroup?if_exists}</span></td> - <td><span class="tabletext">${meth.excludeFeatureGroup?if_exists}</span></td> - <td><input type="text" size="5" class="inputBox" name="sequenceNumber" value="${meth.sequenceNumber?if_exists}"></td> - <td width='1' align="right"> - <span style="white-space: nowrap;"> - <a href="javascript:document.methUpdate${idx}.submit();" class="buttontext">[${uiLabelMap.CommonUpdate}]</a> - <a href="<@ofbizUrl>storeRemoveShipMeth?viewProductStoreId=${productStoreId}&productStoreId=${meth.productStoreId}&newShipMethod=Y&productStoreShipMethId=${meth.productStoreShipMethId}</@ofbizUrl>" class="buttontext">[${uiLabelMap.CommonRemove}]</a> - </span> - </td> - </tr> - </form> - </#list> - </#if> - </table> - <br/> - <table cellspacing="2" cellpadding="2"> - <form name="addscarr" method="post" action="<@ofbizUrl>storeCreateShipMeth</@ofbizUrl>"> - <input type="hidden" name="viewProductStoreId" value="${productStoreId}"> - <input type="hidden" name="newShipMethod" value="Y"> - <input type="hidden" name="productStoreId" value="${productStoreId}"> - <input type="hidden" name="shipmentMethodTypeId"> - <input type="hidden" name="roleTypeId"> - <input type="hidden" name="partyId"> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductCarrierShipmentMethod}</span></td> - <td> - <select class="selectBox" name="carrierShipmentString" onchange="javascript:setAssocFields(this);"> - <option>${uiLabelMap.ProductSelectOne}</option> - <#list shipmentMethods as shipmentMethod> - <option value="${shipmentMethod.partyId}|${shipmentMethod.roleTypeId}|${shipmentMethod.shipmentMethodTypeId}|${shipmentMethod.sequenceNumber?default(1)}">${shipmentMethod.description} (${shipmentMethod.partyId}/${shipmentMethod.roleTypeId})</option> - </#list> - </select> * - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMinSize}</span></td> - <td> - <input type="text" class="inputBox" name="minSize" size="5"> - <span class="tabletext">${uiLabelMap.ProductMinSizeMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMaxSize}</span></td> - <td> - <input type="text" class="inputBox" name="maxSize" size="5"> - <span class="tabletext">${uiLabelMap.ProductMaxSizeMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMinWeight}</span></td> - <td> - <input type="text" class="inputBox" name="minWeight" size="5"> - <span class="tabletext">${uiLabelMap.ProductMinWeightMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMaxWeight}</span></td> - <td> - <input type="text" class="inputBox" name="maxWeight" size="5"> - <span class="tabletext">${uiLabelMap.ProductMaxWeightMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMinTotal}</span></td> - <td> - <input type="text" class="inputBox" name="minTotal" size="5"> - <span class="tabletext">${uiLabelMap.ProductMinTotalMesssage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductMaxTotal}</span></td> - <td> - <input type="text" class="inputBox" name="maxTotal" size="5"> - <span class="tabletext">${uiLabelMap.ProductMaxTotalMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductAllowUSPSAddr}</span></td> - <td> - <select name="allowUspsAddr" class="selectBox"> - <option value="N">${uiLabelMap.CommonN}</option> - <option value="Y">${uiLabelMap.CommonY}</option> - </select> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductRequireUSPSAddr}</span></td> - <td> - <select name="requireUspsAddr" class="selectBox"> - <option value="N">${uiLabelMap.CommonN}</option> - <option value="Y">${uiLabelMap.CommonY}</option> - </select> - <span class="tabletext">${uiLabelMap.ProductRequireMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductAllowCoAddr}</span></td> - <td> - <select name="allowCompanyAddr" class="selectBox"> - <option value="N">${uiLabelMap.CommonN}</option> - <option value="Y">${uiLabelMap.CommonY}</option> - </select> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductRequireCoAddr}</span></td> - <td> - <select name="requireCompanyAddr" class="selectBox"> - <option value="N">${uiLabelMap.CommonN}</option> - <option value="Y">${uiLabelMap.CommonY}</option> - </select> - <span class="tabletext">${uiLabelMap.ProductRequireMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.PartyCompanyId}</span></td> - <td> - <input type="text" class="inputBox" name="companyPartyId" size="20"> - <span class="tabletext">${uiLabelMap.ProductAllowMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductIncludeFreeship}</span></td> - <td> - <select name="includeNoChargeItems" class="selectBox"> - <option value="N">${uiLabelMap.CommonN}</option> - <option value="Y">${uiLabelMap.CommonY}</option> - </select> - <span class="tabletext">${uiLabelMap.ProductIncludeFreeshipMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductIncludeGeo}</span></td> - <td> - <select name="includeGeoId" class="selectBox"> - <option></option> - <#list geoList as geo> - <option value="${geo.geoId}">${geo.geoName}</option> - </#list> - </select> - <span class="tabletext">${uiLabelMap.ProductIncludeGeoMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductExcludeGeo}</span></td> - <td> - <select name="excludeGeoId" class="selectBox"> - <option></option> - <#list geoList as geo> - <option value="${geo.geoId}">${geo.geoName}</option> - </#list> - </select> - <span class="tabletext">${uiLabelMap.ProductExcludeGeoMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductIncludeFeature}</span></td> - <td> - <input type="text" class="inputBox" name="includeFeatureGroup" size="20"> - <span class="tabletext">${uiLabelMap.ProductIncludeFeatureMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductExcludeFeature}</span></td> - <td> - <input type="text" class="inputBox" name="excludeFeatureGroup" size="20"> - <span class="tabletext">${uiLabelMap.ProductExcludeFeatureMessage}</span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductServiceName}</span></td> - <td> - <input type="text" class="inputBox" name="serviceName" size="25"> - <span class="tabletext"></span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductServiceConfig}</span></td> - <td> - <input type="text" class="inputBox" name="configProps" size="25"> - <span class="tabletext"></span> - </td> - </tr> - <tr> - <td align="right"><span class="tableheadtext">${uiLabelMap.ProductSequence}#</span></td> - <td> - <input type="text" class="inputBox" name="sequenceNumber" size="5"> - <span class="tabletext">${uiLabelMap.ProductUsedForDisplayOrdering}</span> - </td> - </tr> - <tr> - <td> - <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonAdd}"> - </td> - </tr> - </form> - </table> +<form name="addscarr" method="post" action="<@ofbizUrl>prepareCreateShipMeth</@ofbizUrl>"> +<input type="hidden" name="viewProductStoreId" value="${productStoreId}"/> +<input type="hidden" name="newShipMethod" value="Y"/> +<input type="hidden" name="productStoreId" value="${productStoreId}"/> +<table cellspacing="2" cellpadding="2"> + <tr> + <td align="right"><b>${uiLabelMap.ProductCarrierShipmentMethod}</b></td> + <td> + <select name="carrierShipmentString"> + <option>${uiLabelMap.ProductSelectOne}</option> + <#list storeShipMethods as shipmentMethod> + <option value="${shipmentMethod.partyId}|${shipmentMethod.roleTypeId}|${shipmentMethod.shipmentMethodTypeId}">${shipmentMethod.description} (${shipmentMethod.partyId}/${shipmentMethod.roleTypeId})</option> + </#list> + </select> + </td> + </tr> + <tr> + <td></td> + <td> + <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonAdd}"/> + </td> + </tr> +</table> +</form> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?view=diff&rev=527497&r1=527496&r2=527497 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Wed Apr 11 07:02:16 2007 @@ -55,13 +55,13 @@ <hyperlink target="/facility/control/EditFacility?facilityId=${productStore.inventoryFacilityId}" target-type="inter-app" description="${uiLabelMap.CommonEdit} ${uiLabelMap.ProductFacility} ${productStore.inventoryFacilityId}" also-hidden="false"/> </field> - + <field name="manualAuthIsCapture" widget-style="selectBox"> <drop-down allow-empty="false" no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> </field> - <field name="prorateShipping" widget-style="selectBox"> + <field name="prorateShipping" widget-style="selectBox"> <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> - </field> + </field> <field name="prorateTaxes" widget-style="selectBox"> <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> </field> @@ -122,10 +122,10 @@ </field> --> - <field name="allowPassword" widget-style="selectBox"> + <field name="allowPassword" widget-style="selectBox"> <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> </field> - <field name="retryFailedAuths" widget-style="selectBox"> + <field name="retryFailedAuths" widget-style="selectBox"> <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> </field> <field name="headerApprovedStatus"> @@ -351,6 +351,88 @@ description="${uiLabelMap.CommonDelete}" also-hidden="false" target-type="inter-app"/> </field> </form> + <form name="ListProductStoreShipmentMeths" target="" title="" type="list" list-name="storeShipMethods" + paginate-target="EditProductStoreShipSetup"> + <auto-fields-entity entity-name="ProductStoreShipmentMeth" default-field-type="display"/> + <field name="productStoreId"><hidden/></field> + <field name="productStoreShipMethId" title="" widget-style="buttontext"> + <hyperlink target="EditProductStoreShipSetup?productStoreId=${productStoreId}&productStoreShipMethId=${productStoreShipMethId}" description="${productStoreShipMethId}" also-hidden="false"/> + </field> + <field name="shipmentMethodTypeId" title="${uiLabelMap.ProductMethod}"> + <display-entity entity-name="ShipmentMethodType" description="${description}" cache="true" also-hidden="true"/> + </field> + <field name="roleTypeId"><hidden/></field> + <field name="includeGeoId"> + <display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"/> + </field> + <field name="excludeGeoId"> + <display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"/> + </field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="storeRemoveShipMeth?productStoreId=${productStoreId}&productStoreShipMethId=${productStoreShipMethId}" description="${uiLabelMap.CommonRemove}" also-hidden="false"/> + </field> + </form> + <form name="EditProductStoreShipmentMeth" type="single" target="storeUpdateShipMeth" title="" default-map-name="productStoreShipmentMeth"> + <alt-target use-when="productStoreShipmentMeth==null" target="storeCreateShipMeth"/> + <!--<auto-fields-service service-name="updateProductStoreShipMeth"/>--> + <field name="productStoreId"><hidden/></field> + <field name="productStoreShipMethId" use-when="productStoreShipmentMeth!=null"><display/></field> + <field name="shipmentMethodTypeId"> + <display-entity entity-name="ShipmentMethodType" description="${description}" cache="true" also-hidden="true"/> + </field> + <field name="roleTypeId"><display/></field> + <field name="partyId"><display/></field> + + <field name="minSize" tooltip="${uiLabelMap.ProductMinSizeMessage}"><text/></field> + <field name="maxSize" tooltip="${uiLabelMap.ProductMaxSizeMessage}"><text/></field> + <field name="minWeight" tooltip="${uiLabelMap.ProductMinWeightMessage}"><text/></field> + <field name="maxWeight" tooltip="${uiLabelMap.ProductMaxWeightMessage}"><text/></field> + <field name="minTotal" tooltip="${uiLabelMap.ProductMinTotalMesssage}"><text/></field> + <field name="maxTotal" tooltip="${uiLabelMap.ProductMaxTotalMesssage}"><text/></field> + <field name="allowUspsAddr" tooltip="${uiLabelMap.ProductAllowUSPSAddr}"> + <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> + <field name="requireUspsAddr" tooltip="${uiLabelMap.ProductRequireMessage}"> + <drop-down allow-empty="false" no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> + <field name="allowCompanyAddr"> + <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> + <field name="requireCompanyAddr" tooltip="${uiLabelMap.ProductRequireMessage}"> + <drop-down allow-empty="false" no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> + <field name="companyPartyId" tooltip="${uiLabelMap.ProductAllowMessage}"> + <lookup target-form-name="LookupPartyName"/> + </field> + <field name="includeNoChargeItems" title="${uiLabelMap.ProductIncludeFreeship}" tooltip="${uiLabelMap.ProductIncludeFreeshipMessage}"> + <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> + + <field name="includeGeoId" title="${uiLabelMap.ProductIncludeGeo}" tooltip="${uiLabelMap.ProductIncludeGeoMessage}"> + <drop-down allow-empty="true"> + <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}"> + <entity-order-by field-name="geoTypeId"/> + <entity-order-by field-name="geoName"/> + </entity-options> + </drop-down> + </field> + <field name="excludeGeoId" title="${uiLabelMap.ProductExcludeGeo}" tooltip="${uiLabelMap.ProductExcludeGeoMessage}"> + <drop-down allow-empty="true"> + <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}"> + <entity-order-by field-name="geoTypeId"/> + <entity-order-by field-name="geoName"/> + </entity-options> + </drop-down> + </field> + <field name="includeFeatureGroup" tooltip="${uiLabelMap.ProductIncludeFeatureMessage}"><text/></field> + <field name="excludeFeatureGroup" tooltip="${uiLabelMap.ProductExcludeFeatureMessage}"><text/></field> + <field name="serviceName"><text/></field> + <field name="configProps"><text/></field> + <field name="sequenceNumber" tooltip="${uiLabelMap.ProductUsedForDisplayOrdering}"><text/></field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + + <form name="ListShipmentCostEstimates" target="" title="" type="list" list-name="estimates" paginate-target="EditProductStoreShipmentCostEstimates"> <auto-fields-entity entity-name="ShipmentCostEstimate" default-field-type="display"/> Added: ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh?view=auto&rev=527497 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh (added) +++ ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh Wed Apr 11 07:02:16 2007 @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.StringTokenizer; +import org.ofbiz.base.util.UtilValidate; + +String carrierShipmentString = request.getParameter("carrierShipmentString"); +if (UtilValidate.isNotEmpty(carrierShipmentString)) { + StringTokenizer st = new StringTokenizer(carrierShipmentString, "|"); + if (st.countTokens() != 3) { + return "error"; + } + request.setAttribute("addCarrierShipMeth", "Y"); + request.setAttribute("partyId", st.nextToken()); + request.setAttribute("roleTypeId", st.nextToken()); + request.setAttribute("shipmentMethodTypeId", st.nextToken()); + return "success"; +} else { + return "error"; +} Propchange: ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/product/webapp/catalog/store/prepareCreateShipMeth.bsh ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml?view=diff&rev=527497&r1=527496&r2=527497 ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Wed Apr 11 07:02:16 2007 @@ -210,15 +210,32 @@ <set field="productStoreId" from-field="parameters.viewProductStoreId"/> <set field="productStoreId" from-field="parameters.productStoreId" default-value="${productStoreId}"/> <entity-one entity-name="ProductStore" value-name="productStore" auto-field-map="true"/> - - <script location="component://product/webapp/catalog/WEB-INF/actions/store/EditProductStoreShipSetup.bsh"/> + <entity-condition entity-name="ProductStoreShipmentMethView" list-name="storeShipMethods"> + <condition-expr field-name="productStoreId" env-name="productStoreId"/> + <order-by field-name="sequenceNumber"/> + </entity-condition> + <entity-one entity-name="ProductStoreShipmentMeth" value-name="productStoreShipmentMeth" auto-field-map="true"/> </actions> <widgets> <decorator-screen name="CommonProductStoreDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://product/webapp/catalog/store/EditProductStoreShipSetup.ftl"/></html> - </platform-specific> + <include-form name="ListProductStoreShipmentMeths" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/> + <section> + <condition> + <and> + <if-empty field-name="productStoreShipmentMeth"/> + <if-empty field-name="parameters.addCarrierShipMeth"/> + </and> + </condition> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/store/EditProductStoreShipSetup.ftl"/></html> + </platform-specific> + </widgets> + <fail-widgets> + <include-form name="EditProductStoreShipmentMeth" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/> + </fail-widgets> + </section> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |