svn commit: r947007 - in /ofbiz/branches/release10.04: ./ 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: r947007 - in /ofbiz/branches/release10.04: ./ framework/images/webapp/images/fieldlookup.js

jleroux@apache.org
Author: jleroux
Date: Fri May 21 13:55:38 2010
New Revision: 947007

URL: http://svn.apache.org/viewvc?rev=947007&view=rev
Log:
"Applied fix from trunk for revision: 947004"
------------------------------------------------------------------------
r947004 | jleroux | 2010-05-21 15:42:45 +0200 (ven. 21 mai 2010) | 1 ligne

A patch from Sascha Rodekamp fix an issue with layered lookups call recursively in IE (see https://issues.apache.org/jira/browse/OFBIZ-3450) - OFBIZ-3450
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release10.04/   (props changed)
    ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js

Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 21 13:55:38 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596
+/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004

Modified: ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js?rev=947007&r1=947006&r2=947007&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Fri May 21 13:55:38 2010
@@ -555,48 +555,48 @@ function hideLookup() {
 //global expand/col button var
 var COLLAPSE = 1999;
 function getNextCollapseSeq() {
- COLLAPSE++;
- return COLLAPSE;
+    COLLAPSE++;
+    return COLLAPSE;
 }
 
 //modify epande/ collapse button
 function modifyCollapseable(lookupDiv){
- if (!lookupDiv) {
- return;
- }
-
+    if (!lookupDiv) {
+        return;
+    }
+    
     var slTitleBars = lookupDiv.getElementsByClassName('screenlet-title-bar');
     for (i in slTitleBars) {
-     var slTitleBar = slTitleBars[i];
-    
-     var ul = slTitleBar.firstChild;
-
-     if ((typeof ul) != 'object') {
-     continue;
-     }
-
-     var childElements = ul.childNodes;
-     for (j in childElements) {
-     if (childElements[j].className == 'expanded' ||childElements[j].className == 'collapsed') {
-     break;
-     }
-     }
-    
-     getNextCollapseSeq();
-     var childEle = childElements[j].firstChild;
-     childEle.onclick = function () {
-     toggleScreenlet(childEle, 'lec' + COLLAPSE, 'true', 'Expand', 'Collapse');
-     };
-     slTitleBar.next('div').setAttribute('id', 'lec' + COLLAPSE);
-    
+        var slTitleBar = slTitleBars[i];
+        
+        var ul = slTitleBar.firstChild;
+
+        if ((typeof ul) != 'object') {
+            continue;
+        }
+
+        var childElements = ul.childNodes;
+        for (j in childElements) {
+            if (childElements[j].className == 'expanded' ||childElements[j].className == 'collapsed') {
+                break;
+            }
+        }
+        
+        getNextCollapseSeq();
+        var childEle = childElements[j].firstChild;
+        childEle.onclick = function () {
+            toggleScreenlet(childEle, 'lec' + COLLAPSE, 'true', 'Expand', 'Collapse');
+        };
+        slTitleBar.next('div').setAttribute('id', 'lec' + COLLAPSE);
+        
     }
 }
 
 function modifySubmitButton (lookupDiv) {
- /* changes form/submit behavior for Lookup Layer */
+    /* changes form/submit behavior for Lookup Layer */
     if (lookupDiv) {
         modifyCollapseable(lookupDiv);
-    
+        
         //find the lookup form
         var forms = lookupDiv.getElementsByTagName('form');
         var lookupForm = null;
@@ -619,8 +619,8 @@ function modifySubmitButton (lookupDiv)
         //set new links for lookups
         var newLookups = $A(lookupDiv.getElementsByClassName('field-lookup'));
         newLookups.each(function(newLookup){
-         var link = newLookup.getElementsByTagName('a')[0].href;
-         newLookup.getElementsByTagName('a')[0].href = String.replace(link, 'document.'+oldFormName, 'document.'+'form_' + GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).globalRef);
+            var link = newLookup.getElementsByTagName('a')[0].href;
+            newLookup.getElementsByTagName('a')[0].href = String.replace(link, 'document.'+oldFormName, 'document.'+'form_' + GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).globalRef);
         });
 
         //disable the form action
@@ -666,7 +666,7 @@ function modifySubmitButton (lookupDiv)
                             var select = eleChild[k].getElementsByTagName("SELECT");
 
                             if (link.length > 0) {
-                             link[0].href = "javascript:lookupPaginationAjaxRequest('" + link[0].href + "', '" + lookupForm.id + "', 'link')";
+                                link[0].href = "javascript:lookupPaginationAjaxRequest('" + link[0].href + "', '" + lookupForm.id + "', 'link')";
                             } else if (select.length > 0) {
                                 try {
                                     var oc = select[0].getAttribute("onchange");
@@ -788,10 +788,10 @@ function lookupAjaxRequest(request) {
 * @return
 */
 function lookupFormAjaxRequest(formAction, form) {
- lookupDiv = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).divRef);
- lookupContent = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).contentRef);
-
- new Ajax.Request(formAction, {
+    lookupDiv = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).divRef);
+    lookupContent = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).contentRef);
+    
+    new Ajax.Request(formAction, {
         method: 'post',
         parameters: $(form).serialize(), requestHeaders: {
             Accept: 'application/json'
@@ -819,10 +819,10 @@ function lookupFormAjaxRequest(formActio
 }
 
 function lookupPaginationAjaxRequest(navAction, form, type) {
- lookupDiv = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).divRef);
- lookupContent = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).contentRef);
+    lookupDiv = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).divRef);
+    lookupContent = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).contentRef);
 
- if (type == 'link') {
+    if (type == 'link') {
         navAction = navAction.substring(0, navAction.length - 1);
     }
     navAction = navAction + "&presentation=layer";
@@ -872,12 +872,12 @@ function setSourceColor(src) {
 }
 // function passing selected value to calling window
 function set_value (value) {
- if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
+    if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
     obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget);
- }
- else{
- obj_caller.target = obj_caller.targetW;
- }
+    }
+    else{
+    obj_caller.target = obj_caller.targetW;        
+    }    
     var target = obj_caller.target;
     
     write_value(value, target);
@@ -886,13 +886,13 @@ function set_value (value) {
 }
 // function passing selected value to calling window
 function set_values (value, value2) {
- if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
- obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget.id);
- }
- else{
- obj_caller.target = obj_caller.targetW;
- }
- var target = obj_caller.target;
+    if(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP)){
+    obj_caller.target = $(GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).parentTarget.id);
+    }
+    else{
+    obj_caller.target = obj_caller.targetW;        
+    }
+    var target = obj_caller.target;
     var target2 = obj_caller.target2;
     write_value(value, target);
     write_value(value2, target2)