You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2017/08/30 21:33:47 UTC
svn commit: r1806741 - in /ofbiz/ofbiz-framework/trunk:
framework/widget/config/widget.properties
framework/widget/dtd/widget-theme.xsd
framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
themes/common/widget/Theme.xml
Author: nmalin
Date: Wed Aug 30 21:33:47 2017
New Revision: 1806741
URL: http://svn.apache.org/viewvc?rev=1806741&view=rev
Log:
Fixed: the lookup property showDescription not present in common-theme (OFBIZ-9138 Create a common theme)
Display or not a description hasn't been loaded in the theme definition. I finished this migration to be sure to found all properties linked to lookups in the same place.
Modified:
ofbiz/ofbiz-framework/trunk/framework/widget/config/widget.properties
ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml
Modified: ofbiz/ofbiz-framework/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/config/widget.properties?rev=1806741&r1=1806740&r2=1806741&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/config/widget.properties Wed Aug 30 21:33:47 2017
@@ -30,9 +30,6 @@ widget.verbose=true
# Default number of items to be displayed per page in a list form
widget.form.defaultViewSize=20
-# Show/hide description for lookup field
-widget.lookup.showDescription=Y
-
# Default text find field's option
widget.form.defaultTextFindOption=contains
Modified: 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=1806741&r1=1806740&r2=1806741&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-theme.xsd Wed Aug 30 21:33:47 2017
@@ -104,6 +104,14 @@ under the License.
</xs:restriction>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute name="show-description">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Y"/>
+ <xs:enumeration value="N"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="layered-modal">
Modified: 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=1806741&r1=1806740&r2=1806741&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java Wed Aug 30 21:33:47 2017
@@ -62,6 +62,7 @@ public class ModelTheme implements Seria
private final String lookupPosition;
private final Integer lookupWidth;
private final Integer lookupHeight;
+ private final String lookupShowDescription;
//Default size for layered modal windows
private final Integer linkDefaultLayeredModalWidth;
private final Integer linkDefaultLayeredModalHeight;
@@ -102,6 +103,7 @@ public class ModelTheme implements Seria
initWidgetPropertiesMap.put("lookupPosition", originTheme.lookupPosition);
initWidgetPropertiesMap.put("lookupWidth", originTheme.lookupWidth);
initWidgetPropertiesMap.put("lookupHeight", originTheme.lookupHeight);
+ initWidgetPropertiesMap.put("lookupShowDescription", originTheme.lookupShowDescription);
initWidgetPropertiesMap.put("linkDefaultLayeredModalWidth", originTheme.linkDefaultLayeredModalWidth);
initWidgetPropertiesMap.put("linkDefaultLayeredModalHeight", originTheme.linkDefaultLayeredModalHeight);
@@ -172,6 +174,7 @@ public class ModelTheme implements Seria
this.autocompleterDefaultMinLength = (Integer) initWidgetPropertiesMap.get("autocompleterDefaultMinLength");
this.autocompleterDefaultDelay = (Integer) initWidgetPropertiesMap.get("autocompleterDefaultDelay");
this.autocompleterDisplayReturnField = (Boolean) initWidgetPropertiesMap.get("autocompleterDisplayReturnField");
+ this.lookupShowDescription = (String) initWidgetPropertiesMap.get("lookupShowDescription");
this.lookupPosition = (String) initWidgetPropertiesMap.get("lookupPosition");
this.lookupWidth = (Integer) initWidgetPropertiesMap.get("lookupWidth");
this.lookupHeight = (Integer) initWidgetPropertiesMap.get("lookupHeight");
@@ -227,6 +230,9 @@ public class ModelTheme implements Seria
public String getLookupPosition() {
return lookupPosition;
}
+ public String getLookupShowDescription() {
+ return lookupShowDescription;
+ }
/**
* for a map preloaded with the origin values, surcharge them from xml definition
@@ -249,6 +255,7 @@ public class ModelTheme implements Seria
initWidgetPropertiesMap.put("lookupPosition", childElement.getAttribute("position"));
initWidgetPropertiesMap.put("lookupHeight", Integer.valueOf(childElement.getAttribute("height")));
initWidgetPropertiesMap.put("lookupWidth", Integer.valueOf(childElement.getAttribute("width")));
+ initWidgetPropertiesMap.put("lookupShowDescription", childElement.getAttribute("show-description"));
break;
case "layered-modal":
initWidgetPropertiesMap.put("linkDefaultLayeredModalHeight", Integer.valueOf(childElement.getAttribute("height")));
Modified: ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml?rev=1806741&r1=1806740&r2=1806741&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml (original)
+++ ofbiz/ofbiz-framework/trunk/themes/common/widget/Theme.xml Wed Aug 30 21:33:47 2017
@@ -37,7 +37,8 @@ under the License.
<lookup
position="top-left"
width="640"
- height="500"/>
+ height="500"
+ show-description="Y"/>
<layered-modal
width="800"
height="600"/>