CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - shorten value of g_loginCmdText

This commit is contained in:
Jessica Wang 2013-04-07 08:59:08 -07:00
parent d9f7bb2854
commit ebcdef55b0
2 changed files with 6 additions and 6 deletions

View File

@ -73,10 +73,10 @@ $(document).ready(function() {
} }
}); });
} }
else if(window.name != null && window.name.indexOf("command=login") != -1) { //from region switching else if(window.name != null && window.name.indexOf("&domain=") != -1) { //from region switching
g_loginCmdText = window.name; g_loginCmdText = window.name;
$.ajax({ $.ajax({
url: clientApiUrl + "?" + window.name, url: clientApiUrl + "?command=login" + window.name + "&response=json",
dataType: "json", dataType: "json",
async: false, async: false,
success: function(json) { success: function(json) {

View File

@ -251,11 +251,11 @@
array1.push("&domain=" + encodeURIComponent("/")); array1.push("&domain=" + encodeURIComponent("/"));
} }
g_loginCmdText = "command=login" + array1.join("") + "&response=json"; g_loginCmdText = array1.join("");
$.ajax({ $.ajax({
type: "POST", type: "POST",
data: g_loginCmdText, data: "command=login" + g_loginCmdText + "&response=json",
dataType: "json", dataType: "json",
async: false, async: false,
success: function(json) { success: function(json) {
@ -466,7 +466,7 @@
document.title = 'CloudStack'; document.title = 'CloudStack';
if ($.urlParam('loginUrl') != 0 if ($.urlParam('loginUrl') != 0
||(window.name != null && window.name.indexOf("command=login") != -1)) { ||(window.name != null && window.name.indexOf("&domain=") != -1)) {
// SSO // SSO
loginArgs.hideLoginScreen = true; loginArgs.hideLoginScreen = true;
} }