svn commit: r1801278 - in /ofbiz/ofbiz-framework/trunk/themes: bluelight/template/ flatgrey/template/ rainbowstone/template/ rainbowstone/template/includes/ tomahawk/template/

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

svn commit: r1801278 - in /ofbiz/ofbiz-framework/trunk/themes: bluelight/template/ flatgrey/template/ rainbowstone/template/ rainbowstone/template/includes/ tomahawk/template/

Arun Patidar-4
Author: arunpatidar
Date: Sat Jul  8 11:03:07 2017
New Revision: 1801278

URL: http://svn.apache.org/viewvc?rev=1801278&view=rev
Log:
Improved: Inconsistent String Comparisons. (OFBIZ-9254).

Thanks Devanshu Vyas for your contribution

Modified:
    ofbiz/ofbiz-framework/trunk/themes/bluelight/template/Header.ftl
    ofbiz/ofbiz-framework/trunk/themes/flatgrey/template/Header.ftl
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/ChangePassword.ftl
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Header.ftl
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/HomeMenu.ftl
    ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/AppBarClose.ftl
    ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/Header.ftl

Modified: ofbiz/ofbiz-framework/trunk/themes/bluelight/template/Header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/bluelight/template/Header.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/bluelight/template/Header.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/bluelight/template/Header.ftl Sat Jul  8 11:03:07 2017
@@ -65,13 +65,13 @@ under the License.
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
+    <#if layoutSettings.rtlStyleSheets?has_content && "rtl" == langDir>
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
+    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && "rtl" == langDir>
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
@@ -124,7 +124,7 @@ under the License.
     </div>
     <div id="masthead">
       <ul>
-        <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
+        <#if "Y" == (userPreferences.COMPACT_HEADER)?default("N")>
             <#if shortcutIcon?has_content>
                 <#if organizationLogoLinkURL?has_content>
                     <li><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${StringUtil.wrapString(organizationLogoLinkURL)}</@ofbizContentUrl>" height="16px" width="16px"></a></li>
@@ -192,7 +192,7 @@ under the License.
               <li><a class="help-link <#if pageAvail?has_content> alert</#if>" href="javascript:lookup_popup1('showHelp?helpTopic=${helpTopic}&amp;portalPageId=${parameters.portalPageId!}','help' ,500,500);" title="${uiLabelMap.CommonHelp}"></a></li>
             </#if>
             <#if userLogin??>
-              <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
+              <#if "Y" == (userPreferences.COMPACT_HEADER)?default("N")>
                 <li class="collapsed"><a href="javascript:document.setUserPreferenceCompactHeaderN.submit()">&nbsp;&nbsp;</a>
                 <form name="setUserPreferenceCompactHeaderN" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>">
                     <input type="hidden" name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>

Modified: ofbiz/ofbiz-framework/trunk/themes/flatgrey/template/Header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/flatgrey/template/Header.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/flatgrey/template/Header.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/flatgrey/template/Header.ftl Sat Jul  8 11:03:07 2017
@@ -61,13 +61,13 @@ under the License.
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
+    <#if layoutSettings.rtlStyleSheets?has_content && "rtl" == langDir>
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
+    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && "rtl" == langDir>
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>

Modified: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/ChangePassword.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/ChangePassword.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/ChangePassword.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/ChangePassword.ftl Sat Jul  8 11:03:07 2017
@@ -38,7 +38,7 @@ under the License.
           <td class="label">${uiLabelMap.CommonUsername}</td>
           <td>${username}</td>
         </tr>
-        <#if forgotPwdFlag?has_content && forgotPwdFlag?string == "true">
+        <#if forgotPwdFlag?has_content && "true" == forgotPwdFlag?string>
           <tr>
             <td><input type="hidden" name="PASSWORD" value="${parameters.password!}" size="20"/></td>
           </tr>

Modified: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl Sat Jul  8 11:03:07 2017
@@ -26,10 +26,10 @@
             <a id="user-lang" href="<@ofbizUrl>ListLocales</@ofbizUrl>">
             <#assign userLang = locale.toString()>
             <#assign flagLang = locale.toString()?keep_after_last("_")>
-            <#if userLang == "en"><#assign flagLang = "GB"></#if>
-            <#if userLang == "fr"><#assign flagLang = "FR"></#if>
-            <#if userLang == "zh"><#assign flagLang = "SG"></#if>
-            <#if userLang == "th"><#assign flagLang = "TH"></#if>
+            <#if "en" == userLang><#assign flagLang = "GB"></#if>
+            <#if "fr" == userLang><#assign flagLang = "FR"></#if>
+            <#if "zh" == userLang><#assign flagLang = "SG"></#if>
+            <#if "th" == userLang><#assign flagLang = "TH"></#if>
                 <span class="flag-icon flag-icon-<#if userLang?size <= 2>${userLang}<#else>${flagLang?lower_case}</#if>"><#if userLang?size <= 2>${userLang}<#else>${flagLang}</#if></span>
             </a>
         </div>

Modified: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Header.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Header.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Header.ftl Sat Jul  8 11:03:07 2017
@@ -66,13 +66,13 @@ under the License.
         <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
     </#list>
 </#if>
-<#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
+<#if layoutSettings.rtlStyleSheets?has_content && "rtl" == langDir>
 <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
     <#list layoutSettings.rtlStyleSheets as styleSheet>
         <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
     </#list>
 </#if>
-<#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
+<#if layoutSettings.VT_RTL_STYLESHEET?has_content && "rtl" == langDir>
     <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
         <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
     </#list>

Modified: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/HomeMenu.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/HomeMenu.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/HomeMenu.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/HomeMenu.ftl Sat Jul  8 11:03:07 2017
@@ -85,7 +85,7 @@ under the License.
             <img id="homeGlyph" src="/rainbowstone/images/home.svg" alt="Home">
             <span id="homePageTitle">Home Page</span>
             <label class="main-bar-label">${uiLabelMap.EmbiHomeMenuDisplayAllMenu}</label>
-            <input id="showHideBtn" type="checkbox" class="nrd-chkbox" <#if displayFavorites == "true">checked</#if> onchange="showHideFavorites()">
+            <input id="showHideBtn" type="checkbox" class="nrd-chkbox" <#if "true" == displayFavorites>checked</#if> onchange="showHideFavorites()">
             <label for="showHideBtn"></label>
             <label class="main-bar-label">${uiLabelMap.EmbiHomeMenuDisplayFavorites}</label>
         </div> <!-- main-nav-bar-left -->
@@ -107,7 +107,7 @@ under the License.
                     <#assign tileNumber = tileNumber+1>
                     <#assign isComponentEmpty=false>
                     <#assign menuTitle = Static["org.apache.ofbiz.base.util.string.FlexibleStringExpander"].expandString(itemMenu.menuTitle, context)/>
-                    <li  id="Tile${tileNumber}" class="hp-menu-item <#if itemMenu.favorite == "white">normalItem<#else>favoriteItem</#if>">
+                    <li  id="Tile${tileNumber}" class="hp-menu-item <#if "white" == itemMenu.favorite>normalItem<#else>favoriteItem</#if>">
                         <a href="${itemMenu.urlLink}" class="menu-link" title="${itemMenu.menuTitle}">${menuTitle}</a>
                         <a href="javascript:addToFavorite('Tile${tileNumber}', '${itemMenu.urlLink}')" title="${uiLabelMap.ClicToAddInFavorite}">
                             <img id='imgTile${tileNumber}' class="star-link" src="/rainbowstone/images/star-${itemMenu.favorite}.svg">

Modified: ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/AppBarClose.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/AppBarClose.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/AppBarClose.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/AppBarClose.ftl Sat Jul  8 11:03:07 2017
@@ -53,7 +53,7 @@ under the License.
 <div id="control-area">
   <ul id="preferences-menu">
     <#if userLogin??>
-      <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
+      <#if "Y" == (userPreferences.COMPACT_HEADER)?default("N")>
         <li class="collapsed"><a href="javascript:document.setUserPreferenceCompactHeaderN.submit()">&nbsp;</a>
           <form name="setUserPreferenceCompactHeaderN" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>">
             <input type="hidden" name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>

Modified: ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/Header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/Header.ftl?rev=1801278&r1=1801277&r2=1801278&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/Header.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/tomahawk/template/Header.ftl Sat Jul  8 11:03:07 2017
@@ -66,13 +66,13 @@ under the License.
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
+    <#if layoutSettings.rtlStyleSheets?has_content && "rtl" == langDir>
         <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
         <#list layoutSettings.rtlStyleSheets as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
     </#if>
-    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
+    <#if layoutSettings.VT_RTL_STYLESHEET?has_content && "rtl" == langDir>
         <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
             <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/>
         </#list>
@@ -107,7 +107,7 @@ under the License.
         ${uiLabelMap.CommonSkipNavigation}
       </a>
     </div>
-    <#if (userPreferences.COMPACT_HEADER)?default("N") == "N">
+    <#if "N" == (userPreferences.COMPACT_HEADER)?default("N")>
       <div id="masthead">
         <ul>
           <#if layoutSettings.headerImageUrl??>