You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/09/30 17:09:58 UTC

svn commit: r1867784 - in /ofbiz/ofbiz-framework/trunk: applications/order/template/order/FindOrders.ftl framework/common/config/CommonUiLabels.xml

Author: jleroux
Date: Mon Sep 30 17:09:57 2019
New Revision: 1867784

URL: http://svn.apache.org/viewvc?rev=1867784&view=rev
Log:
Improved: Clarify orders list headers at Find Order screen
(OFBIZ-10972)

Labels the drop-down
Second drop-down is not required to perform the action. So it should not be 
displayed if printer data is not available, adds required validation check

Thanks: Sanjay Yadav for report, Mohammed Rehan Khan foe review and patch

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/template/order/FindOrders.ftl
    ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/FindOrders.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/order/FindOrders.ftl?rev=1867784&r1=1867783&r2=1867784&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/template/order/FindOrders.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/template/order/FindOrders.ftl Mon Sep 30 17:09:57 2019
@@ -42,6 +42,7 @@ function toggleOrderId(master) {
             element.checked = master.checked;
         }
     }
+    toggleOrderIdList();
 }
 function setServiceName(selection) {
     document.massOrderChangeForm.action = selection.value;
@@ -55,12 +56,28 @@ function toggleOrderIdList() {
     var form = document.massOrderChangeForm;
     var orders = form.elements.length;
     var isAllSelected = true;
+    var isSingle = true;
     for (var i = 0; i < orders; i++) {
         var element = form.elements[i];
-        if ("orderIdList" == element.name && !element.checked)
-            isAllSelected = false;
+        if ("orderIdList" == element.name) {
+            if (element.checked) {
+                isSingle = false;
+            } else {
+                isAllSelected = false;
+            }
+        }
+    }
+    if (isAllSelected) {
+        jQuery('#checkAllOrders').attr('checked', true);
+    } else {
+        jQuery('#checkAllOrders').attr('checked', false);
     }
     jQuery('#checkAllOrders').attr("checked", isAllSelected);
+    if (!isSingle && jQuery('#serviceName').val() != "") {
+        jQuery('#submitButton').removeAttr("disabled"); 
+    } else {
+        jQuery('#submitButton').attr('disabled', true);
+    }
 }
 
 // -->
@@ -513,7 +530,7 @@ document.lookuporder.orderId.focus();
             <#assign ampersand = "">
         </#if>
         <select name="serviceName" onchange="javascript:setServiceName(this);">
-           <option value="javascript:void(0);">&nbsp;</option>
+           <option value="javascript:void(0);">${uiLabelMap.OrderAnyOrderStatus}</option>
            <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderApproveOrder}</option>
            <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderHold}</option>
            <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderProcessOrder}</option>
@@ -525,13 +542,15 @@ document.lookuporder.orderId.focus();
            <option value="<@o...@ofbizUrl>">${uiLabelMap.CommonPrint}</option>
            <option value="<@o...@ofbizUrl>">${uiLabelMap.ContentCreateFile}</option>
         </select>
+        <#if printers?has_content>
         <select name="printerName">
-           <option value="javascript:void(0);">&nbsp;</option>
+           <option value="javascript:void(0);">${uiLabelMap.CommonPleaseSelectPrinter}</option>
            <#list printers as printer>
            <option value="${printer}">${printer}</option>
            </#list>
         </select>
-        <a href="javascript:runAction();" class="buttontext">${uiLabelMap.OrderRunAction}</a>
+        </#if>
+        <input id="submitButton" type="button" onclick="javascript:runAction();" value="${uiLabelMap.OrderRunAction}" disabled="disabled" />
         <br class="clear" />
       </div>
 

Modified: ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml?rev=1867784&r1=1867783&r2=1867784&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml Mon Sep 30 17:09:57 2019
@@ -8931,6 +8931,10 @@
         <value xml:lang="zh">请选择全部必选项。</value>
         <value xml:lang="zh-TW">請選擇全部必要的選項.</value>
     </property>
+    <property key="CommonPleaseSelectPrinter">
+        <value xml:lang="en">Please Select Printer</value>
+        <value xml:lang="fr">Sélectionnez une imprimante</value>
+    </property>
     <property key="CommonPleaseWait">
         <value xml:lang="ar">الرجاء الإنتظار ...</value>
         <value xml:lang="cs">Prosím vyčkejte ...</value>