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

jleroux@apache.org
Author: jleroux
Date: Thu May 20 11:52:00 2010
New Revision: 946597

URL: http://svn.apache.org/viewvc?rev=946597&view=rev
Log:
"Applied fix from trunk for revision: 946596"
------------------------------------------------------------------------
r946596 | jleroux | 2010-05-20 13:47:30 +0200 (jeu. 20 mai 2010) | 5 lignes

A patch from Sascha Rodekamp "When you get disconnected (time out) from a layered lookup, you then get afterward ugly screens" https://issues.apache.org/jira/browse/OFBIZ-3450 - OFBIZ-3450

Fixes: when user session is destroyed: Log into an application (accounting for example) and select a form - layered lookups work correct. In another tab log into another application and then log out. Then on the first tab (accounting) try to use a lookup. In the lookup screen you will get the login screen (that's OK) but once you enter your username and password you get a blank screen.

Another issue related to external key is still existing
------------------------------------------------------------------------


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 Thu May 20 11:52:00 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
+/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

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=946597&r1=946596&r2=946597&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Thu May 20 11:52:00 2010
@@ -343,6 +343,11 @@ var FieldLookupPopup = Class.create({
             parameters: { presentation : "layer" },
             onSuccess: function (transport) {
                 var lookupContent = transport.responseText;
+                //if the return screen contains the login page, the whole page have do be redirected
+                if (lookupContent.search(/loginform/) != -1) {
+                    window.location.href = window.location.href;
+                    return;
+                }
                 lookupDiv.appendChild(lookupCont);
                 lookupCont.insert({
                     bottom: "" + lookupContent + ""
@@ -360,10 +365,11 @@ var FieldLookupPopup = Class.create({
         var pageSize = this.getPageSize();
         var fadedBackground = new Element ('DIV', {
             id: GLOBAL_LOOKUP_REF.createNextKey() + "_fadedBackground",
-            class: "fadedBackground" ,
             style: "width: " + pageSize[0] + "px; height: " + pageSize[1] + "px;"
             });
-
+        fadedBackground.setAttribute("class", "fadedBackground");
+        fadedBackground.setAttribute("className", "fadedBackground");
+        
         document.body.appendChild(fadedBackground);
     },
     
@@ -755,6 +761,11 @@ function lookupAjaxRequest(request) {
         },
         onSuccess: function (transport) {
             var formRequest = transport.responseText;
+            //if the return screen contains the login page, the whole page have do be redirected
+            if (formRequest.search(/loginform/) != -1) {
+                window.location.href = window.location.href;
+                return;
+            }
             lookupContent.remove();
             var lookupCont = new Element('DIV', {
                 id: "fieldLookupContent"
@@ -787,6 +798,11 @@ function lookupFormAjaxRequest(formActio
         },
         onSuccess: function (transport) {
             var formRequest = transport.responseText;
+            //if the return screen contains the login page, the whole page have do be redirected
+            if (formRequest.search(/loginform/) != -1) {
+                window.location.href = window.location.href;
+                return;
+            }
             lookupContent.remove();
             var lookupCont = new Element('DIV', {
                 id: "fieldLookupContent"
@@ -817,6 +833,11 @@ function lookupPaginationAjaxRequest(nav
         },
         onSuccess: function (transport) {
             var formRequest = transport.responseText;
+            //if the return screen contains the login page, the whole page have do be redirected
+            if (formRequest.search(/loginform/) != -1) {
+                window.location.href = window.location.href;
+                return;
+            }
             lookupContent.remove();
             var lookupCont = new Element('DIV', {
                 id: "fieldLookupContent"