You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2011/07/03 03:49:35 UTC

svn commit: r1142358 - in /ofbiz/trunk/framework/common: webcommon/includes/ajaxAutocompleteOptions.ftl widget/CommonScreens.xml

Author: adrianc
Date: Sun Jul  3 01:49:35 2011
New Revision: 1142358

URL: http://svn.apache.org/viewvc?rev=1142358&view=rev
Log:
Minor Ajax code improvements:

1. LookupDecorator checks the value of the ajaxLookup parameter instead of checking if it exists.

2. The displayReturnField widget.properties setting can be overridden in a request.

Modified:
    ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
    ofbiz/trunk/framework/common/widget/CommonScreens.xml

Modified: ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=1142358&r1=1142357&r2=1142358&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Sun Jul  3 01:49:35 2011
@@ -35,7 +35,9 @@ under the License.
 <script type="text/javascript">
     <#if autocompleteOptions?exists>
   var autocomp = [
-        <#assign displayReturnField = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.displayReturnField")>
+        <#if !displayReturnField?exists>
+            <#assign displayReturnField = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.displayReturnField")>
+        </#if>
         <#list autocompleteOptions as autocompleteOption>
             {
             <#assign displayString = ""/>

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=1142358&r1=1142357&r2=1142358&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sun Jul  3 01:49:35 2011
@@ -280,7 +280,7 @@ under the License.
     <screen name="LookupDecorator">
         <section>
             <condition>
-                <if-empty field="parameters.ajaxLookup"/>
+                <not><if-compare operator="equals" value="Y" field="parameters.ajaxLookup"/></not>
             </condition>
             <widgets>
                 <section>