From 20affe0b31eb62db596d520aa288ba2d4dd14397 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sat, 26 Jan 2013 10:44:21 +0000 Subject: [PATCH] A patch from Taher Alkhateeb for "Corrections and improvements to dependent drop-downs" https://issues.apache.org/jira/browse/OFBIZ-5126 * The getDependentDropdownValues function in miscAjaxFunctions.js is modified with a new argument to allow for empty selections. Therefore, copying the behavior of form widget drop-down's "allow-empty" * There is only one file affected by item number 2 above: setPriceRulesCondEventJs.ftl Therefore, I fixed it to include the argument in getDependentDropdownValues jleroux: complete r1438501 where I missed setPriceRulesCondEventJs.ftl, as suggested Taher, for consistency sake, I used '' instead of false git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1438876 13f79535-47bb-0310-9956-ffa450edef68 --- .../webapp/catalog/price/setPriceRulesCondEventJs.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl b/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl index fa384fa8d3..6dda4cce3e 100644 --- a/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl +++ b/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl @@ -23,18 +23,18 @@ jQuery(document).ready( function() { if (document.getElementById('EditProductPriceRulesCond_o_${i}')) { jQuery('#EditProductPriceRulesCond_condValueInput_o_${i}').hide(); jQuery('#EditProductPriceRulesCond_inputParamEnumId_o_${i}').change( function() { - getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}'); + getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}'); }); - getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}'); + getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}', '', '', '', '', 'EditProductPriceRulesCond_condValueInput_o_${i}'); } if (document.getElementById('AddProductPriceRulesCond_o_0')) { jQuery('#AddProductPriceRulesCond_condValueInput_o_0').hide(); jQuery('#AddProductPriceRulesCond_inputParamEnumId_o_0').change( function() { - getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'AddProductPriceRulesCond_inputParamEnumId_o_0', 'AddProductPriceRulesCond_condValue_o_0', 'productPriceRulesCondValues', 'condValue_o_0', 'description', '', '', '', '', 'AddProductPriceRulesCond_condValueInput_o_0'); + getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'AddProductPriceRulesCond_inputParamEnumId_o_0', 'AddProductPriceRulesCond_condValue_o_0', 'productPriceRulesCondValues', 'condValue_o_0', 'description', '', '', '', '', '', 'AddProductPriceRulesCond_condValueInput_o_0'); }); - getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'AddProductPriceRulesCond_inputParamEnumId_o_0', 'AddProductPriceRulesCond_condValue_o_0', 'productPriceRulesCondValues', 'condValue_o_0', 'description', '', '', '', '', 'AddProductPriceRulesCond_condValueInput_o_0'); + getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'AddProductPriceRulesCond_inputParamEnumId_o_0', 'AddProductPriceRulesCond_condValue_o_0', 'productPriceRulesCondValues', 'condValue_o_0', 'description', '', '', '', '', '', 'AddProductPriceRulesCond_condValueInput_o_0'); } })