You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/10/29 00:37:15 UTC

git commit: updated refs/heads/4.5 to 0d6a277

Repository: cloudstack
Updated Branches:
  refs/heads/4.5 865b2e679 -> 0d6a277a0


CLOUDSTACK-7809: UI > remove unnecessary cookie 'timezoneoffset'.


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

Branch: refs/heads/4.5
Commit: 0d6a277a0051c191cc34645a0a70bf8e3515865e
Parents: 865b2e6
Author: Jessica Wang <je...@apache.org>
Authored: Tue Oct 28 16:35:36 2014 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Oct 28 16:35:36 2014 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d6a277a/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 0e63522..49af7f7 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -145,11 +145,7 @@
                     g_account = unBoxCookieValue('account');
                     g_username = unBoxCookieValue('username');
                     g_userfullname = unBoxCookieValue('userfullname');
-                    g_timezone = unBoxCookieValue('timezone');
-                    if ($.cookie('timezoneoffset') != null)
-                        g_timezoneoffset = isNaN(unBoxCookieValue('timezoneoffset')) ? null : parseFloat(unBoxCookieValue('timezoneoffset'));
-                    else
-                        g_timezoneoffset = null;
+                    g_timezone = unBoxCookieValue('timezone');                    
                 } else { //single-sign-on	(bypass login screen)
                     g_mySession = $.cookie('JSESSIONID');
                     g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey);
@@ -159,11 +155,7 @@
                     g_account = g_loginResponse.account;
                     g_domainid = g_loginResponse.domainid;
                     g_userfullname = g_loginResponse.firstname + ' ' + g_loginResponse.lastname;
-                    g_timezone = g_loginResponse.timezone;
-                    if (g_loginResponse.timezoneoffset != null)
-                        g_timezoneoffset = isNaN(g_loginResponse.timezoneoffset) ? null : parseFloat(g_loginResponse.timezoneoffset);
-                    else
-                        g_timezoneoffset = null;
+                    g_timezone = g_loginResponse.timezone;                    
                 }
 
                 var userValid = false;
@@ -254,8 +246,7 @@
                         g_userid = loginresponse.userid;
                         g_account = loginresponse.account;
                         g_domainid = loginresponse.domainid;
-                        g_timezone = loginresponse.timezone;
-                        g_timezoneoffset = loginresponse.timezoneoffset;
+                        g_timezone = loginresponse.timezone;                        
                         g_userfullname = loginresponse.firstname + ' ' + loginresponse.lastname;
 
                         $.cookie('sessionKey', g_sessionKey, {
@@ -272,10 +263,7 @@
                         });
                         $.cookie('role', g_role, {
                             expires: 1
-                        });
-                        $.cookie('timezoneoffset', g_timezoneoffset, {
-                            expires: 1
-                        });
+                        });                        
                         $.cookie('timezone', g_timezone, {
                             expires: 1
                         });
@@ -365,8 +353,7 @@
                         $.cookie('username', null);
                         $.cookie('account', null);
                         $.cookie('domainid', null);
-                        $.cookie('role', null);                        
-                        $.cookie('timezoneoffset', null);
+                        $.cookie('role', null);  
                         $.cookie('timezone', null);
                         
                         if (onLogoutCallback()) { //onLogoutCallback() will set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen.