svn commit: r1811116 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: data/EcommerceTypeData.xml template/includes/Header.ftl template/includes/HeaderHead.ftl widget/CommonScreens.xml 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: r1811116 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: data/EcommerceTypeData.xml template/includes/Header.ftl template/includes/HeaderHead.ftl widget/CommonScreens.xml widget/Theme.xml

Deepak Dixit-5
Author: deepak
Date: Wed Oct  4 18:15:40 2017
New Revision: 1811116

URL: http://svn.apache.org/viewvc?rev=1811116&view=rev
Log:
Fixed: Added EC_DEFAULT as theme for ecommerce. (OFBIZ-9805)

Added:
    ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml   (with props)
Modified:
    ofbiz/ofbiz-plugins/trunk/ecommerce/data/EcommerceTypeData.xml
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/Header.ftl
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
    ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/data/EcommerceTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/data/EcommerceTypeData.xml?rev=1811116&r1=1811115&r2=1811116&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/data/EcommerceTypeData.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/data/EcommerceTypeData.xml Wed Oct  4 18:15:40 2017
@@ -21,6 +21,7 @@ under the License.
 <entity-engine-xml>
     <!-- Ecommerce Default Visual Theme -->
     <VisualTheme visualThemeId="EC_DEFAULT" visualThemeSetId="ECOMMERCE" description="OFBiz Ecommerce Standard Floating Layout"/>
+    <delete>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/ecommerce/images/blog.css" sequenceId="01"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/ecommain.css" sequenceId="02"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/content/contentForum.css" sequenceId="03"/>
@@ -29,4 +30,5 @@ under the License.
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://ecommerce/template/includes/Header.ftl" sequenceId="06"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://ecommerce/template/includes/Footer.ftl" sequenceId="07"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/images/ecdefaulttheme.jpg" sequenceId="08"/>
+    </delete>
 </entity-engine-xml>

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/Header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/Header.ftl?rev=1811116&r1=1811115&r2=1811116&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/Header.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/Header.ftl Wed Oct  4 18:15:40 2017
@@ -25,7 +25,7 @@ under the License.
     <#elseif catalogHeaderLogo??>
       <img src="<@ofbizContentUrl>${catalogHeaderLogo}</@ofbizContentUrl>" alt="Logo"/>
     <#elseif layoutSettings.VT_HDR_IMAGE_URL?has_content>
-      <img src="<@ofbizContentUrl>${layoutSettings.VT_HDR_IMAGE_URL.get(0)}</@ofbizContentUrl>" alt="Logo"/>
+      <img src="<@ofbizContentUrl>${layoutSettings.VT_HDR_IMAGE_URL}</@ofbizContentUrl>" alt="Logo"/>
     </#if>
   </div>
   <div id="right">

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl?rev=1811116&r1=1811115&r2=1811116&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl Wed Oct  4 18:15:40 2017
@@ -28,7 +28,7 @@ under the License.
     : ${(productStore.storeName)!}
   </title>
   <#if layoutSettings.VT_SHORTCUT_ICON?has_content>
-    <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/>
+    <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON/>
   <#elseif layoutSettings.shortcutIcon?has_content>
     <#assign shortcutIcon = layoutSettings.shortcutIcon/>
   </#if>

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml?rev=1811116&r1=1811115&r2=1811116&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/CommonScreens.xml Wed Oct  4 18:15:40 2017
@@ -56,11 +56,7 @@ under the License.
 
                 <!-- Get the store VisualTheme -->
                 <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/>
-                <service service-name="getVisualThemeResources">
-                    <field-map field-name="visualThemeId"/>
-                    <field-map field-name="themeResources" from-field="layoutSettings"/>
-                </service>
-                <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
+                <script location="component://common/groovyScripts/InitTheme.groovy"/>
                 <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://ecommerce/template/includes/Header.ftl"/>
                 <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/template/includes/Footer.ftl"/>
                 <entity-and entity-name="WebAnalyticsConfig" list="webAnalyticsConfigs">
@@ -273,11 +269,8 @@ under the License.
 
                 <!-- Get the store VisualTheme -->
                 <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/>
-                <service service-name="getVisualThemeResources">
-                    <field-map field-name="visualThemeId"/>
-                    <field-map field-name="themeResources" from-field="layoutSettings"/>
-                </service>
-                <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
+                <script location="component://common/groovyScripts/InitTheme.groovy"/>
+
             </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://ecommerce/template/includes/HeaderHead.ftl"/></html></platform-specific>

Added: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml?rev=1811116&view=auto
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (added)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Wed Oct  4 18:15:40 2017
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<theme name="ec_default"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns="http://ofbiz.apache.org/Widget-Theme" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Theme http://ofbiz.apache.org/dtds/widget-theme.xsd">
+    <visual-themes>
+        <visual-theme id="EC_DEFAULT" display-name="Ecommerce Default">
+            <description>${str:label('CommonEntityLabels', 'VisualTheme.description.EC_DEFAULT', locale)}</description>
+            <screenshot location="/images/ecdefaulttheme.jpg"/>
+        </visual-theme>
+    </visual-themes>
+    <!-- Here we can define custom theme for ecommerce, no need to extend common theme -->
+    <extends location="component://common-theme/widget/Theme.xml"/>
+
+    <theme-properties>
+        <!--Css style-->
+        <property name="VT_STYLESHEET['add']" value="/ecommerce/images/blog.css"/>
+        <property name="VT_STYLESHEET['add']" value="/images/ecommain.css"/>
+        <property name="VT_STYLESHEET['add']" value="/content/contentForum.css"/>
+        <!--header image -->
+        <property name="VT_HDR_IMAGE_URL" value="/images/ofbiz_logo.gif"/>
+        <property name="VT_SHORTCUT_ICON" value="/images/ofbiz.ico"/>
+        <!--template location-->
+        <property name="VT_HDR_TMPLT_LOC" value="component://ecommerce/template/includes/Header.ftl"/>
+        <property name="VT_FTR_TMPLT_LOC" value="component://ecommerce/template/includes/Footer.ftl"/>
+    </theme-properties>
+</theme>
\ No newline at end of file

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml