Author: sascharodekamp
Date: Mon Jul  9 09:13:54 2012
New Revision: 1358988

URL: http://svn.apache.org/viewvc?rev=1358988&view=rev
Log:
fixed a js bug in the lookups - worng link parsing if there's a slash '/' in 
the data 

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=1358988&r1=1358987&r2=1358988&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Mon Jul  9 
09:13:54 2012
@@ -449,7 +449,7 @@ var FieldLookupCounter = function() {
        };
 
 };
-var GLOBAL_LOOKUP_REF = new FieldLookupCounter;
+var GLOBAL_LOOKUP_REF = new FieldLookupCounter();
 
 
/*******************************************************************************
  * Button Modifier Object
@@ -474,8 +474,8 @@ var ButtonModifier = function(lookupDiv)
 
                var slTitleBars = jQuery("#" + lookupDiv + " 
.screenlet-title-bar");
 
-               jQuery.each(slTitleBars, function(i) {
-                       var slTitleBar = slTitleBars[i];
+               jQuery.each(slTitleBars, function(index) {
+                       var slTitleBar = slTitleBars[index];
                        var ul = slTitleBar.firstChild;
                        if ((typeof ul) != 'object') {
                                return true;
@@ -610,10 +610,10 @@ var ButtonModifier = function(lookupDiv)
                                jQuery.each(cellChilds, function(child) {
                                        if (cellChilds[child].tagName == "A") {
                                                var link = 
cellChilds[child].href;
-                                               var liSub = 
link.substring(link.lastIndexOf('/') + 1, (link.length));
-                                               if 
(liSub.indexOf("javascript:set_") != -1) {
+                                               if 
(link.indexOf("javascript:set_") != -1) {
                                                        cellChilds[child].href 
= link;
                                                } else {
+                                                       var liSub = 
link.substring(link.lastIndexOf('/') + 1, (link.length));
                                                        cellChilds[child].href 
= "javascript:lookupAjaxRequest('" + liSub + "&presentation=layer')";
                                                }
                                        }


Reply via email to