You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2018/12/14 10:32:46 UTC

svn commit: r1848921 - in /ofbiz/ofbiz-plugins/trunk/ecommerce/widget: CommonScreens.xml Theme.xml

Author: deepak
Date: Fri Dec 14 10:32:46 2018
New Revision: 1848921

URL: http://svn.apache.org/viewvc?rev=1848921&view=rev
Log:
Fixed: visual-editor not working on ecommerce (OFBIZ-10708)
The main issue was in js file loading, jQuery is being initialised twice thus eltre might not be available in the prototype of reinitialised jQuery object.
Thanks Aditya Sharama for the discussion

Modified:
    ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml
    ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml?rev=1848921&r1=1848920&r2=1848921&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml Fri Dec 14 10:32:46 2018
@@ -37,33 +37,11 @@ under the License.
                 <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/>
                 <script location="component://common/groovyScripts/InitTheme.groovy"/>
 
-                <!-- The default (global) shortcut icon -->
-                <set field="layoutSettings.shortcutIcon" value="/images/ofbiz.ico" global="true"/>
-
                 <!-- The default (main) java scripts -->
                 <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: -->
-                <set field="layoutSettings.javaScripts[]" value="/common/js/util/OfbizUtil.js" global="true"/>
                 <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
                 <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.apache.ofbiz.common.JsLanguageFilesMapping.dateTime.getFilePath(initialLocaleComplete)}" global="true"/>
 
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.6.3.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/ui/jquery-ui-1.12.1.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/validate/additional-methods.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/validate/jquery.validate.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/browser-plugin/jquery.browser-0.1.0.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-migrate-3.0.0.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-3.2.1.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" value="/common/js/jquery/plugins/Readmore.js-master/readmore.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" value="/common/js/jquery/plugins/jquery-jgrowl/jquery.jgrowl-1.4.6.min.js" global="true"/>
-                
-                <set field="layoutSettings.styleSheets[+0]" value="/common/js/jquery/ui/jquery-ui-1.12.1.min.css" global="true" />
-                <set field="layoutSettings.styleSheets[+0]" value="/common/js/jquery/plugins/jquery-jgrowl/jquery.jgrowl-1.4.6.min.css" global="true" />
-                <set field="layoutSettings.styleSheets[+0]" value="/common/js/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.6.3.min.css" global="true" />
-
-                <set field="layoutSettings.styleSheets[+0]" value="/ecommerce/css/bootstrap.min.css" global="true" />
-                <set field="layoutSettings.javaScripts[]" value="/ecommerce/js/bootstrap.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" value="/ecommerce/js/bootstrap.bundle.min.js" global="true"/>
-
                 <!-- Get the store VisualTheme -->
                 <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC" default-value="component://ecommerce/template/includes/Header.ftl"/>
                 <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC" default-value="component://ecommerce/template/includes/Footer.ftl"/>
@@ -260,19 +238,6 @@ under the License.
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
 
                 <set field="MainColumnStyle" value="nocolumns" global="true"/>
-
-                <!-- The default (global) shortcut icon -->
-                <set field="layoutSettings.shortcutIcon" value="/images/ofbiz.ico" global="true"/>
-
-                <!-- The default (main) java scripts -->
-                <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: -->
-                <set field="layoutSettings.javaScripts[]" value="/common/js/util/OfbizUtil.js" global="true"/>
-
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/validate/jquery.validate.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-3.2.1.min.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-migrate-3.0.0.min.js" global="true" />
-                <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/browser-plugin/jquery.browser-0.1.0.min.js" global="true"/>
-
                 <script location="component://ecommerce/groovyScripts/EcommerceSetup.groovy"/>
 
                 <!-- Get the store VisualTheme -->

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml?rev=1848921&r1=1848920&r2=1848921&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Fri Dec 14 10:32:46 2018
@@ -31,10 +31,20 @@ under the License.
     <extends location="component://common-theme/widget/Theme.xml"/>
 
     <theme-properties>
+
+        <property name="VT_HDR_JAVASCRIPT['add']" value="/common/js/jquery/plugins/validate/additional-methods.min.js"/>
+        <property name="VT_HDR_JAVASCRIPT['add']" value="/common/js/jquery/plugins/Readmore.js-master/readmore.js"/>
+        <property name="VT_HDR_JAVASCRIPT['add']" value="/common/js/jquery/plugins/jquery-jgrowl/jquery.jgrowl-1.4.6.min.js"/>
+        <property name="VT_HDR_JAVASCRIPT['add']" value="/ecommerce/js/bootstrap.min.js"/>
+        <property name="VT_HDR_JAVASCRIPT['add']" value="/ecommerce/js/bootstrap.bundle.min.js"/>
+
         <!--Css style-->
+        <property name="VT_STYLESHEET['add']" value="/ecommerce/css/bootstrap.min.css"/>
+        <property name="VT_STYLESHEET['add']" value="/common/js/jquery/plugins/jquery-jgrowl/jquery.jgrowl-1.4.6.min.css"/>
+        <property name="VT_STYLESHEET['add']" value="/contentimages/css/contentForum.css"/>
         <property name="VT_STYLESHEET['add']" value="/ecommerce/images/blog.css"/>
         <property name="VT_STYLESHEET['add']" value="/ecommerce/css/custom.css"/>
-        <property name="VT_STYLESHEET['add']" value="/contentimages/css/contentForum.css"/>
+
         <!--header image -->
         <property name="VT_HDR_IMAGE_URL" value="/images/ofbiz_logo.png"/>
         <property name="VT_SHORTCUT_ICON" value="/images/favicon"/>