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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ae296562
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae296562
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae296562

Branch: refs/heads/internallb
Commit: ae2965625145770ceb940817169c170f02190f90
Parents: fe77af0
Author: Jessica Wang <jessica.w...@citrix.com>
Authored: Sun Apr 7 08:59:08 2013 -0700
Committer: Alena Prokharchyk <alena.prokharc...@citrix.com>
Committed: Mon Apr 8 15:23:55 2013 -0700

----------------------------------------------------------------------
 ui/scripts/cloud.core.callbacks.js |    4 ++--
 ui/scripts/cloudStack.js           |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae296562/ui/scripts/cloud.core.callbacks.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloud.core.callbacks.js 
b/ui/scripts/cloud.core.callbacks.js
index a081294..7fd1b4d 100644
--- a/ui/scripts/cloud.core.callbacks.js
+++ b/ui/scripts/cloud.core.callbacks.js
@@ -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;         
                $.ajax({
-                       url: clientApiUrl + "?" + window.name,
+                       url: clientApiUrl + "?command=login" + window.name + 
"&response=json",
                        dataType: "json",
                        async: false,
                        success: function(json) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae296562/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 499cb83..faa7789 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -250,12 +250,12 @@
         else {
           array1.push("&domain=" + encodeURIComponent("/"));
         }
-
-                               g_loginCmdText = "command=login" + 
array1.join("") + "&response=json";                          
+                               
+        g_loginCmdText = array1.join("");                      
                                
         $.ajax({
           type: "POST",
-          data: g_loginCmdText,                                        
+          data: "command=login" + g_loginCmdText + "&response=json",           
                        
           dataType: "json",
           async: false,
           success: function(json) {                    
@@ -466,7 +466,7 @@
     document.title = 'CloudStack';
 
     if ($.urlParam('loginUrl') != 0
-               ||(window.name != null && window.name.indexOf("command=login") 
!= -1)) {
+               ||(window.name != null && window.name.indexOf("&domain=") != 
-1)) {
       // SSO
       loginArgs.hideLoginScreen = true;
     }

Reply via email to