You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/11/04 10:54:35 UTC
svn commit: r1712520 - in /ofbiz/trunk/framework:
images/webapp/images/fieldlookup.js widget/config/widget.properties
widget/templates/htmlFormMacroLibrary.ftl
Author: jleroux
Date: Wed Nov 4 09:54:34 2015
New Revision: 1712520
URL: http://svn.apache.org/viewvc?rev=1712520&view=rev
Log:
Implements "Improve the way default position and size lookup parameters are set" https://issues.apache.org/jira/browse/OFBIZ-6710
Inspired by Nicolas's recent work on modal-layer windows
Modified:
ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
ofbiz/trunk/framework/widget/config/widget.properties
ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=1712520&r1=1712519&r2=1712520&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Wed Nov 4 09:54:34 2015
@@ -181,9 +181,9 @@ var Lookup = function(options) {
dialogTarget : options.dialogTarget || "",
dialogOptionalTarget : options.dialogOptionalTarget || "",
formName : options.formName || "",
- width : options.width || "620",
- height : options.height || "500",
- position : options.position || "topleft",
+ width : options.width,
+ height : options.height,
+ position : options.position,
modal : options.modal || "true",
ajaxUrl : options.ajaxUrl || "",
showDescription : options.showDescription || "",
Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=1712520&r1=1712519&r2=1712520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Wed Nov 4 09:54:34 2015
@@ -45,6 +45,11 @@ widget.autocompleter.displayReturnField=
# Show/hide description for lookup field
widget.lookup.showDescription=Y
+# Default position and size for lookup layered windows
+widget.lookup.position=topleft
+widget.lookup.width=620
+widget.lookup.height=500
+
# Default text find field's option
widget.form.defaultTextFindOption=contains
@@ -57,7 +62,7 @@ widget.form.displayhelpText=Y
# first appears.
widget.defaultNoConditionFind=N
-#Default size for layered modal windows
+#Default size for layered modal windows
widget.link.default.layered-modal.width=800
widget.link.default.layered-modal.height=600
Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1712520&r1=1712519&r2=1712520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Nov 4 09:54:34 2015
@@ -648,6 +648,15 @@ Parameter: tabindex, String, optional -
<#local showDescription = "false" />
</#if>
</#if>
+ <#if (!position?has_content)>
+ <#local position = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.position", "topleft")>
+ </#if>
+ <#if (!width?has_content)>
+ <#local width = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.width", "620")>
+ </#if>
+ <#if (!height?has_content)>
+ <#local height = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.height", "500")>
+ </#if>
<#if ajaxEnabled?has_content && ajaxEnabled>
<script type="text/javascript">
jQuery(document).ready(function(){