Author: jleroux
Date: Wed Dec 21 21:17:38 2011 New Revision: 1221890 URL: http://svn.apache.org/viewvc?rev=1221890&view=rev Log: "Applied fix from trunk for revision: 1221889 " ------------------------------------------------------------------------ r1221889 | jleroux | 2011-12-21 22:14:26 +0100 (mer., 21 déc. 2011) | 7 lines A modified patch from Leon "Help screen/navigation do not take into account content expiration" https://issues.apache.org/jira/browse/OFBIZ-4626 To enable a disabled html element, there're only two ways, remove "disabled" attribute or use javascript to set disable property to false. The patch updates trivial to enable submit button in ListInvoices.ftl and batchPayments.ftl. btw, it's not w2c compliance to set disabled attribute to other value than 'disabled'. jleroux: Actually W3C does not define any value for disabled http://www.w3.org/TR/html4/interact/forms.html#adef-disabled and its value in javascript is a boolean so we should rather use true instead of 'disabled' (we could also use false instead of remove it seems, but anyway...) So more files need to be changed, though they all use ".removeAttr('disabled')" ------------------------------------------------------------------------ Modified: ofbiz/branches/release11.04/ (props changed) ofbiz/branches/release11.04/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ofbiz/branches/release11.04/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/CommissionRun.ftl ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl ofbiz/branches/release11.04/applications/accounting/webapp/ar/invoice/ListInvoices.ftl ofbiz/branches/release11.04/applications/accounting/webapp/ar/payment/batchPayments.ftl Propchange: ofbiz/branches/release11.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Dec 21 21:17:38 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4:951708-952957 /ofbiz/branches/jquery:952958-1044489 /ofbiz/branches/multitenant20100310:921280-927264 -/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124,1220298 +/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124,1220298,1221889 Modified: ofbiz/branches/release11.04/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Wed Dec 21 21:17:38 2011 @@ -74,7 +74,7 @@ function getFinAccountTransRunningTotalA jQuery('#endingBalance').html(jQuery('#endingBalanceInput').val()); } - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); } } </script> Modified: ofbiz/branches/release11.04/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl Wed Dec 21 21:17:38 2011 @@ -63,7 +63,7 @@ function getPaymentRunningTotal() { }); } else { jQuery('#showPaymentRunningTotal').html(""); - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); } } Modified: ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/CommissionRun.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/CommissionRun.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/CommissionRun.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/CommissionRun.ftl Wed Dec 21 21:17:38 2011 @@ -68,7 +68,7 @@ function enableSubmitButton() { if (!isSingle && jQuery('#serviceName').val() != "") jQuery('#submitButton').attr('disabled', ''); else - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); } --> Modified: ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Wed Dec 21 21:17:38 2011 @@ -71,7 +71,7 @@ function getInvoiceRunningTotal() { } } else { - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); jQuery('#showInvoiceRunningTotal').html(""); } } Modified: ofbiz/branches/release11.04/applications/accounting/webapp/ar/invoice/ListInvoices.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/ar/invoice/ListInvoices.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/ar/invoice/ListInvoices.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/ar/invoice/ListInvoices.ftl Wed Dec 21 21:17:38 2011 @@ -64,11 +64,11 @@ under the License. }); if(jQuery('#serviceName').val() != "") { - jQuery('#submitButton').attr('disabled', ''); + jQuery('#submitButton').removeAttr('disabled'); } } else { - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); jQuery('#showInvoiceRunningTotal').html(""); } } @@ -104,7 +104,9 @@ under the License. }); if(anyChecked && (jQuery('#serviceName').val() != "")) { - jQuery('#submitButton').attr('disabled' , ''); + jQuery('#submitButton').removeAttr('disabled'); + } else { + jQuery('#submitButton').attr('disabled', true); } } //]]> @@ -179,6 +181,7 @@ under the License. <td><@ofbizCurrency amount=invoicePaymentInfo.amount isoCode=defaultOrganizationPartyCurrencyUomId/></td> <td><@ofbizCurrency amount=invoicePaymentInfo.paidAmount isoCode=defaultOrganizationPartyCurrencyUomId/></td> <td><@ofbizCurrency amount=invoicePaymentInfo.outstandingAmount isoCode=defaultOrganizationPartyCurrencyUomId/></td> + mlml <td align="right"><input type="checkbox" id="invoiceId_${invoice_index}" name="invoiceIds" value="${invoice.invoiceId}" onclick="javascript:getInvoiceRunningTotal();"/></td> </tr> <#-- toggle the row color --> Modified: ofbiz/branches/release11.04/applications/accounting/webapp/ar/payment/batchPayments.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=1221890&r1=1221889&r2=1221890&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/branches/release11.04/applications/accounting/webapp/ar/payment/batchPayments.ftl Wed Dec 21 21:17:38 2011 @@ -65,11 +65,13 @@ function getPaymentRunningTotal() { }); if(jQuery('#serviceName').val() != "") { - jQuery('#submitButton').attr('disabled', ''); + jQuery('#submitButton').removeAttr('disabled'); + } else { + jQuery('#submitButton').attr('disabled', true); } } else { - jQuery('#submitButton').attr('disabled', 'disabled'); + jQuery('#submitButton').attr('disabled', true); jQuery('#showPaymentRunningTotal').html(""); } } @@ -108,9 +110,9 @@ function setServiceName(selection) { }); if(anyChecked && (jQuery('#serviceName').val() != "")) { - jQuery('#submitButton').attr('disabled' , ''); + jQuery('#submitButton').removeAttr('disabled'); } else { - jQuery('#submitButton').attr('disabled' , 'disabled'); + jQuery('#submitButton').attr('disabled' , true); } } |
Free forum by Nabble | Edit this page |