svn commit: r1781367 - in /ofbiz/trunk: applications/content/widget/compdoc/ applications/content/widget/content/ applications/product/template/ applications/product/template/store/ applications/product/webapp/catalog/WEB-INF/ framework/base/src/main/j...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1781367 - in /ofbiz/trunk: applications/content/widget/compdoc/ applications/content/widget/content/ applications/product/template/ applications/product/template/store/ applications/product/webapp/catalog/WEB-INF/ framework/base/src/main/j...

jleroux@apache.org
Author: jleroux
Date: Thu Feb  2 10:54:06 2017
New Revision: 1781367

URL: http://svn.apache.org/viewvc?rev=1781367&view=rev
Log:
No functional change, reverts r1781366

I did not even notice I committed this bunch of WIP stuff. I guess I clicked
somewhere while my machine was too buzy

Removed:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/Owasp.CsrfGuard.js
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/Owasp.CsrfGuard.properties
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller - Copie.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web - Copie.xml
    ofbiz/trunk/framework/webapp/config/requestHandler - Copie.properties
    ofbiz/trunk/themes/tomahawk/template/Header - Copie.ftl
Modified:
    ofbiz/trunk/applications/content/widget/compdoc/CompDocTemplateTree.xml
    ofbiz/trunk/applications/content/widget/content/ContentForms.xml
    ofbiz/trunk/applications/product/template/Main.ftl
    ofbiz/trunk/applications/product/template/store/EditProductStoreWebSites.ftl
    ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java
    ofbiz/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/entityops/EntityOne.java
    ofbiz/trunk/framework/widget/dtd/widget-common.xsd
    ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java

Modified: ofbiz/trunk/applications/content/widget/compdoc/CompDocTemplateTree.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/compdoc/CompDocTemplateTree.xml?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/compdoc/CompDocTemplateTree.xml (original)
+++ ofbiz/trunk/applications/content/widget/compdoc/CompDocTemplateTree.xml Thu Feb  2 10:54:06 2017
@@ -22,7 +22,7 @@ under the License.
     <tree name="CompDocTemplateTree" entity-name="Content" root-node-name="node-root"
         default-render-style="simple" default-wrap-style="treeWrapper">
         <node name="node-root" wrap-style="treeWrapper">
-            <entity-one entity-name="Content" value-field="content" use-cache="false">
+            <entity-one entity-name="Content" use-cache="false">
                 <field-map field-name="contentId" from-field="rootContentId"/>
             </entity-one>
             <include-screen name="rootTemplateLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
@@ -54,7 +54,7 @@ under the License.
             </sub-node>
         </node>
         <node name="node-body" join-field-name="itemContentId" entity-name="AssocRevisionItemView" wrap-style="treeWrapper">
-            <entity-one entity-name="Content" value-field="content" use-cache="false">
+            <entity-one entity-name="Content" use-cache="false">
                 <field-map field-name="contentId" from-field="itemContentId"/>
             </entity-one>
             <include-screen name="childTemplateLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
@@ -90,7 +90,7 @@ under the License.
     <tree name="CompDocInstanceTree" entity-name="Content" root-node-name="node-root"
         default-render-style="simple" default-wrap-style="treeWrapper">
         <node name="node-root">
-            <entity-one entity-name="Content" value-field="content" use-cache="false">
+            <entity-one entity-name="Content" use-cache="false">
                 <field-map field-name="contentId" from-field="instanceContent.instanceOfContentId"/>
             </entity-one>
             <include-screen name="rootInstanceLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>
@@ -122,7 +122,7 @@ under the License.
             </sub-node>
         </node>
         <node name="node-body" join-field-name="itemContentId" entity-name="AssocRevisionItemView">
-            <entity-one entity-name="Content" value-field="content" use-cache="false">
+            <entity-one entity-name="Content" use-cache="false">
                 <field-map field-name="contentId" from-field="itemContentId"/>
             </entity-one>
             <include-screen name="childInstanceLine" location="component://content/widget/compdoc/CompDocScreens.xml"/>

Modified: ofbiz/trunk/applications/content/widget/content/ContentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentForms.xml?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentForms.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentForms.xml Thu Feb  2 10:54:06 2017
@@ -230,9 +230,9 @@ under the License.
     </form>
     <!-- ContentAssoc forms -->
     <form name="EditContentAssoc" target="updateContentAssoc" title="" type="single"
-        header-row-style="header-row" default-table-style="basic-table" default-entity-name="contentAssocX">
+        header-row-style="header-row" default-table-style="basic-table">
         <actions>
-            <entity-one entity-name="ContentAssoc" use-cache="true" value-field="contentAssoc">
+            <entity-one entity-name="ContentAssoc" use-cache="true">
                 <field-map field-name="contentId" from-field="contentId"/>
                 <field-map field-name="contentIdTo" from-field="contentIdTo"/>
                 <field-map field-name="contentAssocTypeId" from-field="contentAssocTypeId"/>

Modified: ofbiz/trunk/applications/product/template/Main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/template/Main.ftl?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/template/Main.ftl (original)
+++ ofbiz/trunk/applications/product/template/Main.ftl Thu Feb  2 10:54:06 2017
@@ -29,8 +29,6 @@ under the License.
   </form>
   <div class="label">${uiLabelMap.CommonOr}: <a href="<@ofbizUrl>EditProdCatalog</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductCreateNewCatalog}</a></div>
   <br />
-<p>Output format: ${.output_format}
-<p>Auto-escaping: ${.auto_esc?c}  
   <div class="label">${uiLabelMap.ProductEditCategoryWithCategoryId}:</div>
   <form method="post" action="<@ofbizUrl>EditCategory</@ofbizUrl>" style="margin: 0;" name="EditCategoryForm">
     <@htmlTemplate.lookupField name="productCategoryId" id="productCategoryId" formName="EditCategoryForm" fieldFormName="LookupProductCategory"/>

Modified: ofbiz/trunk/applications/product/template/store/EditProductStoreWebSites.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/template/store/EditProductStoreWebSites.ftl?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/template/store/EditProductStoreWebSites.ftl (original)
+++ ofbiz/trunk/applications/product/template/store/EditProductStoreWebSites.ftl Thu Feb  2 10:54:06 2017
@@ -37,7 +37,12 @@ under the License.
                   <td>${webSite.httpHost?default('&nbsp;')}</td>
                   <td>${webSite.httpPort?default('&nbsp;')}</td>
                   <td align="center">
-                    <a href="<@ofbizUrl>storeUpdateWebSite?viewProductStoreId=${productStoreId}&productStoreId=&webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
+                    <a href="javascript:document.storeUpdateWebSite_${webSite_index}.submit();" class="buttontext">${uiLabelMap.CommonDelete}</a>
+                    <form name="storeUpdateWebSite_${webSite_index}" method="post" action="<@ofbizUrl>storeUpdateWebSite</@ofbizUrl>">
+                        <input type="hidden" name="viewProductStoreId" value="${productStoreId}"/>
+                        <input type="hidden" name="productStoreId" value=""/>
+                        <input type="hidden" name="webSiteId" value="${webSite.webSiteId}"/>
+                    </form>                      
                   </td>
                 </tr>
                 <#-- toggle the row color -->

Modified: ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java Thu Feb  2 10:54:06 2017
@@ -36,6 +36,9 @@ import java.util.TimeZone;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 
+import freemarker.cache.MultiTemplateLoader;
+import freemarker.cache.StringTemplateLoader;
+import freemarker.cache.TemplateLoader;
 import org.apache.ofbiz.base.location.FlexibleLocation;
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.StringUtil;
@@ -45,15 +48,8 @@ import org.apache.ofbiz.base.util.UtilPr
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.base.util.cache.UtilCache;
 
-import freemarker.cache.ConditionalTemplateConfigurationFactory;
-import freemarker.cache.MultiTemplateLoader;
-import freemarker.cache.PathGlobMatcher;
-import freemarker.cache.StringTemplateLoader;
-import freemarker.cache.TemplateLoader;
 import freemarker.cache.URLTemplateLoader;
 import freemarker.core.Environment;
-import freemarker.core.HTMLOutputFormat;
-import freemarker.core.TemplateConfiguration;
 import freemarker.ext.beans.BeanModel;
 import freemarker.ext.beans.BeansWrapper;
 import freemarker.ext.beans.BeansWrapperBuilder;
@@ -95,14 +91,6 @@ public final class FreeMarkerWorker {
     public static Configuration makeConfiguration(BeansWrapper wrapper) {
         Configuration newConfig = newConfiguration();
 
-        TemplateConfiguration tcHTML = new TemplateConfiguration();
-        tcHTML.setOutputFormat(HTMLOutputFormat.INSTANCE);
-
-        newConfig.setTemplateConfigurations(
-                new ConditionalTemplateConfigurationFactory(
-                        new PathGlobMatcher("*.ftl"),
-                        tcHTML));
-
         newConfig.setObjectWrapper(wrapper);
         TemplateHashModel staticModels = wrapper.getStaticModels();
         newConfig.setSharedVariable("Static", staticModels);

Modified: ofbiz/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/entityops/EntityOne.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/entityops/EntityOne.java?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/entityops/EntityOne.java (original)
+++ ofbiz/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/entityops/EntityOne.java Thu Feb  2 10:54:06 2017
@@ -44,7 +44,7 @@ public final class EntityOne extends Ent
         super(element, simpleMethod);
         if (MiniLangValidate.validationOn()) {
             MiniLangValidate.attributeNames(simpleMethod, element, "entity-name", "use-cache", "auto-field-map", "value-field", "delegator-name");
-            MiniLangValidate.requiredAttributes(simpleMethod, element, "entity-name");
+            MiniLangValidate.requiredAttributes(simpleMethod, element, "entity-name", "value-field");
             MiniLangValidate.expressionAttributes(simpleMethod, element, "value-field", "delegator-name");
             MiniLangValidate.childElements(simpleMethod, element, "field-map", "select-field");
         }

Modified: ofbiz/trunk/framework/widget/dtd/widget-common.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-common.xsd?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-common.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-common.xsd Thu Feb  2 10:54:06 2017
@@ -339,7 +339,7 @@ under the License.
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" />
             </xs:sequence>
             <xs:attribute name="entity-name" type="xs:string" use="required" />
-            <xs:attribute name="value-field" type="xs:string"/>
+            <xs:attribute name="value-field" type="xs:string" use="required" />
             <xs:attribute name="use-cache" default="false">
                 <xs:simpleType>
                     <xs:restriction base="xs:token">

Modified: ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1781367&r1=1781366&r2=1781367&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Thu Feb  2 10:54:06 2017
@@ -185,7 +185,7 @@ public final class MacroFormRenderer imp
         }
         StringWriter sr = new StringWriter();
         sr.append("<@renderLabel ");
-        sr.append("text=r\"");
+        sr.append("text=\"");
         sr.append(labelText);
         sr.append("\"");
         sr.append(" />");