svn commit: r933226 - /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: r933226 - /ofbiz/trunk/framework/images/webapp/images/fieldlookup.js

jleroux@apache.org
Author: jleroux
Date: Mon Apr 12 13:27:02 2010
New Revision: 933226

URL: http://svn.apache.org/viewvc?rev=933226&view=rev
Log:
A patch from Sascha Rodekamp "Opening a lookup from a lookup in IE8 does not work", part of https://issues.apache.org/jira/browse/OFBIZ-3668 - OFBIZ-3668

The IE had problems with the variable 'item' ... maybe a reserved word ?!


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=933226&r1=933225&r2=933226&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Mon Apr 12 13:27:02 2010
@@ -156,12 +156,12 @@ var FieldLookupCounter = Class.create({
     setReference: function (key, ref) {
         //if key doesn't exist in the array and
         var bool = true;
-        for (item in this.refArr) {
-            if (item == key) {
+        for (itm in this.refArr) {
+            if (itm == key) {
                 bool = false;
                 break;
             }
-        };
+        }
 
         if (bool) {
             this.refArr[key] = ref;
@@ -177,19 +177,14 @@ var FieldLookupCounter = Class.create({
     },
     
     createNextKey: function () {
-        var count = 0;
-        for (item in this.refArr) {
-            count++;
-        };
-        
         return this.countFields() + "_lookupId";
     },
     
     countFields: function () {
         var count = 0;
-        for (item in this.refArr) {
+        for (itm in this.refArr) {
             count++;
-        };
+        }
         
         return count;
     },
@@ -257,6 +252,12 @@ var FieldLookupPopup = Class.create({
         }
         // removes the layer after fading
         window.setTimeout('' + this.removeLayer() + '', 400);
+        
+        //identify the next lookup
+        lastLookup = GLOBAL_LOOKUP_REF.getReference((GLOBAL_LOOKUP_REF.countFields() - 1) + "_lookupId");
+        if (lastLookup != null) {
+            identifyLookup(lastLookup.globalRef);
+        }
     },
 
     createElement: function () {