From 2dff3e74226b7f4c0873057bf97a54330bd92061 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 7 May 2012 14:03:46 -0700 Subject: [PATCH] cloudstack 3.0 UI - log out - error handling - not reload the current document when onLogoutCallback() return false --- ui/scripts/cloudStack.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index b7101d79c68..1b6637dfd0b 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -317,15 +317,14 @@ $.cookie('timezone', null); $.cookie('supportELB', null); - if(onLogoutCallback()) { //set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen. - document.location.reload(); + if(onLogoutCallback()) { //onLogoutCallback() will set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen. + document.location.reload(); //when onLogoutCallback() returns true, reload the current document. } }, error: function() { - if(onLogoutCallback()) { //set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen. - document.location.reload(); - } - document.location.reload(); + if(onLogoutCallback()) { //onLogoutCallback() will set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen. + document.location.reload(); //when onLogoutCallback() returns true, reload the current document. + } }, beforeSend : function(XMLHttpResponse) { return true;