You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by di...@apache.org on 2016/09/17 06:54:42 UTC

svn commit: r1761133 - in /ofbiz/trunk/applications/order: groovyScripts/order/FindOrders.groovy template/order/FindOrders.ftl widget/ordermgr/QuoteForms.xml widget/ordermgr/RequirementForms.xml

Author: diveshdutta
Date: Sat Sep 17 06:54:42 2016
New Revision: 1761133

URL: http://svn.apache.org/viewvc?rev=1761133&view=rev
Log:
Improved: Convert search criteria on status into multi select pattern for Order Component

(OFBIZ-7542)

Added Check box for status fields on Find Orders, Find Quotes, Find Requirements, and Find Return forms.

Thanks: Mohammad Kathawala for providing the patch and Swapnil Shah for reporting the issue.

Modified:
    ofbiz/trunk/applications/order/groovyScripts/order/FindOrders.groovy
    ofbiz/trunk/applications/order/template/order/FindOrders.ftl
    ofbiz/trunk/applications/order/widget/ordermgr/QuoteForms.xml
    ofbiz/trunk/applications/order/widget/ordermgr/RequirementForms.xml

Modified: ofbiz/trunk/applications/order/groovyScripts/order/FindOrders.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/groovyScripts/order/FindOrders.groovy?rev=1761133&r1=1761132&r2=1761133&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/groovyScripts/order/FindOrders.groovy (original)
+++ ofbiz/trunk/applications/order/groovyScripts/order/FindOrders.groovy Sat Sep 17 06:54:42 2016
@@ -75,11 +75,8 @@ if (currentTypeId) {
     context.currentType = currentType;
 }
 // current selected status
-currentStatusId = request.getParameter("orderStatusId");
-if (currentStatusId) {
-    currentStatus = from("StatusItem").where("statusId", currentStatusId).cache(true).queryOne();
-    context.currentStatus = currentStatus;
-}
+currentStatusIds = request.getParameter("orderStatusId");
+context.currentStatuses = currentStatusIds;
 
 // current website
 currentWebSiteId = request.getParameter("orderWebSiteId");

Modified: ofbiz/trunk/applications/order/template/order/FindOrders.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/FindOrders.ftl?rev=1761133&r1=1761132&r2=1761133&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/template/order/FindOrders.ftl (original)
+++ ofbiz/trunk/applications/order/template/order/FindOrders.ftl Sat Sep 17 06:54:42 2016
@@ -322,16 +322,12 @@ function toggleOrderIdList() {
                 <td width='25%' align='right' class='label'>${uiLabelMap.CommonStatus}</td>
                 <td width='5%'>&nbsp;</td>
                 <td align='left'>
-                  <select name='orderStatusId'>
-                    <#if currentStatus?has_content>
-                    <option value="${currentStatus.statusId}">${currentStatus.get("description", locale)}</option>
-                    <option value="${currentStatus.statusId}">---</option>
-                    </#if>
-                    <option value="">${uiLabelMap.OrderAnyOrderStatus}</option>
-                    <#list orderStatuses as orderStatus>
-                      <option value="${orderStatus.statusId}">${orderStatus.get("description", locale)}</option>
-                    </#list>
-                  </select>
+                  <#list orderStatuses as orderStatus>
+                    <label>
+                      <input type="checkbox" name="orderStatusId" value="${orderStatus.statusId}" <#if currentStatuses?has_content && currentStatuses.contains(orderStatus.statusId)>checked</#if>/>
+                      ${orderStatus.get("description", locale)}
+                    </label>
+                  </#list>
                 </td>
               </tr>
               <tr>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/QuoteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/QuoteForms.xml?rev=1761133&r1=1761132&r2=1761133&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/QuoteForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/QuoteForms.xml Sat Sep 17 06:54:42 2016
@@ -42,12 +42,12 @@ under the License.
         </field>
         <field name="issueDate" title="${uiLabelMap.OrderOrderQuoteIssueDate}"></field>
         <field name="statusId" title="${uiLabelMap.CommonStatus}">
-            <drop-down allow-empty="true">
+            <check all-checked="false">
                 <entity-options entity-name="StatusItem">
                     <entity-constraint name="statusTypeId" operator="equals" value="QUOTE_STATUS"/>
                     <entity-order-by field-name="sequenceId"/>
                 </entity-options>
-            </drop-down>
+            </check>
         </field>
         <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
             <drop-down allow-empty="true" no-current-selected-key="${defaultOrganizationPartyCurrencyUomId}">

Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequirementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequirementForms.xml?rev=1761133&r1=1761132&r2=1761133&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequirementForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequirementForms.xml Sat Sep 17 06:54:42 2016
@@ -30,12 +30,12 @@ under the License.
             </drop-down>
         </field>
         <field name="statusId">
-            <drop-down allow-empty="true">
+            <check all-checked="false">
                 <entity-options entity-name="StatusItem">
                     <entity-constraint name="statusTypeId" operator="equals" value="REQUIREMENT_STATUS"/>
                     <entity-order-by field-name="sequenceId"/>
                 </entity-options>
-            </drop-down>
+            </check>
         </field>
         <field name="facilityId">
             <drop-down allow-empty="true">