Author: nmalin
Date: Thu Aug 24 19:01:34 2017
New Revision: 1806076

URL: http://svn.apache.org/viewvc?rev=1806076&view=rev
Log:
Implemented: Start the common-theme upload (OFBIZ-9138 Create a common theme)
First step, commit model theme engine :
ModelTheme: java object who interact with system and theme definition
VisualTheme: java object who interact with the user session and the theme
ThemeFactory: java factory to load and access to VisualTheme and ModelTheme 
with the cache
widget-theme.xsd: dtd to define a theme

Load also the main structure common-theme component, (empty for all template, 
screen, style or js) with this theme definition.
It's not functional at this time

Added:
    ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd   (with 
props)
    
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
   (with props)
    
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
   (with props)
    
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
   (with props)
    ofbiz/ofbiz-framework/trunk/themes/README.md   (with props)
    ofbiz/ofbiz-framework/trunk/themes/common/config/
    ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml   
(with props)
    ofbiz/ofbiz-framework/trunk/themes/common/data/
    ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml   (with 
props)
    ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml   (with props)
    ofbiz/ofbiz-framework/trunk/themes/common/widget/
    ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml   (with props)

Added: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd?rev=1806076&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd (added)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd Thu Aug 
24 19:01:34 2017
@@ -0,0 +1,225 @@
+<?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.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Widget-Theme"; 
targetNamespace="http://ofbiz.apache.org/Widget-Theme";>
+    <xs:element name="theme">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="1" ref="visual-themes"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="extends"/>
+                <xs:element minOccurs="0" maxOccurs="1" 
ref="widget-properties"/>
+                <xs:element minOccurs="0" maxOccurs="1" 
ref="theme-properties"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="templates"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="visual-themes">
+        <xs:annotation><xs:documentation>List all visual themes embded by this 
theme</xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" 
ref="visual-theme" />
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="visual-theme">
+        <xs:annotation><xs:documentation>Define a visual theme with an unique 
id and some meta information</xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="1" ref="description" />
+                <xs:element minOccurs="0" maxOccurs="unbounded" 
ref="screenshot" />
+            </xs:sequence>
+            <xs:attribute type="xs:string" name="id" use="required" />
+            <xs:attribute type="xs:string" name="display-name" use="required" 
/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="description"/>
+    <xs:element name="screenshot">
+        <xs:annotation><xs:documentation>List all screenshots image with the 
path to use from web site (ex '/mytheme/screenshot1.jpg' for an image in 
ofbiz/themes/mytheme/webapp/screenshot1.jpg)</xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:attribute type="xs:string" name="location" use="required" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="extends">
+        <xs:annotation><xs:documentation>Indicate the theme to extend if you 
when improve an existent theme like common-theme. You need to define the path 
to the theme definition to surcharge (ex: 
component://common-theme/widget/Theme.xml)</xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:attribute type="xs:string" name="location" use="required" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="widget-properties">
+        <xs:annotation><xs:documentation>
+            This element contains all properties use by the screen engine that 
the theme can be dedicate some values
+        </xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="default-view-size">
+                    <xs:complexType>
+                        <xs:attribute type="xs:integer" name="value" />
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="autocompleter">
+                    <xs:complexType>
+                        <xs:attribute type="xs:integer" 
name="default-view-size" />
+                        <xs:attribute type="xs:integer" 
name="default-min-lenght" />
+                        <xs:attribute type="xs:integer" name="default-delay" />
+                        <xs:attribute name="display-return-field">
+                            <xs:simpleType>
+                                <xs:restriction base="xs:token">
+                                    <xs:enumeration value="true" />
+                                    <xs:enumeration value="false" />
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="lookup">
+                    <xs:complexType>
+                        <xs:attribute type="xs:integer" name="height" />
+                        <xs:attribute type="xs:integer" name="width" />
+                        <xs:attribute name="position">
+                            <xs:simpleType>
+                                <xs:restriction base="xs:token">
+                                    <xs:enumeration value="top-left"/>
+                                    <xs:enumeration value="top-right"/>
+                                    <xs:enumeration value="bottom-left"/>
+                                    <xs:enumeration value="bottom-right"/>
+                                    <xs:enumeration value="center"/>
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="layered-modal">
+                    <xs:complexType>
+                        <xs:attribute type="xs:integer" name="height" />
+                        <xs:attribute type="xs:integer" name="width" />
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="theme-properties">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" ref="property" 
/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+        <xs:annotation><xs:documentation>
+            This element contains all properties dedicate with the theme 
technology
+        </xs:documentation></xs:annotation>
+    <xs:element name="property">
+        <xs:complexType>
+            <xs:attribute type="xs:string" name="name" use="required">
+                <xs:annotation><xs:documentation>
+                    this attribute support the FlexibleMapAccessor syntax
+                </xs:documentation></xs:annotation>
+            </xs:attribute>
+            <xs:attribute type="xs:string" name="value" use="required" />
+            <xs:attribute type="xs:string" name="type" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="templates">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" ref="template" 
/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+        <xs:annotation><xs:documentation>
+            This element contains all ftl macro template supported by this 
theme
+        </xs:documentation></xs:annotation>
+    <xs:element name="template">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="4" ref="template-file" />
+            </xs:sequence>
+            <xs:attribute type="xs:string" name="name" use="required" />
+            <xs:attribute type="xs:string" name="type" use="required"/>
+            <xs:attribute type="xs:string" name="encoding" />
+            <xs:attribute type="xs:string" name="content-type" />
+            <xs:attribute type="xs:string" name="encoder" />
+            <xs:attribute name="compress">
+                <xs:simpleType>
+                    <xs:restriction base="xs:token">
+                        <xs:enumeration value="true" />
+                        <xs:enumeration value="false" />
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="template-file">
+    <xs:complexType>
+        <xs:attribute type="xs:string" name="widget" use="required" >
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="screen" />
+                    <xs:enumeration value="form" />
+                    <xs:enumeration value="tree" />
+                    <xs:enumeration value="menu" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute type="xs:string" name="location" use="required"/>
+    </xs:complexType>
+    </xs:element>
+    <xs:element name="common-screens">
+        <xs:annotation><xs:documentation>
+            List the location of each common screens that the theme implement
+        </xs:documentation></xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="1" ref="root-decorator" />
+                <xs:element minOccurs="0" maxOccurs="1" 
ref="subtype-decorator" />
+                <xs:element minOccurs="0" maxOccurs="1" ref="generic-screen" />
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="root-decorator">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" ref="screen" />
+            </xs:sequence>
+            <xs:attribute type="xs:string" name="default-location" 
use="optional" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="subtype-decorator">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" ref="screen" />
+            </xs:sequence>
+            <xs:attribute type="xs:string" name="default-location" 
use="optional" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="generic-screen">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="1" maxOccurs="unbounded" ref="screen" />
+            </xs:sequence>
+            <xs:attribute type="xs:string" name="default-location" 
use="optional" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="screen">
+        <xs:complexType>
+            <xs:attribute type="xs:string" name="name" use="required"/>
+            <xs:attribute type="xs:string" name="location" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>
\ No newline at end of file

Propchange: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xsd

Added: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java?rev=1806076&view=auto
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
 (added)
+++ 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
 Thu Aug 24 19:01:34 2017
@@ -0,0 +1,446 @@
+/*******************************************************************************
+ * 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
+ * dedicate language governing permissions and limitations
+ * under the License.
+ 
*******************************************************************************/
+package org.apache.ofbiz.widget.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang.SerializationUtils;
+import org.apache.ofbiz.base.util.Debug;
+import org.apache.ofbiz.base.util.GeneralException;
+import org.apache.ofbiz.base.util.ObjectType;
+import org.apache.ofbiz.base.util.UtilMisc;
+import org.apache.ofbiz.base.util.UtilValidate;
+import org.apache.ofbiz.base.util.UtilXml;
+import org.apache.ofbiz.base.util.collections.FlexibleMapAccessor;
+import org.apache.ofbiz.widget.renderer.VisualTheme;
+import org.w3c.dom.Element;
+
+/**
+ * Widget Theme Library - Widget model class.
+ */
+@SuppressWarnings("serial")
+public class ModelTheme implements Serializable {
+
+    public static final String module = ModelTheme.class.getName();
+    //generic properties
+    private final String name;
+    private final Map<String, VisualTheme> visualThemes;
+    private final Integer defaultViewSize;
+
+    // Autocomplete configuration
+    // Default number of items to be displayed in lookup ajax autocompleter
+    private final Integer autocompleterDefaultViewSize;
+    // Default minimum number of characters an user has to type before the 
ajax autocompleter activates (jQuery default is 1)
+    private final Integer autocompleterDefaultMinLength;
+    // Default delay in milliseconds the Autocomplete waits after a keystroke 
to activate itself. A zero-delay makes sense for local data (more responsive), 
but can produce a lot of load for remote data, while being less responsive.
+    private final Integer autocompleterDefaultDelay;
+    // Show/hide the ID field that is returned from ajax autocompleter
+    private final Boolean autocompleterDisplayReturnField;
+
+    //layer modal
+    // Default position and size for lookup layered windows
+    private final String lookupPosition;
+    private final Integer lookupWidth;
+    private final Integer lookupHeight;
+    //Default size for layered modal windows
+    private final Integer linkDefaultLayeredModalWidth;
+    private final Integer linkDefaultLayeredModalHeight;
+
+    //dedicate theme properties
+    private final Map<String, Object> themePropertiesMap;
+
+    //template rendering
+    private final Map<String, ModelTemplate> modelTemplateMap;
+    private final Map<String, String> modelCommonScreensMap;
+
+    /**
+     * Only constructor to initialize a modelTheme from xml definition
+     * @param themeElement
+     */
+    public ModelTheme(Element themeElement) {
+        this.name = themeElement.getAttribute("name");
+        ModelTheme initOriginTheme = null;
+        Map<String, VisualTheme> initVisualThemes = new HashMap<>();
+        Map<String, Object> initWidgetPropertiesMap = new HashMap<>();
+        Map<String, Object> initThemePropertiesMap = new HashMap<>();
+        Map<String, ModelTemplate> initModelTemplateMap = new HashMap<>();
+        Map<String, String> initModelCommonScreensMap = new HashMap<>();
+
+        // first resolve value from the origin theme
+        Element originThemeElement = UtilXml.firstChildElement(themeElement, 
"extends");
+        ModelTheme originTheme = null;
+        if (originThemeElement != null) {
+            originTheme = 
ThemeFactory.getModelThemeFromLocation(originThemeElement.getAttribute("location"));
+        }
+
+        if (originTheme != null) {
+            initWidgetPropertiesMap.put("defaultViewSize", 
originTheme.defaultViewSize);
+            initWidgetPropertiesMap.put("autocompleterDefaultViewSize", 
originTheme.autocompleterDefaultViewSize);
+            initWidgetPropertiesMap.put("autocompleterDefaultMinLength", 
originTheme.autocompleterDefaultMinLength);
+            initWidgetPropertiesMap.put("autocompleterDefaultDelay", 
originTheme.autocompleterDefaultDelay);
+            initWidgetPropertiesMap.put("autocompleterDisplayReturnField", 
originTheme.autocompleterDisplayReturnField);
+            initWidgetPropertiesMap.put("lookupPosition", 
originTheme.lookupPosition);
+            initWidgetPropertiesMap.put("lookupWidth", 
originTheme.lookupWidth);
+            initWidgetPropertiesMap.put("lookupHeight", 
originTheme.lookupHeight);
+            initWidgetPropertiesMap.put("linkDefaultLayeredModalWidth", 
originTheme.linkDefaultLayeredModalWidth);
+            initWidgetPropertiesMap.put("linkDefaultLayeredModalHeight", 
originTheme.linkDefaultLayeredModalHeight);
+
+            // resolve all decicate properties from origin and sucharge by the 
present dedicate properties
+            if (originTheme.themePropertiesMap != null) {
+                for (String key : originTheme.themePropertiesMap.keySet()) {
+                    initThemePropertiesMap.put(key, 
SerializationUtils.clone((Serializable)originTheme.themePropertiesMap.get(key)));
+                }
+            }
+
+            // Add modelTemplate present on origin and not on this
+            if (originTheme.modelTemplateMap != null) {
+                initModelTemplateMap = 
UtilMisc.makeMapWritable(originTheme.modelTemplateMap);
+            }
+            if (originTheme.modelCommonScreensMap != null) {
+                initModelCommonScreensMap = 
UtilMisc.makeMapWritable(originTheme.modelCommonScreensMap);
+            }
+        }
+
+        //second collect value from XML and surcharge
+        for (Element childElement : UtilXml.childElementList(themeElement)) {
+            switch (childElement.getNodeName()) {
+                case "widget-properties":
+                    addWidgetProperties(initWidgetPropertiesMap, childElement);
+                    break;
+                case "visual-themes":
+                    for (Element visualTheme : 
UtilXml.childElementList(childElement)) {
+                        initVisualThemes.put(visualTheme.getAttribute("id"), 
new VisualTheme(this, visualTheme));
+                    }
+                case "theme-properties":
+                    for (Element property : 
UtilXml.childElementList(childElement)) {
+                        addThemeProperty(initThemePropertiesMap, property);
+                    }
+                    break;
+                case "templates":
+                    for (Element template : 
UtilXml.childElementList(childElement)) {
+                        String modelTemplateName = 
template.getAttribute("name");
+                        if 
(initModelTemplateMap.containsKey(modelTemplateName)) {
+                            ModelTemplate surchargeModelTemplate = new 
ModelTemplate(template);
+                            ModelTemplate originModelTemplate = 
initModelTemplateMap.get(modelTemplateName);
+                            initModelTemplateMap.put(modelTemplateName, new 
ModelTemplate(surchargeModelTemplate, originModelTemplate));
+                        } else {
+                            initModelTemplateMap.put(modelTemplateName, new 
ModelTemplate(template));
+                        }
+                    }
+                    break;
+                case "common-screens":
+                    for (Element screenPurpose : 
UtilXml.childElementList(childElement)) {
+                        String defaultLocation = 
screenPurpose.getAttribute("default-location");
+                        for (Element screen : 
UtilXml.childElementList(screenPurpose)) {
+                            String name = screen.getAttribute("name");
+                            String location = screen.getAttribute("location");
+                            if (UtilValidate.isEmpty(location)) location = 
defaultLocation;
+                            if (UtilValidate.isEmpty(location)) {
+                                Debug.logWarning("We can resolve the screen 
location " + name + " in the theme " + this.name + " so no added it", module);
+                                continue;
+                            }
+                            initModelCommonScreensMap.put(name, location);
+                        }
+                    }
+                    break;
+            }
+        }
+
+        // now store all values on final variable
+        this.defaultViewSize = (Integer) 
initWidgetPropertiesMap.get("defaultViewSize");
+        this.autocompleterDefaultViewSize = (Integer) 
initWidgetPropertiesMap.get("autocompleterDefaultViewSize");
+        this.autocompleterDefaultMinLength = (Integer) 
initWidgetPropertiesMap.get("autocompleterDefaultMinLength");
+        this.autocompleterDefaultDelay = (Integer) 
initWidgetPropertiesMap.get("autocompleterDefaultDelay");
+        this.autocompleterDisplayReturnField = (Boolean) 
initWidgetPropertiesMap.get("autocompleterDisplayReturnField");
+        this.lookupPosition = (String) 
initWidgetPropertiesMap.get("lookupPosition");
+        this.lookupWidth = (Integer) 
initWidgetPropertiesMap.get("lookupWidth");
+        this.lookupHeight = (Integer) 
initWidgetPropertiesMap.get("lookupHeight");
+        this.linkDefaultLayeredModalWidth = (Integer) 
initWidgetPropertiesMap.get("linkDefaultLayeredModalWidth");
+        this.linkDefaultLayeredModalHeight = (Integer) 
initWidgetPropertiesMap.get("linkDefaultLayeredModalHeight");
+        this.visualThemes = Collections.unmodifiableMap(initVisualThemes);
+        this.themePropertiesMap = 
Collections.unmodifiableMap(initThemePropertiesMap);
+        this.modelTemplateMap = 
Collections.unmodifiableMap(initModelTemplateMap);
+        this.modelCommonScreensMap = 
Collections.unmodifiableMap(initModelCommonScreensMap);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public List<String> getVisualThemeIds() {
+        return new ArrayList<>(visualThemes.keySet());
+    }
+    public VisualTheme getVisualTheme(String visualThemeId) { return 
visualThemes.get(visualThemeId); }
+
+    public Integer getDefaultViewSize() {
+        return defaultViewSize;
+    }
+
+    public Integer getAutocompleterDefaultViewSize() {
+        return autocompleterDefaultViewSize;
+    }
+    public Integer getAutocompleterDefaultMinLength() {
+        return autocompleterDefaultMinLength;
+    }
+    public Boolean getAutocompleterDisplayReturnField() {
+        return autocompleterDisplayReturnField;
+    }
+    public Integer getAutocompleterDefaultDelay() {
+        return autocompleterDefaultDelay;
+    }
+
+    public Integer getLinkDefaultLayeredModalHeight() {
+        return linkDefaultLayeredModalHeight;
+    }
+    public Integer getLinkDefaultLayeredModalWidth() {
+        return linkDefaultLayeredModalWidth;
+    }
+
+    public Integer getLookupHeight() {
+        return lookupHeight;
+    }
+
+    public Integer getLookupWidth() {
+        return lookupWidth;
+    }
+
+    public String getLookupPosition() {
+        return lookupPosition;
+    }
+
+    /**
+     * for a map preloaded with the origin values, surcharge them from xml 
definition
+     * @param initWidgetPropertiesMap
+     * @param widgetProperties
+     */
+    private void addWidgetProperties(Map<String, Object> 
initWidgetPropertiesMap, Element widgetProperties) {
+        for (Element childElement : 
UtilXml.childElementList(widgetProperties)) {
+            switch (childElement.getNodeName()) {
+                case "default-view-size":
+                    initWidgetPropertiesMap.put("defaultViewSize", 
Integer.valueOf(childElement.getAttribute("value")));
+                    break;
+                case "autocompleter":
+                    initWidgetPropertiesMap.put("autocompleterDefaultDelay", 
Integer.valueOf(childElement.getAttribute("default-delay")));
+                    
initWidgetPropertiesMap.put("autocompleterDefaultMinLength", 
Integer.valueOf(childElement.getAttribute("default-min-lenght")));
+                    
initWidgetPropertiesMap.put("autocompleterDefaultViewSize", 
Integer.valueOf(childElement.getAttribute("default-view-size")));
+                    
initWidgetPropertiesMap.put("autocompleterDisplayReturnField", 
"true".equalsIgnoreCase(childElement.getAttribute("display-return-field")));
+                    break;
+                case "lookup":
+                    initWidgetPropertiesMap.put("lookupPosition", 
childElement.getAttribute("position"));
+                    initWidgetPropertiesMap.put("lookupHeight", 
Integer.valueOf(childElement.getAttribute("height")));
+                    initWidgetPropertiesMap.put("lookupWidth", 
Integer.valueOf(childElement.getAttribute("width")));
+                    break;
+                case "layered-modal":
+                    
initWidgetPropertiesMap.put("linkDefaultLayeredModalHeight", 
Integer.valueOf(childElement.getAttribute("height")));
+                    
initWidgetPropertiesMap.put("linkDefaultLayeredModalWidth", 
Integer.valueOf(childElement.getAttribute("width")));
+                    break;
+            }
+        }
+    }
+
+    /**
+     * for a map preloaded with the theme properties values, surcharge them 
from xml definition
+     * @param initThemePropertiesMap
+     * @param property
+     */
+    private void addThemeProperty(Map<String, Object> initThemePropertiesMap, 
Element property) {
+        FlexibleMapAccessor name = FlexibleMapAccessor.getInstance((String) 
property.getAttribute("name"));
+        String value = property.getAttribute("value");
+        String type = property.getAttribute("type");
+        if (UtilValidate.isEmpty(type) || type.endsWith("String")) {
+            name.put(initThemePropertiesMap, value);
+        } else {
+            try {
+                name.put(initThemePropertiesMap, 
ObjectType.simpleTypeConvert(value, type, null, null));
+            } catch (GeneralException e) {
+                Debug.logError("Impossible to parse the value " + value + " to 
type " + type + " for the property " + name + " on theme " + this.name, module);
+            }
+        }
+    }
+    public Object getProperty(String propertyName) {
+        if (! themePropertiesMap.containsKey(propertyName)
+                || themePropertiesMap.get(propertyName) == null) return "";
+        return themePropertiesMap.get(propertyName);
+    }
+
+    /**
+     * return the themes properties like VisualThemesRessources, keep the name 
for understanding compatibility
+     * @return
+     */
+    public Map<String, Object> getThemeResources() {
+        return themePropertiesMap;
+    }
+
+    public String getType(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return modelTemplate.getType();
+        return null;
+    }
+    public String getEncoder(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return modelTemplate.getEncoder();
+        return null;
+    }
+    public String getCompress(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return modelTemplate.getCompress();
+        return null;
+    }
+    public String getContentType(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return modelTemplate.getContentType();
+        return null;
+    }
+    public String getEncoding(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return modelTemplate.getEncoding();
+        return null;
+    }
+
+    public String getScreenRendererLocation(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return 
modelTemplate.getScreenRendererLocation();
+        return null;
+    }
+    public String getFormRendererLocation(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return 
modelTemplate.getFormRendererLocation();
+        return null;
+    }
+    public String getTreeRendererLocation(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return 
modelTemplate.getTreeRendererLocation();
+        return null;
+    }
+    public String getMenuRendererLocation(String name) {
+        ModelTemplate modelTemplate = modelTemplateMap.get(name);
+        if (modelTemplate != null) return 
modelTemplate.getMenuRendererLocation();
+        return null;
+    }
+
+    public Map<String,String> getModelCommonScreens() {
+        return modelCommonScreensMap;
+    }
+
+    /**
+     * the ModelTemplate class, manage the complexity of macro library 
definition and the rendering technology
+     */
+    private class ModelTemplate {
+        private final String name;
+        private final String type;
+        private final String compress;
+        private final String encoder;
+        private final String contentType;
+        private final String encoding;
+        private final String screenRendererLocation;
+        private final String formRendererLocation;
+        private final String menuRendererLocation;
+        private final String treeRendererLocation;
+
+        /**
+         * Constructor to initialize a ModelTemplate class from xml definition
+         * @param template
+         */
+        public ModelTemplate(Element template) {
+            this.name = template.getAttribute("name");
+            this.type = template.getAttribute("type");
+            this.compress = template.getAttribute("compress");
+            this.encoder = template.getAttribute("encoder");
+            this.contentType = template.getAttribute("contentType");
+            this.encoding = template.getAttribute("encoding");
+
+            String screenRendererLocation = null;
+            String formRendererLocation = null;
+            String menuRendererLocation = null;
+            String treeRendererLocation = null;
+            for (Element templateFile : UtilXml.childElementList(template)) {
+                switch (templateFile.getAttribute("widget")) {
+                    case "screen":
+                        screenRendererLocation = 
templateFile.getAttribute("location");
+                        break;
+                    case "form":
+                        formRendererLocation = 
templateFile.getAttribute("location");
+                        break;
+                    case "tree":
+                        treeRendererLocation = 
templateFile.getAttribute("location");
+                        break;
+                    case "menu":
+                        menuRendererLocation = 
templateFile.getAttribute("location");
+                        break;
+                }
+            }
+            this.screenRendererLocation = screenRendererLocation;
+            this.formRendererLocation = formRendererLocation;
+            this.menuRendererLocation = menuRendererLocation;
+            this.treeRendererLocation = treeRendererLocation;
+        }
+
+        /**
+         * Constructor to create a new ModelTemplate from the fusion on two 
ModelTemplates
+         * @param currentModelTemplate
+         * @param originModelTemplate
+         */
+        public ModelTemplate (ModelTemplate currentModelTemplate, 
ModelTemplate originModelTemplate) {
+            boolean exist = currentModelTemplate != null;
+            this.name = exist ? currentModelTemplate.name : 
originModelTemplate.name;
+            this.type = exist ? currentModelTemplate.type : 
originModelTemplate.type;
+            this.compress = exist && currentModelTemplate.compress != null ? 
currentModelTemplate.compress : originModelTemplate.compress;
+            this.encoder = exist && currentModelTemplate.encoder != null ? 
currentModelTemplate.encoder : originModelTemplate.encoder;
+            this.contentType = exist && currentModelTemplate.contentType != 
null ? currentModelTemplate.contentType : originModelTemplate.contentType;
+            this.encoding = exist && currentModelTemplate.encoding != null ? 
currentModelTemplate.encoding : originModelTemplate.encoding;
+            this.screenRendererLocation = exist && 
currentModelTemplate.screenRendererLocation != null ? 
currentModelTemplate.screenRendererLocation : 
originModelTemplate.screenRendererLocation;
+            this.formRendererLocation = exist && 
currentModelTemplate.formRendererLocation != null ? 
currentModelTemplate.formRendererLocation : 
originModelTemplate.formRendererLocation;
+            this.treeRendererLocation = exist && 
currentModelTemplate.treeRendererLocation != null ? 
currentModelTemplate.treeRendererLocation : 
originModelTemplate.treeRendererLocation;
+            this.menuRendererLocation = exist && 
currentModelTemplate.menuRendererLocation != null ? 
currentModelTemplate.menuRendererLocation : 
originModelTemplate.menuRendererLocation;
+        }
+        public String getName() {
+            return name;
+        }
+        public String getEncoder() {
+            return encoder;
+        }
+        public String getType() { return type; }
+        public String getCompress() {
+            return compress;
+        }
+        public String getContentType() {
+            return contentType;
+        }
+        public String getEncoding() {
+            return encoding;
+        }
+
+        public String getScreenRendererLocation() {
+            return screenRendererLocation;
+        }
+        public String getFormRendererLocation() {
+            return formRendererLocation;
+        }
+        public String getTreeRendererLocation() {
+            return treeRendererLocation;
+        }
+        public String getMenuRendererLocation() {
+            return menuRendererLocation;
+        }
+    }
+}

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java?rev=1806076&view=auto
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
 (added)
+++ 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
 Thu Aug 24 19:01:34 2017
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * 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.
+ 
*******************************************************************************/
+package org.apache.ofbiz.widget.model;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.xml.parsers.ParserConfigurationException;
+import org.apache.ofbiz.base.location.FlexibleLocation;
+import org.apache.ofbiz.base.util.Debug;
+import org.apache.ofbiz.base.util.FileUtil;
+import org.apache.ofbiz.base.util.UtilMisc;
+import org.apache.ofbiz.base.util.UtilProperties;
+import org.apache.ofbiz.base.util.UtilValidate;
+import org.apache.ofbiz.base.util.UtilXml;
+import org.apache.ofbiz.base.util.cache.UtilCache;
+import org.apache.ofbiz.entity.Delegator;
+import org.apache.ofbiz.entity.GenericEntityException;
+import org.apache.ofbiz.entity.GenericValue;
+import org.apache.ofbiz.entity.condition.EntityCondition;
+import org.apache.ofbiz.entity.util.EntityUtil;
+import org.apache.ofbiz.service.GenericServiceException;
+import org.apache.ofbiz.service.LocalDispatcher;
+import org.apache.ofbiz.widget.renderer.VisualTheme;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+
+/**
+ * Widget Theme Library - Theme factory class
+ */
+public class ThemeFactory {
+
+    public static final String module = ThemeFactory.class.getName();
+
+    private static final UtilCache<String, ModelTheme> themeLocationCache = 
UtilCache.createUtilCache("widget.theme.locationResource", 0, 0, false);
+    private static final UtilCache<String, VisualTheme> 
themeVisualThemeIdCache = 
UtilCache.createUtilCache("widget.theme.idAndVisualTheme", 0, 0, false);
+
+    /**
+     * From a w3c Document return the modelTheme instantiated
+     * @param themeFileDoc
+     * @return
+     */
+    private static ModelTheme readThemeDocument(Document themeFileDoc) {
+        if (themeFileDoc != null) {
+            // read document and construct ModelScreen for each screen element
+            ModelTheme modelTheme = new 
ModelTheme(themeFileDoc.getDocumentElement());
+            return modelTheme;
+        }
+        return null;
+    }
+
+    /**
+     * From a visualThemeId return the VisualTheme object corresponding in 
cache
+     * If it's empty, reload the cache from all Theme definition
+     * @param visualThemeId
+     * @return
+     */
+    private static VisualTheme getVisualThemeFromId(String visualThemeId) {
+        if (visualThemeId == null) return null;
+        VisualTheme visualTheme = themeVisualThemeIdCache.get(visualThemeId);
+        if (visualTheme == null) {
+            synchronized (ThemeFactory.class) {
+                visualTheme = themeVisualThemeIdCache.get(visualThemeId);
+                if (visualTheme == null) {
+                    pullModelThemesFromXmlToCache();
+                }
+                visualTheme = themeVisualThemeIdCache.get(visualThemeId);
+                if (visualTheme == null) {
+                    Debug.logError("Impossible to resolve the modelTheme for 
the visualThemeId " + visualThemeId + ", Common is returned", module);
+                    return themeVisualThemeIdCache.get("COMMON");
+                }
+
+            }
+        }
+        return visualTheme;
+    }
+
+    /**
+     * Scann all Theme.xml definition to reload all VisualTheme oin cache
+     */
+    private static void pullModelThemesFromXmlToCache() {
+        String ofbizHome = System.getProperty("ofbiz.home");
+        try {
+            List<File> xmlThemes = FileUtil.findXmlFiles(ofbizHome, "themes", 
"theme", "widget-theme.xsd");
+            List<File> xmlPluginThemes = FileUtil.findXmlFiles(ofbizHome, 
"plugins", "theme", "widget-theme.xsd");
+            if (UtilValidate.isNotEmpty(xmlPluginThemes)) 
xmlThemes.addAll(xmlPluginThemes);
+            for (File xmlTheme : xmlThemes) {
+                ModelTheme modelTheme = 
getModelThemeFromLocation(xmlTheme.toURI().toURL().toString());
+                if (modelTheme != null) {
+                    for (String containsVisualThemeId : 
modelTheme.getVisualThemeIds()) {
+                        themeVisualThemeIdCache.put(containsVisualThemeId, 
modelTheme.getVisualTheme(containsVisualThemeId));
+                    }
+                }
+            }
+        } catch (IOException e) {
+            Debug.logError("Impossible to initialize models themes in cache 
throw: " + e, module);
+        }
+    }
+
+    /**
+     * From a theme file location, resolve the modelTheme related from the 
cache.
+     * If empty, load the modeTheme definition and put it in cache
+     * @param resourceName
+     * @return
+     */
+    public static ModelTheme getModelThemeFromLocation(String resourceName) {
+        ModelTheme modelTheme = themeLocationCache.get(resourceName);
+        if (modelTheme == null) {
+            synchronized (ThemeFactory.class) {
+                try {
+                    modelTheme = themeLocationCache.get(resourceName);
+                    if (modelTheme == null) {
+                        URL themeFileUrl = null;
+                        themeFileUrl = 
FlexibleLocation.resolveLocation(resourceName);
+                        if (themeFileUrl == null) {
+                            throw new IllegalArgumentException("Could not 
resolve location to URL: " + resourceName);
+                        }
+                        Document themeFileDoc = 
UtilXml.readXmlDocument(themeFileUrl, true, true);
+                        modelTheme = readThemeDocument(themeFileDoc);
+                        themeLocationCache.put(resourceName, modelTheme);
+                    }
+                } catch (IOException | ParserConfigurationException | 
SAXException e) {
+                    Debug.logError("Impossible to resolve the theme from the 
resourceName " + resourceName, module);
+                }
+            }
+        }
+        return modelTheme;
+    }
+
+    /**
+     * Return all visual theme available corresponding to all entries on the 
entity VisualTheme who have linked to a modelTheme
+     * @param delegator
+     * @param visualThemeSetId
+     * @return
+     * @throws GenericEntityException
+     */
+    public static List<VisualTheme> getAvailableThemes(Delegator delegator, 
String visualThemeSetId)
+    throws GenericEntityException {
+        if (themeVisualThemeIdCache.size() == 0) {
+            synchronized (ThemeFactory.class) {
+                if (themeVisualThemeIdCache.size() == 0) {
+                    pullModelThemesFromXmlToCache();
+                }
+            }
+        }
+        LinkedHashMap<String, VisualTheme> visualThemesMap = new 
LinkedHashMap<>();
+        List<GenericValue> visualThemesInDataBase = 
delegator.findList("VisualTheme",
+                EntityCondition.makeCondition("visualThemeSetId", 
visualThemeSetId), null, UtilMisc.toList("visualThemeId"), null, true);
+        List<String> visualThemeIds = 
EntityUtil.getFieldListFromEntityList(visualThemesInDataBase, "visualThemeId", 
true);
+        for (String visualThemeId : visualThemeIds) {
+            visualThemesMap.put(visualThemeId, 
themeVisualThemeIdCache.get(visualThemeId));
+        }
+        return new ArrayList(visualThemesMap.values());
+    }
+
+    /**
+     * Resolve the enabled VisualTheme with this find order
+     * If a user is logged
+     * 1. Check if present en session with key "visualTheme"
+     * 2. Check from user preference
+     * If user isn't logged or visualTheme not find with logged user
+     * 3. Check if visualThemeId has been set on the webapp attribute
+     * 4. Check the general.properties VISUAL_THEME
+     * 5. return COMMON
+     * @param request
+     * @return
+     */
+    public static VisualTheme resolveVisualTheme(HttpServletRequest request) {
+        String visualThemeId = null;
+        HttpSession session = request.getSession();
+        GenericValue userLogin = (GenericValue) 
session.getAttribute("userLogin");
+        //search on request only if a userLogin is present on session 
(otherwise this implied that the user isn't identify so wait
+        if (userLogin != null) {
+            VisualTheme visualTheme = (VisualTheme) 
session.getAttribute("visualTheme");
+            if (visualTheme != null) return visualTheme;
+
+            //resolve on user pref
+            LocalDispatcher dispatcher = (LocalDispatcher) 
request.getAttribute("dispatcher");
+            if (dispatcher != null) {
+                try {
+                    Map<String, Object> userPreferencesResult = 
dispatcher.runSync("getUserPreference",
+                            UtilMisc.toMap("userLogin", userLogin, 
"userPrefTypeId", "VISUAL_THEME"));
+                    visualThemeId = (String) 
userPreferencesResult.get("userPrefValue");
+                } catch (GenericServiceException e) {
+                    Debug.logError("Impossible to resolve the theme from user 
prefrence for " + userLogin.get("userLoginId"), module);
+                }
+            }
+        }
+
+        //resolve from webapp
+        if (visualThemeId == null) {
+            ServletContext servletContext = request.getServletContext();
+            visualThemeId = servletContext.getInitParameter("visualThemeId");
+        }
+
+        //resolve from general properties
+        if (visualThemeId == null) {
+            visualThemeId = UtilProperties.getPropertyValue("general", 
"VISUAL_THEME", "COMMON");
+        }
+        return getVisualThemeFromId(visualThemeId);
+    }
+}

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java?rev=1806076&view=auto
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
 (added)
+++ 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
 Thu Aug 24 19:01:34 2017
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.
+ 
*******************************************************************************/
+package org.apache.ofbiz.widget.renderer;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.ofbiz.base.util.UtilXml;
+import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
+import org.apache.ofbiz.widget.model.ModelTheme;
+import org.w3c.dom.Element;
+
+/**
+ * Widget Theme Library - VisualTheme class
+ */
+public final class VisualTheme {
+
+    public static final String module = VisualTheme.class.getName();
+    private ModelTheme modelTheme;
+    private final String visualThemeId;
+    private final List<String> screenshots;
+    private final FlexibleStringExpander displayName;
+    private final FlexibleStringExpander description;
+
+    public String getVisualThemeId() {
+        return visualThemeId;
+    }
+
+    public List<String> getScreenshots() {
+        return screenshots;
+    }
+
+    public String getDisplayName(Map<String, Object> context) {
+        return displayName.expandString(context);
+    }
+
+    public String getDescription(Map<String, Object> context) {
+        return description.expandString(context);
+    }
+
+    /**
+     * Only constructor to initialize a visualTheme from xml definition
+     * @param modelTheme
+     * @param visualThemeElement
+     */
+    public VisualTheme(ModelTheme modelTheme, Element visualThemeElement) {
+        this.modelTheme = modelTheme;
+        this.visualThemeId = visualThemeElement.getAttribute("id");
+        this.displayName = 
FlexibleStringExpander.getInstance(visualThemeElement.getAttribute("display-name"));
+        this.description = 
FlexibleStringExpander.getInstance(UtilXml.elementValue(UtilXml.firstChildElement(visualThemeElement,
 "description")));
+        List<String> initScreenshots = new ArrayList<>();
+        for (Element screenshotElement : 
UtilXml.childElementList(visualThemeElement, "screenshot")) {
+            initScreenshots.add(screenshotElement.getAttribute("location"));
+        }
+        this.screenshots = Collections.unmodifiableList(initScreenshots);
+    }
+
+    public ModelTheme getModelTheme() {
+        return modelTheme;
+    }
+
+    public String toString() {
+        StringBuilder toString = new 
StringBuilder("visual-theme-id:").append(visualThemeId)
+                .append(", display-name: ").append(this.displayName)
+                .append(", description: ").append(description)
+                .append(", screenshots: ").append(screenshots);
+        return toString.toString();
+    }
+}

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/VisualTheme.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/ofbiz-framework/trunk/themes/README.md
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/README.md?rev=1806076&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/README.md (added)
+++ ofbiz/ofbiz-framework/trunk/themes/README.md Thu Aug 24 19:01:34 2017
@@ -0,0 +1,309 @@
+<!--
+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.
+-->
+Apache OFBiz® Themes
+====================
+
+# What is a theme
+A Theme is an ofbiz component that define all elements necessary to render all 
information generated by the screen engine through a embed technology.
+Currently themes presents in Apache OFBiz use html5/jquery/css to do that.
+
+To realize this, a theme can define some properties that can be necessary, can 
define its own ftl macro to render the different modelScreen elements and can 
define its own screen decorator to prepare the final user screen structure for 
the technology used by the theme.
+# How to define it
+A theme is a standard component, present in the directory themes or plugins 
with a file definition present on widget/Theme.xml and support the 
[widget-theme.xsd](http://ofbiz.apache.org/dtds/widget-theme.xsd)
+
+To offer the possibility for the end users to select the theme throw the 
select theme screen, the theme need to load on the entity VisualTheme one or 
more entries related to this theme
+
+# Structure of Theme.xml
+The theme definition file help OFBiz to know what specific rendering the Theme 
want to use.
+It's composed by two definition elements and four optional blocks
+
+## Main definition
+The First mandatory element is one or several visualThemeId related to the 
theme
+Defined like that
+```xml
+    <visual-themes>
+        <visual-theme id="MY_THEME"/>
+    </visual-themes>
+```
+You need to define in the database an entry on VisualTheme entity for each 
visual-theme id defined there.
+```xml
+<entity-engine-xml>
+    <VisualTheme visualThemeId="MY_THEME" visualThemeSetId="BACKOFFICE" 
description="My theme - Example (based on flatgrey)"/>
+</entity-engine-xml>
+```
+>_Note_: a theme component can load one or more visual theme id. Usually only 
one is present.
+
+The second important (but not mandatory) element is **implements**
+```xml
+   <extends location="component://common-theme/widget/Theme.xml"/>
+```
+This element indicate that your theme copies from the extend theme all 
information not present in its file definition.
+If this element isn't present in your theme, you will need to define all 
information present in common-theme to be sure that OFBiz miss nothing for a 
correct run.
+Otherwise some functionnalities can be broken.
+>_Note_: It's highly recommended to extend the common-theme to be sure that 
your theme works correctly and to surcharge only what you need.
+
+The four following blocks are optionnal if you define an extends theme
+## General properties
+This block contains all properties that the screen engine can use to prepare 
the rendering and that the theme can implement
+```xml
+    <widget-properties><!--Transversal properties relative to ofbiz widget 
component-->
+        <default-view-size value="20"/>
+        <autocompleter
+                default-view-size="10"
+                default-min-lenght="2"
+                default-delay="300"
+                display-return-field="true"/>
+        <lookup
+                position="topleft"
+                width="640"
+                height="500"/>
+        <layered-modal
+                width="800"
+                height="600"/>
+    </widget-properties>
+```
+
+## Theme's specific properties
+This block contains all properties specific to this theme. In general these 
are some propreties present on ftl template, that are initialized by the theme 
and can be surchaged by another theme through the extends elements.
+```xml
+        <property name="jgrowl.position" value="center" 
type="String"/><!--possible value: top-left, top-right, bottom-left, 
bottom-right, center-->
+        <property name="jgrowl.width" value="800" type="Integer"/>
+        <property name="jgrowl.height" value="" type="Integer"/>
+        <property name="jgrowl.speed" value="100" type="Integer"/>
+```
+## Ftl macro library
+This block defines for each technology implemented by the screen engine where 
it can find the macro library for each model (Screen, Form, Tree, Menu)
+```xml
+   <templates><!-- Freemarker template use by this theme to render widget 
model-->
+        <template name="screen" type="html" content-type="UTF-8" 
encoding="none" encoder="html" compress="false">
+            <template-file widget="screen" 
location="component://common-theme/template/macro/HtmlScreenMacroLibrary.ftl"/>
+            <template-file widget="form" 
location="component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
+            <template-file widget="tree" 
location="component://common-theme/template/macro/HtmlTreeMacroLibrary.ftl"/>
+            <template-file widget="menu" 
location="component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl"/>
+        </template>
+        ...
+   </templates>
+```
+>_Note_: If you want surcharge some few macros, you can just create desired 
macros and import the others from common-theme (at the file beginning) like 
that : ```<#include 
"component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>```
+
+## Screen library
+This block defines where OFBiz can find all official screen definition in 
framework/common
+
+Normally, you don't need to change this file except if you need to define a 
default screen style that doesn't exist in the OOTB. If you need to extend an 
existing one, you have to do it in the theme directory.
+
+To define a new default screen style, you have to add it in this file, and 
point to the screen decorator in common-theme to define your default screen 
style as the default one.
+
+```xml
+     <common-screens><!--list all common screen and decorator global to each 
application that each theme can be surcharge or not and use the screen present 
on common theme-->
+        <structural-decorator 
default-location="component://common-theme/widget/CommonScreens.xml">
+            <screen name="GlobalDecorator"/>
+            ...
+        </structural-decorator>
+        <embed-decorator 
default-location="component://common-theme/widget/CommonScreens.xml">
+            <screen name="FindScreenDecorator"/>
+        </embed-decorator>
+        <general-screen 
default-location="component://common-theme/widget/CommonScreens.xml">
+            <screen name="geoChart"/>
+            ...
+        </general-screen>
+    </common-screens>
+```
+Screens are separated on three type :
+* structural-decorator : contains all decorator that organise all the screens 
structure
+* embed-decorator : decorator used only on sub screens
+* general-screen : list all generic inter application screens
+# The common-theme
+This is the root theme that contains all information to ensure a good basic 
theme for OFBiz.
+Currently it keeps all old themes system for backward compatibility with ftl 
template managed by the entity **VisualThemeResource**
+# Create your own theme
+As a theme is a component, you can create a new theme like a plugin. You can 
see more information on this subject [on the ofbiz 
README](https://github.com/apache/ofbiz-framework/blame/trunk/README.md#L584)
+After creating component, you can add the two minimal information :
+* Theme.xml file in **plugins/my-theme/widget/** with mininal trame :
+```xml
+<theme name="my-theme"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd";>
+    <visual-themes>
+        <visual-theme id="MY_THEME" display-name="My Theme"/>
+    </visual-themes>
+</theme>
+```
+* your data file to add your visual theme in **plugins/my-theme/data/**
+```xml
+<entity-engine-xml>
+    <VisualTheme visualThemeId="MY_THEME" visualThemeSetId="BACKOFFICE"/>
+</entity-engine-xml>
+```
+The present of VisualTheme entity help to indicate what theme is available on 
your instance, specially helpful for tenant installation.
+
+For display your theme in OFBiz theme library, you can complete information on 
each visual theme like
+```
+<theme name="my-theme"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd";>
+    <visual-themes>
+        <visual-theme id="MY_THEME" display-name="My Theme">
+            <description>My new funny theme under nice tecnno</description>
+            <screenshot location="/mytheme/screenshot1.png"/>
+            <screenshot location="/mytheme/screenshot2.png"/>
+        </visual-theme>
+    </visual-themes>
+</theme>
+```
+
+>_Note_: **display-name** and **description** support the 
flexibleStringExpander syntax
+
+## extends common-theme
+This is a first step to understand how the theme system works. With your new 
theme, you can try to surchage different elements.
+To start, extends the common-theme :
+```xml
+<theme name="my-theme"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd";>
+    <visual-themes>
+        <visual-theme id="MY_THEME" display-name="My Theme">
+            <description>My new funny theme under nice tecnno</description>
+            <screenshot location="/mytheme/screenshot1.png"/>
+        </visual-theme>
+    </visual-themes>
+    <extends location="component://common-theme/widget/Theme.xml"/>
+</theme>
+```
+Now your theme should be operational but without particularity.
+
+You can surcharge a ftl macro, to do this create your own ftl macro file in 
**plugins/my-theme/templates/macro/HtmlFormMacroLibrary.ftl** with
+
+```ftl
+<#include "component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
+
+<#macro renderDisplayField type imageLocation idName description title class 
alert inPlaceEditorUrl="" inPlaceEditorParams="">
+    <#if description?has_content>
+    *###*${description?replace("\n", "<br />")}**<#t/>
+    <#else>
+        *#&nbsp;#*<#t/>
+    </#if>
+</#macro>
+```
+Now indicate to your theme that you want use this library
+```xml
+<theme name="my-theme"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd";>
+    <visual-themes>
+        <visual-theme id="MY_THEME" display-name="My Theme">
+            <description>My new funny theme under nice tecnno</description>
+            <screenshot location="/mytheme/screenshot1.png"/>
+        </visual-theme>
+    </visual-themes>
+    <extends location="component://common-theme/widget/Theme.xml"/>
+    <templates>
+        <template name="screen" type="html" content-type="UTF-8" 
encoding="none" encoder="html" compress="false">
+            <template-file widget="form" 
location="component://my-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
+        </template>
+    </templates>
+</theme>
+```
+and check the result when you select your theme. Ok ok the result isn't really 
interesting but it's to understand how it works.
+
+## create from scratch
+TODO
+
+# Backware compatibility with OFBiz 16.11 and above
+## How themes worked before
+Before the theme management by model definition, all configuration has been 
present in database through entity VisualTheme and VisualThemeRessource.
+These ressources has been load on layoutProperties variable and learn directly 
by decorator screen and ftl template.
+
+## Now with the common-theme
+All this logical is currently present on the common-theme template to keep the 
backward compatibility, but the VisualThemeRessource is now useless and 
properties has been migrate to the Theme definition in the part 
**theme-properties**
+### Example with Bluelight
+The blue light theme has been these properties in VisualThemeRessource :
+
+```xml
+    <VisualTheme visualThemeId="BLUELIGHT" visualThemeSetId="BACKOFFICE" 
description="BlueLight Theme: breadcrumbs, drop-down menus and rounded 
corners"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_NAME" resourceValue="BLUELIGHT" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.gif" 
sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" 
sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/bluelight/screenshot.jpg" 
sequenceId="01"/>
+
+    <!-- CSS references -->
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bluelight/style.css" 
sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HELPSTYLESHEET" resourceValue="/bluelight/help.css" 
sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_DOCBOOKSTYLESHEET" 
resourceValue="/bluelight/webapp/bluelight/docbook.css" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_STYLESHEET" 
resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css"
 sequenceId="02"/>
+
+    <!-- Javascript references -->
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/jquery-1.11.0.min.js" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/jquery-migrate-1.2.1.js" sequenceId="02"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/ui/js/jquery-ui-1.10.3.min.js" sequenceId="03"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js"
 sequenceId="05"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon.min-1.4.3.js"
 sequenceId="07"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/fjTimer/jquerytimer-min.js" 
sequenceId="09"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/jquery.maskedinput-1.3.1.min.js" 
sequenceId="10"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/jeditable/jquery.jeditable.js" 
sequenceId="11"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/jquery/plugins/validate/jquery.validate.min.js" 
sequenceId="12"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/OpenLayers-2.13.1.js" sequenceId="13"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/OfbizUtil.js" 
sequenceId="15"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/fieldlookup.js" 
sequenceId="16"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/date/date.format-1.2.3-min.js" sequenceId="17"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/date/date.timezone-min.js" sequenceId="18"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/miscAjaxFunctions.js" sequenceId="19"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/selectMultipleRelatedValues.js" sequenceId="20"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/images/util.js" 
sequenceId="21"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" 
resourceValue="/images/date/FromThruDateCheck.js" sequenceId="22"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/bluelight/dropdown.js" 
sequenceId="30"/>
+
+    <!-- ftl references -->
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_HDR_TMPLT_LOC" 
resourceValue="component://bluelight/template/Header.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_FTR_TMPLT_LOC" 
resourceValue="component://bluelight/template/Footer.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_NAV_OPEN_TMPLT" 
resourceValue="component://bluelight/template/AppBarOpen.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_NAV_CLOSE_TMPLT" 
resourceValue="component://bluelight/template/AppBarClose.ftl" sequenceId="01"/>
+    <VisualThemeResource visualThemeId="BLUELIGHT" 
resourceTypeEnumId="VT_MSG_TMPLT_LOC" 
resourceValue="component://bluelight/template/Messages.ftl" sequenceId="01"/>
+```
+Now it's just
+```xml
+    <VisualTheme visualThemeId="BLUELIGHT" visualThemeSetId="BACKOFFICE"/>
+```
+And on theme definition
+
+```xml
+    <theme-properties>
+        <!--javascript lib-->
+        <property name="VT_HDR_JAVASCRIPT['add']" 
value="/bluelight/dropdown.js" sequenceId="30"/>
+        <!--Css style-->
+        <property name="VT_STYLESHEET['add']" value="/bluelight/style.css"/>
+        <property name="VT_HELPSTYLESHEET['add']" value="/bluelight/help.css"/>
+        <property name="VT_DOCBOOKSTYLESHEET['add']" 
value="/bluelight/webapp/bluelight/docbook.css"/>
+        <!--template location-->
+        <property name="VT_HDR_TMPLT_LOC" 
value="component://bluelight/template/Header.ftl"/>
+        <property name="VT_FTR_TMPLT_LOC" 
value="component://bluelight/template/Footer.ftl"/>
+        <property name="VT_NAV_OPEN_TMPLT" 
value="component://bluelight/template/AppBarOpen.ftl"/>
+        <property name="VT_NAV_CLOSE_TMPLT" 
value="component://bluelight/template/AppBarClose.ftl"/>
+        <property name="VT_MSG_TMPLT_LOC" 
value="component://bluelight/template/Messages.ftl"/>
+    </theme-properties>
+```
+Values with **/images/...** has been move to the common-theme that bluelight 
extends, the theme definition keep only what the theme use more the extended 
theme.
+
+>_Note_ property name support the FlexibleMapAccessor syntax, so you can 
continue to populate a list (VT_STYLESHEET['add']), reset a list 
(VT_STYLESHEET[]) or add an element on the top list (VT_STYLESHEET[+0]) because 
some time the order librry load is important
+
+### Migrate you own theme
+Easily, create you Theme.xml and move your VisualThemeResource in 
**theme-properties** like bluelight example.
+Maybe you need to update you template because the modelTheme return ressources 
not always as list. So :
+`<property name="VT_HDR_TMPLT_LOC" 
value="component://bluelight/template/Header.ftl"/>` -> return a String with 
`component://bluelight/template/Header.ftl`
+`<property name="VT_STYLESHEET['add'] value="..."` -> return a List<String>
+

Propchange: ofbiz/ofbiz-framework/trunk/themes/README.md
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/themes/README.md
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/themes/README.md
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml?rev=1806076&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml 
(added)
+++ ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml 
Thu Aug 24 19:01:34 2017
@@ -0,0 +1,25 @@
+<?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.
+-->
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd";>
+    <property key="CommonThemeVisualThemeDescription">
+        <value xml:lang="en">Common theme on techno html5/css/jquery</value>
+        <value xml:lang="fr">Theme principal sur la techno 
html5/css/jquery</value>
+    </property>
+</resource>

Propchange: 
ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/themes/common/config/CommonThemeUiLabels.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml?rev=1806076&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml (added)
+++ ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml Thu Aug 
24 19:01:34 2017
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<entity-engine-xml>
+    <!--Currently disable
+    <VisualTheme visualThemeId="COMMON" visualThemeSetId="BACKOFFICE" 
description="Common Theme"/>
+    -->
+</entity-engine-xml>

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/data/CommonThemeData.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml?rev=1806076&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml (added)
+++ ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml Thu Aug 24 
19:01:34 2017
@@ -0,0 +1,39 @@
+<?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.
+-->
+
+<ofbiz-component name="common-theme"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd";>
+    <!-- define resource loaders; most common is to use the component resource 
loader -->
+    <resource-loader name="main" type="component"/>
+    <classpath type="dir" location="config"/>
+
+    <!-- entity resources: model(s), eca(s), group, and data definitions -->
+    <entity-resource type="data" reader-name="seed" loader="main" 
location="data/CommonThemeData.xml"/>
+
+    <!-- web applications -->
+    <webapp name="common-theme"
+        title="common theme"
+        menu-name="secondary"
+        server="default-server"
+        location="webapp/common"
+        mount-point="/common"
+        app-bar-display="false"/>
+</ofbiz-component>

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/themes/common/ofbiz-component.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml


Reply via email to