details: https://code.openbravo.com/erp/devel/pi/rev/3565776dbdb7 changeset: 15537:3565776dbdb7 user: Martin Taal <martin.taal <at> openbravo.com> date: Sun Feb 19 21:29:10 2012 +0100 summary: Related to issue 19689: It is not possible to change Role twice in a row Do the reload of the window in a separate thread independent of the isc call thread
details: https://code.openbravo.com/erp/devel/pi/rev/683adf88f417 changeset: 15538:683adf88f417 user: Martin Taal <martin.taal <at> openbravo.com> date: Mon Feb 20 06:24:49 2012 +0100 summary: Related to issue 19689: It is not possible to change Role twice in a row Always use a unique url when reloading the page after role change to prevent caching details: https://code.openbravo.com/erp/devel/pi/rev/e5b1fd6ab7c6 changeset: 15539:e5b1fd6ab7c6 user: Martin Taal <martin.taal <at> openbravo.com> date: Mon Feb 20 06:48:19 2012 +0100 summary: Related to issue 19689: It is not possible to change Role twice in a row Start the application in a separate thread than the one loading all the javascript diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js | 9 ++++++++- src/index.jsp | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diffs (50 lines): diff -r 6549cff0fa4b -r e5b1fd6ab7c6 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js Mon Feb 20 11:09:18 2012 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js Mon Feb 20 06:48:19 2012 +0100 @@ -303,6 +303,8 @@ OB.RemoteCallManager.call(this.widgetInstance.formActionHandler, this.getValues(), { 'command': 'save' }, this.doSaveCallback); + // hide ourselves + isc.OBQuickRun.hide(); }, // and reload @@ -316,7 +318,10 @@ // https://issues.openbravo.com/view.php?id=19689 // https://issues.openbravo.com/view.php?id=19659 // window.location.href = OB.Utilities.getLocationUrlWithoutFragment(); - window.location.replace(OB.Utilities.getLocationUrlWithoutFragment()); + // do this in a separate thread + setTimeout(function() { + window.location.replace(OB.Utilities.getLocationUrlWithoutFragment()); + }, 100); } }, @@ -441,6 +446,8 @@ OB.RemoteCallManager.call(passwordForm.formActionHandler, passwordForm.getValues(), { 'command': 'changePwd' }, passwordForm.doSaveCallback); + // hide ourselves + isc.OBQuickRun.hide(); }, // the callback displays an info dialog and then hides the form diff -r 6549cff0fa4b -r e5b1fd6ab7c6 src/index.jsp --- a/src/index.jsp Mon Feb 20 11:09:18 2012 +0100 +++ b/src/index.jsp Mon Feb 20 06:48:19 2012 +0100 @@ -141,7 +141,12 @@ var isomorphicDir='./web/org.openbravo.userinterface.smartclient/isomorphic/'; // starts the application is called as the last statement in the StaticResources part -function OBStartApplication() { +function OBStartApplication(delayed) { + // call delayed to take it out of the loading call stack of lab.js + if (!delayed) { + setTimeout('OBStartApplication(true)', 100); + return; + } OB.Layout.initialize(); OB.Layout.draw(); OB.Layout.ViewManager.createAddStartTab(); ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
