svn commit: r944621 - /ofbiz/trunk/framework/images/webapp/images/fieldlookup.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r944621 - /ofbiz/trunk/framework/images/webapp/images/fieldlookup.js

jleroux@apache.org
Author: jleroux
Date: Sat May 15 12:03:11 2010
New Revision: 944621

URL: http://svn.apache.org/viewvc?rev=944621&view=rev
Log:
A patch for "Allow to open a layer lookup from a layer lookup recursively" (https://issues.apache.org/jira/browse/OFBIZ-3693) - OFBIZ-3693

I keep the issue open because there is still a not blocking little quirk. I will have a look soon...

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

Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=944621&r1=944620&r2=944621&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Sat May 15 12:03:11 2010
@@ -156,20 +156,16 @@ var FieldLookupCounter = Class.create({
     
     setReference: function (key, ref) {
         //if key doesn't exist in the array and
-        var bool = true;
         for (itm in this.refArr) {
             if (itm == key) {
-                bool = false;
-                break;
+                prefix = key.substring(0, key.indexOf("_"));
+                key = prefix + "_" + key;
+                this.refArr[key] = ref;
+                return this.refArr[key];
             }
         }
-
-        if (bool) {
-            this.refArr[key] = ref;
-            return this.refArr[key];
-        }
-        
-        return null;
+        this.refArr[key] = ref;
+        return this.refArr[key];
     },
     
     getReference: function (key) {