From b189d4e53950d6bd85cacb299a5fd7bb3bb084f0 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sun, 29 Jul 2012 21:49:52 +0000 Subject: [PATCH] This closes "Price rule add not correctly" https://issues.apache.org/jira/browse/OFBIZ-4978 steps: 1.login and goto price rule tab 2.add a rule 3.add a condition for the rule The issue is, the added condition is not my selection. I add condition "Party is Fanse Fan", then add, after success, in the detail list, the last party of the select box be shown on the condition , not the one which I choosed. jleroux: * The problem reported by Fanse is now corrected * Fixes an issue when updating a condition (check is now done on input types and not only on value as in creation where it's not a problem, the copy and adaptation from creation to update service implementation was the reason of this bug I'm in the process of adding some more check for condition creation, but will do that later (ne feature not only fixes as here) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1366960 13f79535-47bb-0310-9956-ffa450edef68 --- .../script/org/ofbiz/product/price/PriceServices.xml | 7 +++++-- .../webapp/catalog/price/setPriceRulesCondEventJs.ftl | 4 ++-- applications/product/widget/catalog/PriceForms.xml | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/applications/product/script/org/ofbiz/product/price/PriceServices.xml b/applications/product/script/org/ofbiz/product/price/PriceServices.xml index ff1871ec25..927837f439 100644 --- a/applications/product/script/org/ofbiz/product/price/PriceServices.xml +++ b/applications/product/script/org/ofbiz/product/price/PriceServices.xml @@ -307,9 +307,12 @@ under the License. - + - + + + + diff --git a/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl b/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl index f2b8febf85..fa384fa8d3 100644 --- a/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl +++ b/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl @@ -23,9 +23,9 @@ 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', '', '', '', '', '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', '', '', '', '', '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}'); } diff --git a/applications/product/widget/catalog/PriceForms.xml b/applications/product/widget/catalog/PriceForms.xml index c1e20d5eac..4671f535cc 100644 --- a/applications/product/widget/catalog/PriceForms.xml +++ b/applications/product/widget/catalog/PriceForms.xml @@ -94,11 +94,11 @@ - - + + - +