You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/07/29 23:57:53 UTC
svn commit: r1366963 - in /ofbiz/branches/release11.04: ./
applications/product/script/org/ofbiz/product/price/PriceServices.xml
applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl
applications/product/widget/catalog/PriceForms.xml
Author: jleroux
Date: Sun Jul 29 21:57:52 2012
New Revision: 1366963
URL: http://svn.apache.org/viewvc?rev=1366963&view=rev
Log:
"Applied fix from trunk for revision: 1366960" (conflicts handled by hand)
------------------------------------------------------------------------
r1366960 | jleroux | 2012-07-29 23:49:52 +0200 (dim., 29 juil. 2012) | 13 lines
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)
------------------------------------------------------------------------
Modified:
ofbiz/branches/release11.04/ (props changed)
ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/price/PriceServices.xml
ofbiz/branches/release11.04/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl
ofbiz/branches/release11.04/applications/product/widget/catalog/PriceForms.xml
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1366960
Modified: ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/price/PriceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/price/PriceServices.xml?rev=1366963&r1=1366962&r2=1366963&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/price/PriceServices.xml (original)
+++ ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/price/PriceServices.xml Sun Jul 29 21:57:52 2012
@@ -307,9 +307,12 @@ under the License.
</check-permission>
<check-errors/>
- <if-not-empty field="parameters.condValueInput">
+ <if-compare field="parameters.inputParamEnumId" operator="equals" value="PRIP_QUANTITY">
<set field="parameters.condValue" from-field="parameters.condValueInput"/>
- </if-not-empty>
+ </if-compare>
+ <if-compare field="parameters.inputParamEnumId" operator="equals" value="PRIP_LIST_PRICE">
+ <set field="parameters.condValue" from-field="parameters.condValueInput"/>
+ </if-compare>
<make-value entity-name="ProductPriceCond" value-field="lookupPKMap"/>
<set-pk-fields map="parameters" value-field="lookupPKMap"/>
<find-by-primary-key entity-name="ProductPriceCond" map="lookupPKMap" value-field="lookedUpValue"/>
Modified: ofbiz/branches/release11.04/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl?rev=1366963&r1=1366962&r2=1366963&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl (original)
+++ ofbiz/branches/release11.04/applications/product/webapp/catalog/price/setPriceRulesCondEventJs.ftl Sun Jul 29 21:57:52 2012
@@ -18,18 +18,14 @@ under the License.
-->
<script type="text/javascript">
jQuery(document).ready( function() {
-
<#if 0 < productPriceConds.size()>
<#list 0..productPriceConds.size()-1 as i>
if (document.getElementById('EditProductPriceRulesCond_o_${i}')) {
+ jQuery('#EditProductPriceRulesCond_condValueInput_o_${i}').hide();
jQuery('#EditProductPriceRulesCond_inputParamEnumId_o_${i}').change( function() {
- <#if 'PRIP_QUANTITY' != productPriceConds[i].inputParamEnumId && 'PRIP_LIST_PRICE' != productPriceConds[i].inputParamEnumId>
- getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description');
- </#if>
- });
- <#if 'PRIP_QUANTITY' != productPriceConds[i].inputParamEnumId && 'PRIP_LIST_PRICE' != productPriceConds[i].inputParamEnumId>
- getDependentDropdownValues('getAssociatedPriceRulesConds', 'inputParamEnumId', 'EditProductPriceRulesCond_inputParamEnumId_o_${i}', 'EditProductPriceRulesCond_condValue_o_${i}', 'productPriceRulesCondValues', 'condValue_o_${i}', 'description', '${productPriceConds[i].condValue}');
- </#if>
+ 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>
Modified: ofbiz/branches/release11.04/applications/product/widget/catalog/PriceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/widget/catalog/PriceForms.xml?rev=1366963&r1=1366962&r2=1366963&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/widget/catalog/PriceForms.xml (original)
+++ ofbiz/branches/release11.04/applications/product/widget/catalog/PriceForms.xml Sun Jul 29 21:57:52 2012
@@ -92,18 +92,13 @@
</entity-options>
</drop-down>
</field>
- <field use-when=""PRIP_QUANTITY".equals(inputParamEnumId) || "PRIP_LIST_PRICE".equals(inputParamEnumId)"
- name="condValueInput" title="${uiLabelMap.ProductValue}">
- <text size="10" default-value="${condValue}"/>
- </field>
- <field
- use-when="!"PRIP_QUANTITY".equals(inputParamEnumId) && !"PRIP_LIST_PRICE".equals(inputParamEnumId)"
- name="condValue" title="${uiLabelMap.CommonEmptyHeader}">
+ <field name="condValueInput" title="${uiLabelMap.ProductValue}" entry-name="condValue"><text size="10"/></field>
+ <field name="condValue" title=" ">
<drop-down allow-empty="false" current="selected">
<list-options list-name="productPriceRulesCondValues" key-name="condValue"/>
</drop-down>
- </field>
- <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
<field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" widget-area-style="align-text">
<hyperlink target="deleteProductPriceCond" description="${uiLabelMap.CommonRemove}">
<parameter param-name="productPriceRuleId" from-field="productPriceCond.productPriceRuleId"/>