Author: jleroux
Date: Tue May 3 21:32:03 2011 New Revision: 1099270 URL: http://svn.apache.org/viewvc?rev=1099270&view=rev Log: Related to r1099244 "Default delay for ajaxAutoCompleter". I forgot some pieces of the puzzle. When I manually quickly tested it worked but of course I did not test all cases. This should be OK now Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1099270&r1=1099269&r2=1099270&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Tue May 3 21:32:03 2011 @@ -66,6 +66,7 @@ under the License. /><#t/> <#if ajaxEnabled?has_content && ajaxEnabled> <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")> + <#assign defaultDelay = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultDelay")> <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', false, ${defaultMinLength!2}, ${defaultDelay!300});</script><#lt/> </#if> </#macro> @@ -573,6 +574,7 @@ ${item.description}</span> <#else> <#if ajaxEnabled?has_content && ajaxEnabled> <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")> + <#assign defaultDelay = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultDelay")> <#if parameters?has_content && parameters._LAST_VIEW_NAME_?has_content> <#local ajaxUrl = ajaxUrl + "&_LAST_VIEW_NAME_=" + parameters._LAST_VIEW_NAME_ /> <#else> @@ -588,7 +590,7 @@ ${item.description}</span> </#if> <script type="text/javascript"> jQuery(document).ready(function(){ - new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>, "${presentation!}", "${defaultMinLength!2}"<#rt/> + new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>, "${presentation!}", "${defaultMinLength!2}", "${defaultDelay!300}"<#rt/> <#if targetParameterIter?has_content> <#assign isFirst = true> <#lt/>, [<#rt/> @@ -614,7 +616,7 @@ ${item.description}</span> <#elseif ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0> <#local ajaxUrl = ajaxUrl + "&_LAST_VIEW_NAME_=main"/> </#if> - <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', ${showDescription}, ${defaultMinLength!2});</script><#t/> + <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', ${showDescription}, ${defaultMinLength!2}, ${defaultDelay!300});</script><#t/> </#if> </#macro> |
Free forum by Nabble | Edit this page |