diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 52bb7930cad..515552e069a 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -306,6 +306,10 @@ body.login { background: url(../images/logo-login.png) no-repeat; } +.login.nologo .logo { + background-image: url(../images/logo-login-oss.png); +} + .login form { display: block; width: 1000px; @@ -1625,6 +1629,10 @@ div.detail-group.actions td { padding: 0 96px 0 0; } +#header div.controls.nologo { + background-image: none; +} + .button { float: left; background: url(../images/buttons.png) no-repeat; diff --git a/ui/images/logo-login-oss.png b/ui/images/logo-login-oss.png new file mode 100644 index 00000000000..0366d3a73ec Binary files /dev/null and b/ui/images/logo-login-oss.png differ diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 8450e5d121d..4d1f1f97e4e 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -293,20 +293,10 @@ }); }; - // EULA check - $.ajax({ - url: 'eula.html', - dataType: 'html', - success: function(html) { - initInstallWizard(html); - }, - error: function() { - initInstallWizard(null); - } - }); + initInstallWizard(loginArgs.eula); } else { // Show cloudStack main UI - $container.cloudStack(cloudStackArgs); + $container.cloudStack($.extend(cloudStackArgs, { hasLogo: loginArgs.eula })); } } } @@ -321,7 +311,17 @@ } }; - cloudStack.uiCustom.login(loginArgs); + // EULA check + $.ajax({ + url: 'eula.html', + dataType: 'html', + success: function(html) { + cloudStack.uiCustom.login($.extend(loginArgs, { eula: html, hasLogo: true })); + }, + error: function() { + cloudStack.uiCustom.login(loginArgs); + } + }); // Localization cloudStack.localizationFn = function(str) { diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index 8997fb62afc..e110e799c0b 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -47,6 +47,8 @@ return true; }); + if (!args.hasLogo) $login.addClass('nologo'); + // Labels cause related input to be focused $login.find('label').click(function() { var $input = $inputs.filter('[name=' + $(this).attr('for') + ']'); diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js index fab46d296b8..b869f337bb1 100644 --- a/ui/scripts/ui/core.js +++ b/ui/scripts/ui/core.js @@ -293,6 +293,9 @@ } } }); + + // Hide logo conditionally + if (!args.hasLogo) $('#header .controls').addClass('nologo'); return this; };