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);"> </option> + <option value="javascript:void(0);">${uiLabelMap.OrderAnyOrderStatus}</option> <option value="<@ofbizUrl>massApproveOrders?hideFields=${requestParameters.hideFields?default("N")}${ampersand}${paramList}</@ofbizUrl>">${uiLabelMap.OrderApproveOrder}</option> <option value="<@ofbizUrl>massHoldOrders?hideFields=${requestParameters.hideFields?default("N")}${ampersand}${paramList}</@ofbizUrl>">${uiLabelMap.OrderHold}</option> <option value="<@ofbizUrl>massProcessOrders?hideFields=${requestParameters.hideFields?default("N")}${ampersand}${paramList}</@ofbizUrl>">${uiLabelMap.OrderProcessOrder}</option> @@ -525,13 +542,15 @@ document.lookuporder.orderId.focus(); <option value="<@ofbizUrl>massPrintOrders?hideFields=${requestParameters.hideFields?default('N')}${ampersand}${paramList}</@ofbizUrl>">${uiLabelMap.CommonPrint}</option> <option value="<@ofbizUrl>massCreateFileForOrders?hideFields=${requestParameters.hideFields?default('N')}${ampersand}${paramList}</@ofbizUrl>">${uiLabelMap.ContentCreateFile}</option> </select> + <#if printers?has_content> <select name="printerName"> - <option value="javascript:void(0);"> </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> |
Free forum by Nabble | Edit this page |