svn commit: r1814090 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java themes/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: r1814090 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java themes/common/widget/Theme.xml

jleroux@apache.org
Author: jleroux
Date: Thu Nov  2 15:07:48 2017
New Revision: 1814090

URL: http://svn.apache.org/viewvc?rev=1814090&view=rev
Log:
Fixed: The online help is broken
(OFBIZ-9837)

Completes r1814063

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
    ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java?rev=1814090&r1=1814089&r2=1814090&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java Thu Nov  2 15:07:48 2017
@@ -625,7 +625,7 @@ public class DataResourceWorker  impleme
             locale = Locale.getDefault();
         }
 
-        //FIXME propage correctly the theme
+        //FIXME correctly propagate the theme, then fixes also the related FIXME below
         VisualTheme visualTheme = ThemeFactory.getVisualThemeFromId("COMMON");
         ModelTheme modelTheme = visualTheme.getModelTheme();
 
@@ -682,6 +682,10 @@ public class DataResourceWorker  impleme
 
             } else if ("XSLT".equals(dataTemplateTypeId)) {
                 File targetFileLocation = new File(System.getProperty("ofbiz.home")+"/runtime/tempfiles/docbook.css");
+                // This is related with the other FIXME above: we need to correctly propagate the theme.
+                String defaultVisualThemeId = EntityUtilProperties.getPropertyValue("general", "VISUAL_THEME", delegator);
+                visualTheme = ThemeFactory.getVisualThemeFromId(defaultVisualThemeId);  
+                modelTheme = visualTheme.getModelTheme();
                 String docbookStylesheet = modelTheme.getProperty("VT_DOCBOOKSTYLESHEET").toString();
                 File sourceFileLocation = new File(System.getProperty("ofbiz.home") + "/themes" + docbookStylesheet.substring(1, docbookStylesheet.length() - 1));
                 UtilMisc.copyFile(sourceFileLocation,targetFileLocation);

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=1814090&r1=1814089&r2=1814090&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml (original)
+++ ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml Thu Nov  2 15:07:48 2017
@@ -78,12 +78,7 @@ under the License.
         <property name="VT_HDR_JAVASCRIPT['add']" value="/common/js/jquery/ui/js/jquery.cookie-1.4.0.js"/>
         <property name="VT_HDR_JAVASCRIPT['add']" value="/common/js/plugins/date/FromThruDateCheck.js"/>
         <property name="VT_HDR_JAVASCRIPT['add']" value="/flatgrey/js/application.js"/>
-        <!--Css styles-->
-        <property name="VT_STYLESHEET['add']" value="/flatgrey/style.css"/>
-        <property name="VT_STYLESHEET['add']" value="/flatgrey/javascript.css"/>
-        <property name="VT_HELPSTYLESHEET['add']" value="/flatgrey/help.css"/>
-        <property name="VT_DOCBOOKSTYLESHEET['add']" value="/flatgrey/webapp/flatgrey/docbook.css"/>
-        <property name="VT_RTL_STYLESHEET['add']" value="/flatgrey/stylertl.css"/>
+        <!--Css styles: don't load them since they differ depending on theme -->
     </theme-properties>
 
     <templates><!-- Freemarker template use by this theme to render widget model-->