Author: jleroux
Date: Thu May 21 14:18:16 2015
New Revision: 1680881
URL:
http://svn.apache.org/r1680881Log:
A better patch from Adrian for "Field Lookup do not show description when widget-verbose is set to false"
https://issues.apache.org/jira/browse/OFBIZ-6396When widget verbose is set to false and using field lookup, the description of the selected object is not displayed (not using auto completion but the popup).
To reproduce : Set widget.verbose=false in framework/widget/config/widget.properties
Clear OFBiz cache then go to :
https://localhost:8443/partymgr/control/EditPartyRelationships?partyId=CompanyIn the partyRelationship creation form, in party Id From field, click on lookup, search, select AUTHOR_MADMAX, and so no description displayed. Using autocompletion it's fine.
jleroux: This reverts the previous patch from Gil. It did not occur to me that all the rest of the result was only commented out HTML code, so a simple trim was enough. Happy to get rid of this ugly kludge
Modified:
ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
Modified: ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=1680881&r1=1680880&r2=1680881&view=diff==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Thu May 21 14:18:16 2015
@@ -28,7 +28,7 @@ under the License.
</#if>
</#if>
</#list>
- <#if (displayString?trim?has_content )><!-- displayString -->${displayString?trim}<!-- --></#if>
+ <#if (displayString?trim?has_content )>${displayString?trim}</#if>
</#list>
</#if>
<#else>
Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=1680881&r1=1680880&r2=1680881&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Thu May 21 14:18:16 2015
@@ -835,10 +835,7 @@ lookupDescriptionLoaded.prototype.update
data : this.allParams,
async : false,
success : function(result) {
- if (result.split("displayString -->")[1]) {
- setLookDescription(_fieldId, result.split("displayString -->")[1].trim().split("<!--")[0].trim(),
- "", "");
- }
+ setLookDescription(_fieldId, result.trim(), "", "");
}
});
}