svn commit: r746544 - in /ofbiz/trunk: applications/ecommerce/data/ applications/ecommerce/webapp/ecommerce/includes/ applications/ecommerce/widget/ applications/product/config/ applications/product/entitydef/ applications/product/webapp/catalog/store/...

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

svn commit: r746544 - in /ofbiz/trunk: applications/ecommerce/data/ applications/ecommerce/webapp/ecommerce/includes/ applications/ecommerce/widget/ applications/product/config/ applications/product/entitydef/ applications/product/webapp/catalog/store/...

buscob
Author: buscob
Date: Sat Feb 21 17:18:25 2009
New Revision: 746544

URL: http://svn.apache.org/viewvc?rev=746544&view=rev
Log:
VisualThemes for Ecommerce (https://issues.apache.org/jira/browse/OFBIZ-2106)

The ProductStore entity has now a visualThemeId that selects the VisualTheme to be used in the Ecommerce.
This can be set in the EditProductStore form selecting a theme between the themes that belong to the "ECOMMERCE" VisualThemeSet

To the following ProductStore fields has been applied the entity deprecation pattern:
<field name="oldStyleSheet" col-name="STYLE_SHEET" type="url"></field>
<field name="oldHeaderLogo" col-name="HEADER_LOGO" type="url"></field>
<field name="oldHeaderMiddleBackground" col-name="HEADER_MIDDLE_BACKGROUND" type="url"></field>
<field name="oldHeaderRightBackground" col-name="HEADER_RIGHT_BACKGROUND" type="url"></field>

The first part of the ecommerce header.ftl (the part defining the <HEAD> tag content) has been moved to a new headerHead.ftl file. This allows all the theme defined header.ftl to include this common part that is mainly inclusion of theme defined resources and should never change (code reuse).

Added:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/headerHead.ftl
Modified:
    ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
    ofbiz/trunk/applications/ecommerce/data/DemoRentalProduct.xml
    ofbiz/trunk/applications/ecommerce/data/EcommerceTypeData.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/footer.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/header.ftl
    ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
    ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml Sat Feb 21 17:18:25 2009
@@ -57,7 +57,7 @@
         authFraudMessage="Your order has been rejected and your account has been disabled due to fraud."
         authErrorMessage="Problem connecting to payment processor; we will continue to retry and notify you by email."
         storeCreditValidDays="90"
-        styleSheet="/images/ecommain.css" headerLogo="/images/ofbiz_logo.jpg" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
+        visualThemeId="EC_DEFAULT" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
     
     <!-- <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="testRandomAuthorize"/> -->
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="alwaysApproveCCProcessor"/>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoRentalProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoRentalProduct.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoRentalProduct.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoRentalProduct.xml Sat Feb 21 17:18:25 2009
@@ -28,7 +28,12 @@
         authDeclinedMessage="There has been a problem with your method of payment. Please try a different method or call customer service."
         authFraudMessage="Your order has been rejected and your account has been disabled due to fraud."
         authErrorMessage="Problem connecting to payment processor; we will continue to retry and notify you by email."
-        styleSheet="/images/ecommain.css" headerLogo="/images/opentravelsystem_logo.jpg" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
+        visualThemeId="EC_DEFAULT" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
+
+<!-- Note: 20092102 BB - Introducing the visualThemeId we have actually missed this headerLogo setting
+headerLogo="/images/opentravelsystem_logo.jpg"
+-->
+
     <ProductStorePaymentSetting productStoreId="RentalStore" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="alwaysApproveCCProcessor"/>
     <ProductStorePaymentSetting productStoreId="RentalStore" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_RELEASE" paymentService="testCCRelease"/>
     <ProductStorePaymentSetting productStoreId="RentalStore" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_CAPTURE" paymentService="testCCCapture"/>

Modified: ofbiz/trunk/applications/ecommerce/data/EcommerceTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/EcommerceTypeData.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/EcommerceTypeData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/EcommerceTypeData.xml Sat Feb 21 17:18:25 2009
@@ -24,7 +24,10 @@
     
     <!-- Ecommerce Default Visual Theme -->
     <VisualTheme visualThemeId="EC_DEFAULT" visualThemeSetId="ECOMMERCE" description="OFBiz Ecommerce Standard Floating Layout"/>
-    <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/ecommain.css" sequenceId="01"/>
+    <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="/images/prototypejs/popup.css" sequenceId="03"/>
+    <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/content/images/contentForum.css" sequenceId="04"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.jpg" sequenceId="01"/>
     <VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://ecommerce/webapp/ecommerce/includes/header.ftl" sequenceId="01"/>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/footer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/footer.ftl?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/footer.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/footer.ftl Sat Feb 21 17:18:25 2009
@@ -19,17 +19,17 @@
 
 <#assign nowTimestamp = Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()>
 
-<br/>
-<div align="center">
+  <br/>
+  <div align="center">
     <a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="<@ofbizContentUrl>/images/vcss.gif</@ofbizContentUrl>" alt="Valid CSS!"/></a>
     <a href="http://validator.w3.org/check?uri=referer"><img style="border:0;width:88px;height:31px" src="<@ofbizContentUrl>/images/valid-xhtml10.png</@ofbizContentUrl>" alt="Valid XHTML 1.0!"/></a>
-</div>
-<br/>
-<div class="tabletext" align="center">
+  </div>
+  <br/>
+  <div class="tabletext" align="center">
     <div class="tabletext">Copyright (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" class="tabletext" target="_blank">www.apache.org</a></div>
     <div class="tabletext">Powered by <a href="http://ofbiz.apache.org" class="tabletext" target="_blank">Apache OFBiz</a></div>
-</div>
-<br/>
-<div class="tabletext" align="center"><a href="<@ofbizUrl>policies</@ofbizUrl>">${uiLabelMap.EcommerceSeeStorePoliciesHere}</a></div>
+  </div>
+  <br/>
+  <div class="tabletext" align="center"><a href="<@ofbizUrl>policies</@ofbizUrl>">${uiLabelMap.EcommerceSeeStorePoliciesHere}</a></div>
 </body>
 </html>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/header.ftl?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/header.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/header.ftl Sat Feb 21 17:18:25 2009
@@ -16,105 +16,61 @@
 specific language governing permissions and limitations
 under the License.
 -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<#-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -->
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title><#if title?has_content>${title}<#elseif titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if>: ${(productStore.storeName)?if_exists}</title>
-    <#if layoutSettings.shortcutIcon?has_content>
-      <link rel="shortcut icon" href="<@ofbizContentUrl>${layoutSettings.shortcutIcon}</@ofbizContentUrl>" />    
-    </#if>
-    <#if layoutSettings.javaScripts?has_content>
-        <#--layoutSettings.javaScripts is a list of java scripts. -->
-        <#list layoutSettings.javaScripts as javaScript>
-            <script language="javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
-        </#list>
-    </#if>
-    <#if layoutSettings.styleSheets?has_content>
-        <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.-->
-        <#list layoutSettings.styleSheets as styleSheet>
-            <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
-        </#list>
-    </#if>
-
-    <#-- Append CSS for catalog -->
-    <#if catalogStyleSheet?exists>
-        <link rel="stylesheet" href="${catalogStyleSheet}" type="text/css"/>
-    </#if>
-    <#-- Append CSS for tracking codes -->
-    <#if sessionAttributes.overrideCss?exists>
-        <link rel="stylesheet" href="${sessionAttributes.overrideCss}" type="text/css"/>
-    </#if>
-    <#-- Meta tags if defined by the page action -->
-    <#if metaDescription?exists>
-        <meta name="description" content="${metaDescription}"/>
-    </#if>
-    <#if metaKeywords?exists>
-        <meta name="keywords" content="${metaKeywords}"/>
-    </#if>
-    
-    <#if requireDojo?exists>
-        <script type="text/javascript">
-          dojo.require("dojo.widget.*");    
-        </script>  
-    </#if>
-</head>
+<#include "component://ecommerce/webapp/ecommerce/includes/headerHead.ftl" />
 
 <body>
-
-<div id="ecom-header">
+  <div id="ecom-header">
     <div id="left">
-        <#if sessionAttributes.overrideLogo?exists>
-            <img src="<@ofbizContentUrl>${sessionAttributes.overrideLogo}</@ofbizContentUrl>" alt="Logo"/>
-        <#elseif catalogHeaderLogo?exists>
-            <img src="<@ofbizContentUrl>${catalogHeaderLogo}</@ofbizContentUrl>" alt="Logo"/>
-        <#elseif (productStore.headerLogo)?has_content>
-            <img src="<@ofbizContentUrl>${productStore.headerLogo}</@ofbizContentUrl>" alt="Logo"/>
-        </#if>
+      <#if sessionAttributes.overrideLogo?exists>
+        <img src="<@ofbizContentUrl>${sessionAttributes.overrideLogo}</@ofbizContentUrl>" alt="Logo"/>
+      <#elseif catalogHeaderLogo?exists>
+        <img src="<@ofbizContentUrl>${catalogHeaderLogo}</@ofbizContentUrl>" alt="Logo"/>
+      <#elseif (productStore.headerLogo)?has_content>
+        <img src="<@ofbizContentUrl>${productStore.headerLogo}</@ofbizContentUrl>" alt="Logo"/>
+      </#if>
     </div>
-    <div id="right"<#if (productStore.headerRightBackground)?has_content> style="background-image: <@ofbizContentUrl>${productStore.headerRightBackground}</@ofbizContentUrl>;"</#if>>
-        ${screens.render("component://ecommerce/widget/CartScreens.xml#microcart")}
+    <div id="right">
+      ${screens.render("component://ecommerce/widget/CartScreens.xml#microcart")}
     </div>
-    <div id="middle"<#if (productStore.headerMiddleBackground)?has_content> style="background-image: <@ofbizContentUrl>${productStore.headerMiddleBackground}</@ofbizContentUrl>;"</#if>>
-        <#if !productStore?exists>
-            <h2>${uiLabelMap.EcommerceNoProductStore}</h2>
+    <div id="middle">
+      <#if !productStore?exists>
+        <h2>${uiLabelMap.EcommerceNoProductStore}</h2>
+      </#if>
+      <#if (productStore.title)?exists><div id="company-name">${productStore.title}</div></#if>
+      <#if (productStore.subtitle)?exists><div id="company-subtitle">${productStore.subtitle}</div></#if>
+      <div id="welcome-message">
+        <#if sessionAttributes.autoName?has_content>
+          ${uiLabelMap.CommonWelcome}&nbsp;${sessionAttributes.autoName?html}!
+          (${uiLabelMap.CommonNotYou}?&nbsp;<a href="<@ofbizUrl>autoLogout</@ofbizUrl>" class="linktext">${uiLabelMap.CommonClickHere}</a>)
+        <#else/>
+          ${uiLabelMap.CommonWelcome}!
         </#if>
-        <#if (productStore.title)?exists><div id="company-name">${productStore.title}</div></#if>
-        <#if (productStore.subtitle)?exists><div id="company-subtitle">${productStore.subtitle}</div></#if>
-        <div id="welcome-message">
-            <#if sessionAttributes.autoName?has_content>
-                ${uiLabelMap.CommonWelcome}&nbsp;${sessionAttributes.autoName?html}!
-                (${uiLabelMap.CommonNotYou}?&nbsp;<a href="<@ofbizUrl>autoLogout</@ofbizUrl>" class="linktext">${uiLabelMap.CommonClickHere}</a>)
-            <#else/>
-                ${uiLabelMap.CommonWelcome}!
-            </#if>
-        </div>
+      </div>
     </div>
-</div>
+  </div>
 
-<div id="ecom-header-bar">
+  <div id="ecom-header-bar">
     <ul id="left-links">
-        <#if userLogin?has_content && userLogin.userLoginId != "anonymous">
-            <li id="header-bar-logout"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
-        <#else/>
-            <li id="header-bar-login"><a href="<@ofbizUrl>${checkLoginUrl}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li>
-            <li id="header-bar-login"><a href="<@ofbizUrl>newcustomer</@ofbizUrl>">${uiLabelMap.EcommerceRegister}</a></li>
-        </#if>
-        <li id="header-bar-contactus"><a href="<@ofbizUrl>contactus</@ofbizUrl>">${uiLabelMap.CommonContactUs}</a></li>
-        <li id="header-bar-main"><a href="<@ofbizUrl>main</@ofbizUrl>">${uiLabelMap.CommonMain}</a></li>
+      <#if userLogin?has_content && userLogin.userLoginId != "anonymous">
+        <li id="header-bar-logout"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
+      <#else/>
+        <li id="header-bar-login"><a href="<@ofbizUrl>${checkLoginUrl}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li>
+        <li id="header-bar-login"><a href="<@ofbizUrl>newcustomer</@ofbizUrl>">${uiLabelMap.EcommerceRegister}</a></li>
+      </#if>
+      <li id="header-bar-contactus"><a href="<@ofbizUrl>contactus</@ofbizUrl>">${uiLabelMap.CommonContactUs}</a></li>
+      <li id="header-bar-main"><a href="<@ofbizUrl>main</@ofbizUrl>">${uiLabelMap.CommonMain}</a></li>
     </ul>
     <ul id="right-links">
-        <!-- NOTE: these are in reverse order because they are stacked right to left instead of left to right -->
-        <#if !userLogin?has_content || (userLogin.userLoginId)?if_exists != "anonymous">
-            <li id="header-bar-viewprofile"><a href="<@ofbizUrl>viewprofile</@ofbizUrl>">${uiLabelMap.CommonProfile}</a></li>
-            <li id="header-bar-ListQuotes"><a href="<@ofbizUrl>ListQuotes</@ofbizUrl>">${uiLabelMap.OrderOrderQuotes}</a></li>
-            <li id="header-bar-ListRequests"><a href="<@ofbizUrl>ListRequests</@ofbizUrl>">${uiLabelMap.OrderRequests}</a></li>
-            <li id="header-bar-editShoppingList"><a href="<@ofbizUrl>editShoppingList</@ofbizUrl>">${uiLabelMap.EcommerceShoppingLists}</a></li>
-            <li id="header-bar-orderhistory"><a href="<@ofbizUrl>orderhistory</@ofbizUrl>">${uiLabelMap.EcommerceOrderHistory}</a></li>
-        </#if>
-        <#if catalogQuickaddUse>
-            <li id="header-bar-quickadd"><a href="<@ofbizUrl>quickadd</@ofbizUrl>">${uiLabelMap.CommonQuickAdd}</a></li>
-        </#if>
+      <!-- NOTE: these are in reverse order because they are stacked right to left instead of left to right -->
+      <#if !userLogin?has_content || (userLogin.userLoginId)?if_exists != "anonymous">
+        <li id="header-bar-viewprofile"><a href="<@ofbizUrl>viewprofile</@ofbizUrl>">${uiLabelMap.CommonProfile}</a></li>
+        <li id="header-bar-ListQuotes"><a href="<@ofbizUrl>ListQuotes</@ofbizUrl>">${uiLabelMap.OrderOrderQuotes}</a></li>
+        <li id="header-bar-ListRequests"><a href="<@ofbizUrl>ListRequests</@ofbizUrl>">${uiLabelMap.OrderRequests}</a></li>
+        <li id="header-bar-editShoppingList"><a href="<@ofbizUrl>editShoppingList</@ofbizUrl>">${uiLabelMap.EcommerceShoppingLists}</a></li>
+        <li id="header-bar-orderhistory"><a href="<@ofbizUrl>orderhistory</@ofbizUrl>">${uiLabelMap.EcommerceOrderHistory}</a></li>
+      </#if>
+      <#if catalogQuickaddUse>
+        <li id="header-bar-quickadd"><a href="<@ofbizUrl>quickadd</@ofbizUrl>">${uiLabelMap.CommonQuickAdd}</a></li>
+      </#if>
     </ul>
-</div>
+  </div>
\ No newline at end of file

Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/headerHead.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=746544&view=auto
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/headerHead.ftl (added)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/headerHead.ftl Sat Feb 21 17:18:25 2009
@@ -0,0 +1,98 @@
+<#--
+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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<#-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -->
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+  <title><#if title?has_content>${title}<#elseif titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if>: ${(productStore.storeName)?if_exists}</title>
+  <#if layoutSettings.shortcutIcon?has_content>
+    <#assign shortcutIcon = layoutSettings.shortcutIcon/>
+  <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>    
+    <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/>
+  </#if>
+  <#if shortcutIcon?has_content>
+    <link rel="shortcut icon" href="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>" />
+  </#if>
+  <#if layoutSettings.javaScripts?has_content>
+    <#--layoutSettings.javaScripts is a list of java scripts. -->
+    <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order -->
+    <#assign javaScriptsSet = Static["org.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/>
+    <#list layoutSettings.javaScripts as javaScript>
+      <#if javaScriptsSet.contains(javaScript)>
+        <#assign nothing = javaScriptsSet.remove(javaScript)/>
+        <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+      </#if>
+    </#list>
+  </#if>
+  <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content>
+    <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript>
+      <script type="text/javascript" src="<@ofbizContentUrl>${javaScript}</@ofbizContentUrl>" type="text/javascript"></script>
+    </#list>
+  </#if>
+  <#if layoutSettings.styleSheets?has_content>
+    <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.-->
+    <#list layoutSettings.styleSheets as styleSheet>
+      <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+    </#list>
+  </#if>
+  <#if layoutSettings.VT_STYLESHEET?has_content>
+    <#list layoutSettings.VT_STYLESHEET as styleSheet>
+      <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+    </#list>
+  </#if>
+  <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl">
+    <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.-->
+    <#list layoutSettings.rtlStyleSheets as styleSheet>
+      <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+    </#list>
+  </#if>
+  <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl">
+    <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet>
+      <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/>
+    </#list>
+  </#if>
+  ${layoutSettings.extraHead?if_exists}
+  <#if layoutSettings.VT_EXTRA_HEAD?has_content>
+    <#list layoutSettings.VT_EXTRA_HEAD as extraHead>
+      ${extraHead}
+    </#list>
+  </#if>
+
+  <#-- Append CSS for catalog -->
+  <#if catalogStyleSheet?exists>
+    <link rel="stylesheet" href="${catalogStyleSheet}" type="text/css"/>
+  </#if>
+  <#-- Append CSS for tracking codes -->
+  <#if sessionAttributes.overrideCss?exists>
+    <link rel="stylesheet" href="${sessionAttributes.overrideCss}" type="text/css"/>
+  </#if>
+  <#-- Meta tags if defined by the page action -->
+  <#if metaDescription?exists>
+    <meta name="description" content="${metaDescription}"/>
+  </#if>
+  <#if metaKeywords?exists>
+    <meta name="keywords" content="${metaKeywords}"/>
+  </#if>  
+  <#if requireDojo?exists>
+    <script type="text/javascript">
+      dojo.require("dojo.widget.*");    
+    </script>  
+  </#if>
+</head>

Modified: ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml Sat Feb 21 17:18:25 2009
@@ -49,15 +49,19 @@
 
                 <script location="component://ecommerce/widget/EcommerceSetup.groovy"/>
                 
-                <!-- The default (main) stylesheets -->
-                <set field="layoutSettings.styleSheets[+0]" value="/ecommerce/images/blog.css" global="true"/>
-                <set field="layoutSettings.styleSheets[+0]" value="${productStore.styleSheet}" default-value="/images/ecommain.css" global="true"/>
-                <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/popup.css" global="true"/>
-                <set field="layoutSettings.styleSheets[]" value="/content/images/contentForum.css" global="true"/>
+                <!-- Get the store VisualTheme -->
+                <set field="visualThemeId" from-field="productStore.visualThemeId" default="EC_DEFAULT"/>
+                <service service-name="getVisualThemeResources">
+                    <field-map field-name="visualThemeId"/>
+                    <field-map field-name="themeResources" env-name="layoutSettings"/>
+                </service>
+                <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
+                <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/header.ftl"/>
+                <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/>
             </actions>
             <widgets>
                 <!-- render header -->
-                <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/includes/header.ftl"/></html></platform-specific>
+                <platform-specific><html><html-template location="${headerTemplateLocation}"/></html></platform-specific>
                 
                 <container id="ecom-mainarea">
                     <!-- by default will render left-bar only if left/rightbarScreenName value not empty -->
@@ -74,7 +78,7 @@
                 </container>
                 
                 <!-- render footer -->
-                <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/></html></platform-specific>
+                <platform-specific><html><html-template location="${footerTemplateLocation}"/></html></platform-specific>
             </widgets>
         </section>
     </screen>

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Sat Feb 21 17:18:25 2009
@@ -1392,28 +1392,6 @@
         <value xml:lang="th">สัญลักษณ์ของหัวข้อ</value>
         <value xml:lang="zh">头标志</value>
     </property>
-    <property key="FormFieldTitle_headerMiddleBackground">
-        <value xml:lang="de">Kopfbereich mittlerer Hintergrund</value>
-        <value xml:lang="en">Header Middle Background</value>
-        <value xml:lang="es">Fondo media cabecera</value>
-        <value xml:lang="fr">Arrière plan du milieu de l'entête</value>
-        <value xml:lang="it">Sfondo Centrale Intestazione</value>
-        <value xml:lang="ro">Sfond Central Antet</value>
-        <value xml:lang="ru">Фон середины заголовка</value>
-        <value xml:lang="th">หัวข้อตรงกลางพื้นหลัง</value>
-        <value xml:lang="zh">头中间背景</value>
-    </property>
-    <property key="FormFieldTitle_headerRightBackground">
-        <value xml:lang="de">Kopfbereich rechter Hintergrund</value>
-        <value xml:lang="en">Header Right Background</value>
-        <value xml:lang="es">Fondo derecho cabecera</value>
-        <value xml:lang="fr">Arrière plan à droite de l'entête</value>
-        <value xml:lang="it">Sfondo di Destra Intestazione</value>
-        <value xml:lang="ro">Sfond de Dreapta Antet</value>
-        <value xml:lang="ru">Фон правой части заголовка</value>
-        <value xml:lang="th">หัวข้อทางซ้ายพื้นหลัง</value>
-        <value xml:lang="zh">头右侧背景</value>
-    </property>
     <property key="FormFieldTitle_idCode">
         <value xml:lang="de">Code ID</value>
         <value xml:lang="en">Id Code</value>
@@ -2079,7 +2057,7 @@
         <value xml:lang="fr">Pourcentage du prix de commande</value>
         <value xml:lang="it">Percentual Prezzo Ordine</value>
         <value xml:lang="ru">Процент цены заказа</value>
-        <value xml:lang="th">เปอร์เซ็นราคารายการสั่งซื้อ</value>
+        <value xml:lang="th">เปอร์เซ็นราคารายการสั่งซ‹ื้อ</value>
     </property>
     <property key="FormFieldTitle_orderQtyIncrements">
         <value xml:lang="de">Auftragsmenge Erhöhungen</value>
@@ -3607,6 +3585,10 @@
         <value xml:lang="th">แสดงตระกร้าในการเพิ่ม</value>
         <value xml:lang="zh">添加时浏览购物车</value>
     </property>
+    <property key="FormFieldTitle_visualThemeId">
+        <value xml:lang="en">Visual Theme</value>
+        <value xml:lang="it">Tema grafico</value>
+    </property>
     <property key="FormFieldTitle_weightBreakId">
         <value xml:lang="de">Gewicht Sprung ID</value>
         <value xml:lang="en">Weight Break Id</value>

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Sat Feb 21 17:18:25 2009
@@ -3567,10 +3567,14 @@
       <field name="authDeclinedMessage" type="long-varchar"></field>
       <field name="authFraudMessage" type="long-varchar"></field>
       <field name="authErrorMessage" type="long-varchar"></field>
-      <field name="styleSheet" type="url"></field>
-      <field name="headerLogo" type="url"></field>
-      <field name="headerMiddleBackground" type="url"></field>
-      <field name="headerRightBackground" type="url"></field>
+      <field name="visualThemeId" type="id"></field>
+
+      <!-- old fields, deprecated -->
+      <field name="oldStyleSheet" col-name="STYLE_SHEET" type="url"></field>
+      <field name="oldHeaderLogo" col-name="HEADER_LOGO" type="url"></field>
+      <field name="oldHeaderMiddleBackground" col-name="HEADER_MIDDLE_BACKGROUND" type="url"></field>
+      <field name="oldHeaderRightBackground" col-name="HEADER_RIGHT_BACKGROUND" type="url"></field>
+
       <field name="usePrimaryEmailUsername" type="indicator"></field>
       <field name="requireCustomerRole" type="indicator"></field>
       <field name="autoInvoiceDigitalItems" type="indicator"><description>Default Y. Invoice digital items when order is placed rather than waiting for completing order items (though shipment/fulfillment).</description></field>

Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Sat Feb 21 17:18:25 2009
@@ -211,8 +211,17 @@
             </drop-down>
         </field>
         
-        <field name="styleSheet"><text size="60" maxlength="250"/></field>
-        <field name="headerLogo"><text size="60" maxlength="250"/></field>
+        <field name="visualThemeId">
+            <drop-down allow-empty="false">
+                <entity-options key-field-name="visualThemeId" description="${visualThemeId} - ${description}" entity-name="VisualTheme">
+                    <entity-constraint name="visualThemeSetId" operator="equals" value="ECOMMERCE"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="oldStyleSheet"><hidden/></field>
+        <field name="oldHeaderLogo"><hidden/></field>
+        <field name="oldHeaderMiddleBackground"><hidden/></field>
+        <field name="oldHeaderRightBackground"><hidden/></field>
         <!--
         <field name="contentPathPrefix" tooltip="If specified will be prepended to image and other content paths. Should start with a slash but not end with one."><text size="60" maxlength="250"/></field>
         <field name="templatePathPrefix" tooltip="If specified will be prepended to template paths. Should start with a slash but not end with one."><text size="60" maxlength="250"/></field>
@@ -288,6 +297,7 @@
                 <sort-field name="subtitle"/>
                 <sort-field name="companyName"/>
                 <sort-field name="isDemoStore"/>
+                <sort-field name="visualThemeId"/>
             </field-group>
             <field-group title="${uiLabelMap.CommonInventory}" collapsible="true">
                 <sort-field name="inventoryFacilityId"/>
@@ -370,12 +380,6 @@
                 <sort-field name="requireCustomerRole"/>
                 <sort-field name="enableAutoSuggestionList"/>
             </field-group>
-            <field-group title="${uiLabelMap.CommonVisualTheme}" collapsible="true" initially-collapsed="true">
-                <sort-field name="styleSheet"/>
-                <sort-field name="headerLogo"/>
-                <sort-field name="headerMiddleBackground"/>
-                <sort-field name="headerRightBackground"/>
-            </field-group>
             <field-group title="${uiLabelMap.CommonUpload}" collapsible="true" initially-collapsed="true">
                 <sort-field name="enableDigProdUpload"/>
                 <sort-field name="digProdUploadCategoryId"/>

Modified: ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml?rev=746544&r1=746543&r2=746544&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml (original)
+++ ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml Sat Feb 21 17:18:25 2009
@@ -53,7 +53,11 @@
         authDeclinedMessage="There has been a problem with your method of payment. Please try a different method or call customer service."
         authFraudMessage="Your order has been rejected and your account has been disabled due to fraud."
         authErrorMessage="Problem connecting to payment processor."
-        styleSheet="" headerLogo="/images/ofbiz_logo.jpg" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
+        visualThemeId="EC_DEFAULT" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y"/>
+
+<!-- Note: 20092102 BB - Introducing the visualThemeId we have actually missed this styleSheet setting
+styleSheet=""
+-->
 
     <ProductStorePaymentSetting productStoreId="9100" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="alwaysApproveWithCaptureCCProcessor"/>
     <ProductStorePaymentSetting productStoreId="9100" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_RELEASE" paymentService="testCCRelease"/>