This should be fixed in the macro (which I'm working on now). The bug isn't in the JavaScript, it is in the macro that treats a boolean as a String.

-Adrian

On 6/22/2011 2:47 PM, [email protected] wrote:
Author: jleroux
Date: Wed Jun 22 13:47:14 2011
New Revision: 1138463

URL: http://svn.apache.org/viewvc?rev=1138463&view=rev
Log:
Fixes a bug reported by someone on main OFBiz wiki page (will be removed from 
there)

=======================================================================
ajax FieldLookup bug for ofbiz 11.04
showDescription="false" is not work
you should add the code in [selectall.js] file
method "function ajaxAutoCompleter(areaCsvString, showDescription, defaultMinLength, 
formName){"

at header:
{code:title=selectall.js|borderStyle=solid}
////////////////////////////////////////////////////////////
  if(typeof(showDescription)=="string"){
   showDescription = showDescription== "false"? false : true;
  }
////////////////////////////////////////////////////////////
{code}

then it will be work.
=======================================================================

Modified:
     ofbiz/trunk/framework/images/webapp/images/selectall.js

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1138463&r1=1138462&r2=1138463&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Jun 22 13:47:14 
2011
@@ -393,6 +393,10 @@ function ajaxAutoCompleter(areaCsvString
      var areaArray = areaCsvString.replace(/&/g, '&').split(",");
      var numAreas = parseInt(areaArray.length / 3);

+    if (typeof(showDescription) == "string") {
+      showDescription = showDescription == "false" ? false : true;
+    }
+
      for (var i = 0; i<  numAreas * 3; i = i + 3) {
          var url = areaArray[i + 1] + "?" + areaArray[i + 2];
          var div = areaArray[i];


Reply via email to