Fixed issue 16803: Now generateSprite=yes works ok with skin modules
authorDavid Baz Fayos <david.baz@openbravo.com>
Wed, 20 Apr 2011 21:04:52 +0200
changeset 11628 2cf00ce58e7d
parent 11627 82b4f54084e5
child 11629 4a6414a2e680
Fixed issue 16803: Now generateSprite=yes works ok with skin modules
modules/org.openbravo.userinterface.skin.250to300Comp/web/org.openbravo.userinterface.skin.250to300Comp/skins/250to300Comp/Openbravo_ERP_250.css
src-trl/src/org/openbravo/translate/RTLSkin.java
src/build.xml
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/web/org.openbravo.userinterface.skin.250to300Comp/skins/250to300Comp/Openbravo_ERP_250.css	Wed Apr 20 17:23:35 2011 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/web/org.openbravo.userinterface.skin.250to300Comp/skins/250to300Comp/Openbravo_ERP_250.css	Wed Apr 20 21:04:52 2011 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -304,23 +304,23 @@
 }
 
 tr.DataGrid_Body_Row_Even, tr.DataGrid_Body_Row_1 {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: repeat; sprite-margin-bottom: 30px; */
+  background-image: none;
   background-color: #FFFFFF;
 }
 
 tr.DataGrid_Body_Row_Odd, tr.DataGrid_Body_Row_0 {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: repeat; sprite-margin-bottom: 30px; */
+  background-image: none;
   background-color: #F5F5F5;
 }
 
 tr.DataGrid_Body_Row_focus {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: repeat; sprite-margin-bottom: 30px; */
+  background-image: none;
   background-color: #FFBA6E;
   color: #000000;
 }
 
 tr.DataGrid_Body_Row_selected {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: repeat; sprite-margin-bottom: 30px; */
+  background-image: none;
   background-color: #B8D587;
   color: #000000;
 }
@@ -374,7 +374,7 @@
   font-family: arial, sans-serif !important;
   font-size: 12px !important;
   color: #000000 !important;
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: repeat; sprite-margin-bottom: 30px; */
+  background-image: none;
   background-color: #FFE1C0;
 }
 
@@ -550,7 +550,7 @@
 }
 
 a.LabelLink_focus {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
   color: #333333;
   border-color: #FA962F;
 }
@@ -1309,13 +1309,13 @@
 }
 
 a.Main_ToolBar_Button:hover {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
   background-color: #3a6b01;
   border: 1px solid #74a23f;
 }
 
 a.Main_ToolBar_Button:active {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
   background-color: #2C4E00;
   border: 1px solid #74a23f;
 }
@@ -1332,7 +1332,7 @@
   margin-right: 2px;
   width: 28px;
   height: 28px;
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
   background-color: #2C4E00;
   border: 1px solid #74a23f;
 }
@@ -1353,12 +1353,12 @@
 }
 
 a.Main_ToolBar_Button_Selected:hover {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
   border: 1px solid #74a23f;
 }
 
 a.Main_ToolBar_Button_Selected:active {
-  background-image: none;  /** sprite-ref: xxspritexx_V; sprite-alignment-ltr: left; */
+  background-image: none;
 }
 
 a.Main_ToolBar_Button_Selected:focus {
--- a/src-trl/src/org/openbravo/translate/RTLSkin.java	Wed Apr 20 17:23:35 2011 +0200
+++ b/src-trl/src/org/openbravo/translate/RTLSkin.java	Wed Apr 20 21:04:52 2011 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -85,6 +85,7 @@
         File fImagesToFlip;
         BufferedReader in;
         String line;
+        File fileLTRSrcDeep, fileRTLSrcDeep;
 
         for (int i = 0; i < files.length; i++) {
             String pathModule = "";
@@ -125,20 +126,18 @@
                 vImagesToFlip.add(line.toLowerCase());
             }
             in.close();
-            if (pathModule != "") {
-                log4j.info("It is a module skin.");
-                runFolders(new File(pathModule), files[i], "", "RTL");
-                pathModule = "";
-            } else {
-                runFolders(fileRTLSrc, files[i], "", "RTL");
-            }
 
+            log4j.info("Processing RTL skin " + files[i]);
+            fileRTLSrcDeep = new File(srcDirRTLSkin + "/" + files[i], "");
+            runFolders(fileRTLSrcDeep, files[i], "", "RTL");
         }
 
         files = fileLTRSrc.list();
+
         for (int i = 0; i < files.length; i++) {
             log4j.info("Processing LTR skin " + files[i]);
-            runFolders(fileLTRSrc, files[i], "", "LTR");
+            fileLTRSrcDeep = new File(srcDirLTRSkin + "/" + files[i], "");
+            runFolders(fileLTRSrcDeep, files[i], "", "LTR");
         }
 
         log4j.info("Modified files: " + count);
--- a/src/build.xml	Wed Apr 20 17:23:35 2011 +0200
+++ b/src/build.xml	Wed Apr 20 21:04:52 2011 +0200
@@ -13,7 +13,7 @@
  * and  limitations under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2005-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2005-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s): Openbravo S.L.U.
  ************************************************************************
@@ -687,8 +687,7 @@
     <smartsprites rootdir="${skins.location}" documentrootdir="${skins.location}" outputdir="${skins.location}" cssfilesuffix="-sprite" csspropertyindent="  " loglevel="WARN" spritepngdepth="DIRECT" spritepngie6="false" />
     <move todir="${skins.location}">
       <fileset dir="${skins.location}">
-        <include name="*/*-sprite.css" />
-        <include name="*/*/*-sprite.css" />
+        <include name="**/*-sprite.css" />
       </fileset>
       <mapper type="glob" from="*-sprite.css" to="*.css" />
     </move>