svn commit: r1806740 - in /ofbiz/ofbiz-framework/trunk/themes: README.md common/template/includes/Messages.ftl common/widget/Theme.xml

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

svn commit: r1806740 - in /ofbiz/ofbiz-framework/trunk/themes: README.md common/template/includes/Messages.ftl common/widget/Theme.xml

nmalin
Author: nmalin
Date: Wed Aug 30 21:23:48 2017
New Revision: 1806740

URL: http://svn.apache.org/viewvc?rev=1806740&view=rev
Log:
Fixed: Jgrowl lost configuration with common-theme (OFBIZ-9138 Create a common theme)
I detected that the jgrowl properties with a dot has been parsed by the FlexibleMapAccesor and failed to instanciate it correctly
So I convert the properties with dot to camelCase

Modified:
    ofbiz/ofbiz-framework/trunk/themes/README.md
    ofbiz/ofbiz-framework/trunk/themes/common/template/includes/Messages.ftl
    ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml

Modified: ofbiz/ofbiz-framework/trunk/themes/README.md
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/README.md?rev=1806740&r1=1806739&r2=1806740&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/README.md (original)
+++ ofbiz/ofbiz-framework/trunk/themes/README.md Wed Aug 30 21:23:48 2017
@@ -82,10 +82,10 @@ This block contains all properties that
 ## Theme's specific properties
 This block contains all properties specific to this theme. In general these are some propreties present on ftl template, that are initialized by the theme and can be surchaged by another theme through the extends elements.
 ```xml
-        <property name="jgrowl.position" value="center" type="String"/><!--possible value: top-left, top-right, bottom-left, bottom-right, center-->
-        <property name="jgrowl.width" value="800" type="Integer"/>
-        <property name="jgrowl.height" value="" type="Integer"/>
-        <property name="jgrowl.speed" value="100" type="Integer"/>
+        <property name="jgrowlPosition" value="center" type="String"/><!--possible value: top-left, top-right, bottom-left, bottom-right, center-->
+        <property name="jgrowlWidth" value="800" type="Integer"/>
+        <property name="jgrowlHeight" value="" type="Integer"/>
+        <property name="jgrowlSpeed" value="100" type="Integer"/>
 ```
 ## Ftl macro library
 This block defines for each technology implemented by the screen engine where it can find the macro library for each model (Screen, Form, Tree, Menu)

Modified: ofbiz/ofbiz-framework/trunk/themes/common/template/includes/Messages.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/template/includes/Messages.ftl?rev=1806740&r1=1806739&r2=1806740&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/template/includes/Messages.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/common/template/includes/Messages.ftl Wed Aug 30 21:23:48 2017
@@ -17,7 +17,6 @@ specific language governing permissions
 under the License.
 -->
 <#escape x as x?html>
-<#assign modelTheme = visualTheme.getModelTheme()>
   <#if requestAttributes.errorMessageList?has_content><#assign errorMessageList=requestAttributes.errorMessageList></#if>
   <#if requestAttributes.eventMessageList?has_content><#assign eventMessageList=requestAttributes.eventMessageList></#if>
   <#if requestAttributes.serviceValidationException??><#assign serviceValidationException = requestAttributes.serviceValidationException></#if>
@@ -51,10 +50,10 @@ under the License.
       </#if>
     </div>
   </#if>
-  <#assign jGrowlPosition = modelTheme.getProperty("jgrowl.position")>
-  <#assign jGrowlWidth = modelTheme.getProperty("jgrowl.width")>
-  <#assign jGrowlHeight = modelTheme.getProperty("jgrowl.height")>
-  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowl.speed")>
+  <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
+  <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
+  <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
+  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
 
   <script>showjGrowl(
           "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
@@ -73,10 +72,10 @@ under the License.
       </#list>
     </#if>
   </div>
-  <#assign jGrowlPosition = visualTheme.getModelTheme().getProperty("jgrowl.position")>
-  <#assign jGrowlWidth = visualTheme.getModelTheme().getProperty("jgrowl.width")>
-  <#assign jGrowlHeight = visualTheme.getModelTheme().getProperty("jgrowl.height")>
-  <#assign jGrowlSpeed = visualTheme.getModelTheme().getProperty("jgrowl.speed")>
+  <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
+  <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
+  <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
+  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
   <script>showjGrowl(
           "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
           "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>

Modified: ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml?rev=1806740&r1=1806739&r2=1806740&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml (original)
+++ ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml Wed Aug 30 21:23:48 2017
@@ -44,10 +44,10 @@ under the License.
     </widget-properties>
 
     <theme-properties> <!--specific properties dedicate to this theme -->
-        <property name="jgrowl.position" value="center" type="String"/><!--possible value: top-left, top-right, bottom-left, bottom-right, center-->
-        <property name="jgrowl.width" value="800" type="Integer"/>
-        <property name="jgrowl.height" value="" type="Integer"/>
-        <property name="jgrowl.speed" value="100" type="Integer"/>
+        <property name="jgrowlPosition" value="center" type="String"/><!--possible value: top-left, top-right, bottom-left, bottom-right, center-->
+        <property name="jgrowlWidth" value="800" type="Integer"/>
+        <property name="jgrowlHeight" value="" type="Integer"/>
+        <property name="jgrowlSpeed" value="100" type="Integer"/>
         <!--template location-->
         <property name="VT_SHORTCUT_ICON" value="/images/ofbiz.ico"/>
         <property name="VT_HDR_TMPLT_LOC" value="component://flatgrey/template/Header.ftl"/><!--use flatgrey to wait the new design-->