diff --git a/maqetta.core.client/WebContent/davinci/Workbench.js b/maqetta.core.client/WebContent/davinci/Workbench.js index 66435f1e08..333bf3ab0f 100644 --- a/maqetta.core.client/WebContent/davinci/Workbench.js +++ b/maqetta.core.client/WebContent/davinci/Workbench.js @@ -136,11 +136,16 @@ var handleIoError = function (deferred, reason) { }; var sessionTimedOut = function(){ - var loginHref = '/maqetta/welcome'; +/* var loginHref = '/maqetta/welcome'; if(Runtime.singleUserMode()) { loginHref = '/maqetta/'; + }*/ + var newLocation = Workbench.location(); + var lastChar = newLocation.length - 1; + if (newLocation.charAt(lastChar) == '/') { + newLocation = newLocation.substr(0,lastChar); } - + var loginHref = newLocation + "/welcome"; var dialog = new Dialog({ title: webContent.sessionTimedOut //, style: "width: 300px" diff --git a/maqetta.core.client/WebContent/davinci/actions/LogoutAction.js b/maqetta.core.client/WebContent/davinci/actions/LogoutAction.js index 4ec7b99050..88aa592242 100644 --- a/maqetta.core.client/WebContent/davinci/actions/LogoutAction.js +++ b/maqetta.core.client/WebContent/davinci/actions/LogoutAction.js @@ -9,10 +9,10 @@ return declare("davinci.actions.LogoutAction", Action, { run: function() { /* call the logout URL then redirect to maqetta login page */ - + var logoutRequest = new XMLHttpRequest(); logoutRequest.onreadystatechange = function() { - location.href = "/maqetta/"; + location.href = location.href; // "/maqetta/"; wrong place in war war or if context changes #3704 }; var parameters = ""; logoutRequest.open("POST", "../logout", false);