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
This commit is contained in:
@@ -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}');
|
||||
}
|
||||
</#list>
|
||||
</#if>
|
||||
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');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user