cloudstack 3.0 new UI - clean up global variable and session cookie when logging out.

This commit is contained in:
Jessica Wang 2012-02-27 17:31:17 -08:00
parent c4e5ce36c5
commit b7b9b096a2

View File

@ -168,7 +168,7 @@
data: "command=login" + array1.join("") + "&response=json",
dataType: "json",
async: false,
success: function(json) {
success: function(json) {
var loginresponse = json.loginresponse;
g_mySession = $.cookie('JSESSIONID');
@ -256,7 +256,27 @@
$.ajax({
url: createURL('logout'),
async: false,
success: function() {
success: function() {
g_mySession = null;
g_sessionKey = null;
g_username = null;
g_account = null;
g_domainid = null;
g_timezoneoffset = null;
g_timezone = null;
g_supportELB = null;
$.cookie('JSESSIONID', null);
$.cookie('sessionKey', null);
$.cookie('username', null);
$.cookie('account', null);
$.cookie('domainid', null);
$.cookie('role', null);
$.cookie('networktype', null);
$.cookie('timezoneoffset', null);
$.cookie('timezone', null);
$.cookie('supportELB', null);
document.location.reload();
},
error: function() {
@ -310,7 +330,7 @@
});
}
};
// EULA check
$.ajax({
url: 'eula.' + $.cookie('lang') + '.html',