Author: ashish
Date: Mon Jun 27 08:18:46 2016 New Revision: 1750308 URL: http://svn.apache.org/viewvc?rev=1750308&view=rev Log: Applied patch from jira issue - OFBIZ-7571 - Remove HtmlFormWrapper dependencies from Product Config Item Content screen. Thanks Ravi for the contribution. Removed: ofbiz/trunk/applications/product/template/config/EditProductConfigItemContentContent.ftl Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContentContent.groovy ofbiz/trunk/applications/product/template/config/EditProductConfigItemContent.ftl ofbiz/trunk/applications/product/widget/catalog/ConfigScreens.xml Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy?rev=1750308&r1=1750307&r2=1750308&view=diff ============================================================================== --- ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy (original) +++ ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy Mon Jun 27 08:18:46 2016 @@ -21,7 +21,6 @@ import org.ofbiz.base.util.* import org.ofbiz.base.util.string.* import org.ofbiz.entity.* import org.ofbiz.entity.util.EntityUtilProperties; -import org.ofbiz.widget.renderer.html.HtmlFormWrapper; // make the image file formats context.tenantId = delegator.getDelegatorTenantId(); @@ -50,18 +49,6 @@ productContent.each { productContent -> productContentDatas.add([productContent : productContent, content : content]); } -updateProductContentWrapper = new HtmlFormWrapper("component://product/widget/catalog/ConfigForms.xml", "UpdateProductConfigItemContentAssoc", request, response); -context.updateProductContentWrapper = updateProductContentWrapper; -updateProductContentWrapper.putInContext("productContentDatas", productContentDatas); - -prepareAddProductContentWrapper = new HtmlFormWrapper("component://product/widget/catalog/ConfigForms.xml", "PrepareAddProductConfigItemContentAssoc", request, response); -context.prepareAddProductContentWrapper = prepareAddProductContentWrapper; -prepareAddProductContentWrapper.putInContext("configItem", configItem); - -addProductContentWrapper = new HtmlFormWrapper("component://product/widget/catalog/ConfigForms.xml", "AddProductConfigItemContentAssoc", request, response); -context.addProductContentWrapper = addProductContentWrapper; -addProductContentWrapper.putInContext("configItem", configItem); - context.productContentList = productContentDatas; // End ProductContent stuff @@ -141,3 +128,4 @@ if (fileType) { } } } + Modified: ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContentContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContentContent.groovy?rev=1750308&r1=1750307&r2=1750308&view=diff ============================================================================== --- ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContentContent.groovy (original) +++ ofbiz/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContentContent.groovy Mon Jun 27 08:18:46 2016 @@ -20,7 +20,6 @@ import org.ofbiz.entity.*; import org.ofbiz.entity.util.*; import org.ofbiz.base.util.*; -import org.ofbiz.widget.renderer.html.HtmlFormWrapper; contentId = request.getParameter("contentId") ?: null; @@ -66,12 +65,6 @@ if (contentId && content) { } } } -updateProductContentWrapper = new HtmlFormWrapper("component://product/widget/catalog/ConfigForms.xml", "EditProductConfigItemContentSimpleText", request, response); -updateProductContentWrapper.putInContext("textData", textData); - -context.updateProductContentWrapper = updateProductContentWrapper; -updateProductContentWrapper.putInContext("productContentData", productContentData); context.productContentData = productContentData; -updateProductContentWrapper.putInContext("content", content); -updateProductContentWrapper.putInContext("contentId", contentId); +context.textData = textData; \ No newline at end of file Modified: ofbiz/trunk/applications/product/template/config/EditProductConfigItemContent.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/template/config/EditProductConfigItemContent.ftl?rev=1750308&r1=1750307&r2=1750308&view=diff ============================================================================== --- ofbiz/trunk/applications/product/template/config/EditProductConfigItemContent.ftl (original) +++ ofbiz/trunk/applications/product/template/config/EditProductConfigItemContent.ftl Mon Jun 27 08:18:46 2016 @@ -84,7 +84,7 @@ function insertImageName(size,nameValue) <h3>${uiLabelMap.ProductCreateNewProductConfigItemContent}</h3> </div> <div class="screenlet-body"> - ${prepareAddProductContentWrapper.renderFormString(context)} + ${screens.render("component://product/widget/catalog/ConfigScreens.xml#PrepareAddProductConfigItemContentAssoc")} </div> </div> <div class="screenlet"> @@ -92,7 +92,7 @@ function insertImageName(size,nameValue) <h3>${uiLabelMap.ProductAddContentProductConfigItem}</h3> </div> <div class="screenlet-body"> - ${addProductContentWrapper.renderFormString(context)} + ${screens.render("component://product/widget/catalog/ConfigScreens.xml#AddProductConfigItemContentAssoc")} </div> </div> </#if> Modified: ofbiz/trunk/applications/product/widget/catalog/ConfigScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ConfigScreens.xml?rev=1750308&r1=1750307&r2=1750308&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/ConfigScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/ConfigScreens.xml Mon Jun 27 08:18:46 2016 @@ -231,6 +231,36 @@ under the License. </widgets> </section> </screen> + <screen name="PrepareAddProductConfigItemContentAssoc"> + <section> + <actions> + <set field="calendarExceptionWeek" value="${groovy: request.getAttribute('calendarExceptionWeek');}"/> + </actions> + <widgets> + <include-form name="PrepareAddProductConfigItemContentAssoc" location="component://product/widget/catalog/ConfigForms.xml"/> + </widgets> + </section> + </screen> + <screen name="AddProductConfigItemContentAssoc"> + <section> + <actions> + <set field="calendarExceptionWeek" value="${groovy: request.getAttribute('calendarExceptionWeek');}"/> + </actions> + <widgets> + <include-form name="AddProductConfigItemContentAssoc" location="component://product/widget/catalog/ConfigForms.xml"/> + </widgets> + </section> + </screen> + <screen name="AddProductConfigItemContentAssoc"> + <section> + <actions> + <set field="calendarExceptionWeek" value="${groovy: request.getAttribute('calendarExceptionWeek');}"/> + </actions> + <widgets> + <include-form name="AddProductConfigItemContentAssoc" location="component://product/widget/catalog/ConfigForms.xml"/> + </widgets> + </section> + </screen> <screen name="EditProductConfigItemContentContent"> <section> <actions> @@ -249,9 +279,30 @@ under the License. <widgets> <decorator-screen name="CommonConfigDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://product/template/config/EditProductConfigItemContentContent.ftl"/></html> - </platform-specific> + <container style="button-bar"> + <link target="EditProductConfigItemContent" text="${uiLabelMap.ProductProduct} ${uiLabelMap.ProductConfigItem} ${uiLabelMap.ProductContent} ${uiLabelMap.CommonList}" style="buttontext"> + <parameter param-name="configItemId" from-field="configItemId"/> + </link> + <section> + <condition> + <not><if-empty field="contentId"/></not> + </condition> + <widgets> + <link target="/content/control/EditContent?contentId=${contentId}" text="${uiLabelMap.ProductContent} ${uiLabelMap.CommonPage}" style="buttontext" target-window="_blank" url-mode="inter-app"/> + </widgets> + </section> + </container> + <section> + <condition> + <and> + <not><if-empty field="configItemId"/></not> + <not><if-empty field="productContent"/></not> + </and> + </condition> + <widgets> + <include-form name="EditProductConfigItemContentSimpleText" location="component://product/widget/catalog/ConfigForms.xml"/> + </widgets> + </section> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |