cloudstack 3.0 UI - log out - error handling - not reload the current document when onLogoutCallback() return false

This commit is contained in:
Jessica Wang 2012-05-07 14:03:46 -07:00
parent dcbd098ab0
commit 2dff3e7422
1 changed files with 5 additions and 6 deletions

View File

@ -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;