diff --git a/src/sunstone/public/css/login.css b/src/sunstone/public/css/login.css index b4236d267f..4843efacf9 100644 --- a/src/sunstone/public/css/login.css +++ b/src/sunstone/public/css/login.css @@ -52,8 +52,7 @@ div#logo_sunstone { top: 80px; margin-left: auto; margin-right: auto; - background: url(../images/opennebula-sunstone-big.png) no-repeat center ; - + background: url(../images/opennebula-sunstone-big.png) no-repeat center; vertical-align: center; } @@ -135,7 +134,7 @@ div#login input#login_btn:hover { .error_message { display: none; position: relative; - top: 150px; + top: 80px; font-family: Arial, Helvetica, sans-serif; color:red; font-size:1.6em; diff --git a/src/sunstone/public/js/login.js b/src/sunstone/public/js/login.js index 99cfb9d856..608ea609e5 100644 --- a/src/sunstone/public/js/login.js +++ b/src/sunstone/public/js/login.js @@ -23,15 +23,15 @@ function auth_error(req, error){ var status = error.error.http_status; switch (status){ - case 401: - $("#one_error").hide(); - $("#auth_error").show(); - break; - case 500: - $("#auth_error").hide(); - $("#one_error").show(); - break; - } + case 401: + $("#one_error").hide(); + $("#auth_error").fadeIn("slow"); + break; + case 500: + $("#auth_error").hide(); + $("#one_error").fadeIn("slow"); + break; + }; } function authenticate(){ @@ -47,21 +47,18 @@ function authenticate(){ }); } -function logout(){ - OpenNebula.Auth.logout(); -} - - $(document).ready(function(){ - $("#login_btn").click(function () { + $("#login_form").submit(function (){ authenticate(); + return false; }); - $("input").keydown(function (e){ - if (e.keyCode == 13) { - authenticate(); - } - }); + //compact login elements according to screen height + if (screen.height <= 600){ + $('div#logo_sunstone').css("top","15px"); + $('div#login').css("top","10px"); + $('.error_message').css("top","10px"); + }; - $("input#username.box").get(0).focus(); + $("input#username.box").focus(); }); diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 56b2b475e8..92a38ba49c 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -46,7 +46,7 @@ var dashboard_tab_content = '
\
-
|