Hide Citrix logo if no EULA is present (i.e., is OSS version)

This commit is contained in:
Brian Federle 2012-02-16 16:22:23 -08:00
parent cddbc4daeb
commit 2e82439a53
5 changed files with 26 additions and 13 deletions

View File

@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -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) {

View File

@ -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') + ']');

View File

@ -293,6 +293,9 @@
}
}
});
// Hide logo conditionally
if (!args.hasLogo) $('#header .controls').addClass('nologo');
return this;
};