svn commit: r790107 - in /ofbiz/trunk/themes: bizznesstime/includes/footer.ftl bizznesstime/includes/header.ftl bluelight/includes/header.ftl flatgrey/includes/footer.ftl flatgrey/includes/header.ftl multiflex/includes/footer.ftl

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

svn commit: r790107 - in /ofbiz/trunk/themes: bizznesstime/includes/footer.ftl bizznesstime/includes/header.ftl bluelight/includes/header.ftl flatgrey/includes/footer.ftl flatgrey/includes/header.ftl multiflex/includes/footer.ftl

mor-2
Author: mor
Date: Wed Jul  1 10:42:58 2009
New Revision: 790107

URL: http://svn.apache.org/viewvc?rev=790107&view=rev
Log:
String wrapped the styleSheet and javaScript context variable for themes as well.
Applied patch from Divesh Dutta, part of OFBIZ-2679 (https://issues.apache.org/jira/browse/OFBIZ-2679)

Modified:
    ofbiz/trunk/themes/bizznesstime/includes/footer.ftl
    ofbiz/trunk/themes/bizznesstime/includes/header.ftl
    ofbiz/trunk/themes/bluelight/includes/header.ftl
    ofbiz/trunk/themes/flatgrey/includes/footer.ftl
    ofbiz/trunk/themes/flatgrey/includes/header.ftl
    ofbiz/trunk/themes/multiflex/includes/footer.ftl

Modified: ofbiz/trunk/themes/bizznesstime/includes/footer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/footer.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/includes/footer.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/includes/footer.ftl Wed Jul  1 10:42:58 2009
@@ -18,7 +18,7 @@
 -->
 <#if layoutSettings.VT_FTR_JAVASCRIPT?has_content>
     <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript>
-        <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+        <script type="text/javascript" src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
     </#list>
 </#if>
 

Modified: ofbiz/trunk/themes/bizznesstime/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/header.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/includes/header.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/includes/header.ftl Wed Jul  1 10:42:58 2009
@@ -51,17 +51,17 @@
       <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/>
     </#if>
     <#if shortcutIcon?has_content>
-    <link rel="shortcut icon" href="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>" />
+    <link rel="shortcut icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>" />
     </#if>
     <#if layoutSettings.styleSheets?has_content>
         <#list layoutSettings.styleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
         </#list>
     </#if>
     <#if userLogin?has_content>
     <#if layoutSettings.VT_STYLESHEET?has_content>
         <#list layoutSettings.VT_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
         </#list>
     </#if>
     <#else>
@@ -70,12 +70,12 @@
     <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" media="screen,projection" type="text/css" charset="UTF-8"/>
         </#list>
     </#if>
     ${layoutSettings.extraHead?if_exists}
@@ -90,13 +90,13 @@
         <#list layoutSettings.javaScripts as javaScript>
             <#if javaScriptsSet.contains(javaScript)>
                 <#assign nothing = javaScriptsSet.remove(javaScript)/>
-                <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+                <script type="text/javascript" src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
             </#if>
         </#list>
     </#if>
     <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content>
         <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript>
-            <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+            <script type="text/javascript" src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
         </#list>
     </#if>
 </head>

Modified: ofbiz/trunk/themes/bluelight/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/includes/header.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/includes/header.ftl (original)
+++ ofbiz/trunk/themes/bluelight/includes/header.ftl Wed Jul  1 10:42:58 2009
@@ -33,7 +33,7 @@
       <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/>
     </#if>
     <#if shortcutIcon?has_content>
-      <link rel="shortcut icon" href="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>" />
+      <link rel="shortcut icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>" />
     </#if>
     <#if layoutSettings.javaScripts?has_content>
         <#--layoutSettings.javaScripts is a list of java scripts. -->
@@ -42,35 +42,35 @@
         <#list layoutSettings.javaScripts as javaScript>
             <#if javaScriptsSet.contains(javaScript)>
                 <#assign nothing = javaScriptsSet.remove(javaScript)/>
-                <script src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+                <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
             </#if>
         </#list>
     </#if>
     <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content>
         <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript>
-            <script src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+            <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
         </#list>
     </#if>
     <#if layoutSettings.styleSheets?has_content>
         <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.-->
         <#list layoutSettings.styleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_STYLESHEET?has_content>
         <#list layoutSettings.VT_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_EXTRA_HEAD?has_content>
@@ -113,7 +113,7 @@
         <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
           <li class="logo-area">
             <#if shortcutIcon?has_content>
-              <a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img src="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>" height="16px" width="16px"/></a>
+              <a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img src="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>" height="16px" width="16px"/></a>
             </#if>
           </li>
         <#else>
@@ -125,7 +125,7 @@
             <#assign headerImageUrl = layoutSettings.VT_HDR_IMAGE_URL.get(0)>
           </#if>
           <#if headerImageUrl?exists>
-            <li class="logo-area"><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${headerImageUrl}</@ofbizContentUrl>"/></a></li>
+            <li class="logo-area"><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${StringUtil.wrapString(headerImageUrl)}</@ofbizContentUrl>"/></a></li>
           </#if>
         </#if>
 

Modified: ofbiz/trunk/themes/flatgrey/includes/footer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/includes/footer.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/includes/footer.ftl (original)
+++ ofbiz/trunk/themes/flatgrey/includes/footer.ftl Wed Jul  1 10:42:58 2009
@@ -66,7 +66,7 @@
 </div>
 <#if layoutSettings.VT_FTR_JAVASCRIPT?has_content>
   <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript>
-    <script src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+    <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
   </#list>
 </#if>
 

Modified: ofbiz/trunk/themes/flatgrey/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/includes/header.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/includes/header.ftl (original)
+++ ofbiz/trunk/themes/flatgrey/includes/header.ftl Wed Jul  1 10:42:58 2009
@@ -32,7 +32,7 @@
       <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/>
     </#if>
     <#if shortcutIcon?has_content>
-      <link rel="shortcut icon" href="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>" />
+      <link rel="shortcut icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>" />
     </#if>
     <#if layoutSettings.javaScripts?has_content>
         <#--layoutSettings.javaScripts is a list of java scripts. -->
@@ -41,35 +41,35 @@
         <#list layoutSettings.javaScripts as javaScript>
             <#if javaScriptsSet.contains(javaScript)>
                 <#assign nothing = javaScriptsSet.remove(javaScript)/>
-                <script src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+                <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
             </#if>
         </#list>
     </#if>
     <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content>
         <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript>
-            <script src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+            <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
         </#list>
     </#if>
     <#if layoutSettings.styleSheets?has_content>
         <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.-->
         <#list layoutSettings.styleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_STYLESHEET?has_content>
         <#list layoutSettings.VT_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+            <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
     <#if layoutSettings.VT_EXTRA_HEAD?has_content>
@@ -96,7 +96,7 @@
       <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
         <li class="logo-area">
           <#if shortcutIcon?has_content>
-            <a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img src="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>"/></a>
+            <a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img src="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>"/></a>
           </#if>
         </li>
         <#if layoutSettings.topLines?has_content>
@@ -134,7 +134,7 @@
           <#assign headerImageUrl = layoutSettings.VT_HDR_IMAGE_URL.get(0)>
         </#if>
         <#if headerImageUrl?exists>
-          <li class="logo-area"><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${headerImageUrl}</@ofbizContentUrl>"/></a></li>
+          <li class="logo-area"><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${StringUtil.wrapString(headerImageUrl)}</@ofbizContentUrl>"/></a></li>
         </#if>
         <li width=20/>
         <#if layoutSettings.middleTopMessage1?has_content && layoutSettings.middleTopMessage1 != " ">

Modified: ofbiz/trunk/themes/multiflex/includes/footer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/multiflex/includes/footer.ftl?rev=790107&r1=790106&r2=790107&view=diff
==============================================================================
--- ofbiz/trunk/themes/multiflex/includes/footer.ftl (original)
+++ ofbiz/trunk/themes/multiflex/includes/footer.ftl Wed Jul  1 10:42:58 2009
@@ -26,7 +26,7 @@
   </p>
   <#if layoutSettings.VT_FTR_JAVASCRIPT?has_content>
     <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript>
-      <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+      <script type="text/javascript" src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script>
     </#list>
   </#if>
 </div>