diff --git a/xCAT-UI/css/login.css b/xCAT-UI/css/login.css new file mode 100644 index 000000000..402ba73c2 --- /dev/null +++ b/xCAT-UI/css/login.css @@ -0,0 +1,60 @@ +/*--- Body and content ---*/ +body { + background: #1C1C1C; + font: 12px verdana, arial, helvetica, sans-serif; +} + +/*--- Login dialog ---*/ +#login { + width: 600px; + margin: 0px auto; +} + +#login table { + border: solid 0px; + margin: 0px auto; +} + +#login td { + width: 100px; + height: 35px; + color: #0078AE; + font-weight: bold; + border: solid 0px; +} + +#login input { + font: 12px verdana, arial, helvetica, sans-serif; + width: 200px; + border: solid 1px #0078AE; + padding: 5px; +} + +#login label{ + font: bold 12px verdana, arial, helvetica, sans-serif; +} + +#login_status { + font: bold 12px verdana, arial, helvetica, sans-serif; +} + +#login button { + font: bold 12px verdana, arial, helvetica, sans-serif; + width: 90px; + float: right; +} + +#login_form { + background-color: #f5f5f5; + height: 280px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#loginfo { + margin: 5px 0px; + text-align: right; + color: #f5f5f5; + font-weight:bold; +} \ No newline at end of file diff --git a/xCAT-UI/css/style.css b/xCAT-UI/css/style.css index 55247c9c7..6b22c82a6 100644 --- a/xCAT-UI/css/style.css +++ b/xCAT-UI/css/style.css @@ -31,63 +31,15 @@ margin: 0px; } -/*--- Login dialog ---*/ -#logdialog { - font: 12px verdana, arial, helvetica, sans-serif; - width: 600px; -} - -#logdialog table { - border: solid 0px; - margin: 0px auto; -} - -#logdialog td { - width: 100px; - height: 35px; - color: #0078AE; - font-weight: bold; - border: solid 0px; -} - -#logdialog input { - width: 210px; - border: solid 1px #0078AE; - font-size: 12px; - padding-bottom: 5px; -} - -#logdialog p { - font-size: 18px; -} - -#logdialog button { - font-weight: bold; - width: 90px; - float: right; -} - -#loginput { - background-color: #f5f5f5; - height: 280px; -} - -#loginfo { - margin: 5px 0px; - text-align: right; - color: #f5f5f5; - font-weight:bold; -} - /*--------------- Header ---------------*/ #header { height: 39px; width: 1000px; margin: 0px auto; background: url(../images/jquery/default/ui-bg_highlight-soft_75_2191c0_1x100.png) 50% 50% repeat-x; - -moz-border-radius: .5em; - -webkit-border-radius: .5em; - border-radius: .5em; + -moz-border-radius: .3em; + -webkit-border-radius: .3em; + border-radius: .3em; } #header ul { @@ -111,7 +63,7 @@ float: left; font: 14px verdana, arial, helvetica, sans-serif; font-weight: bold; - color: #2E6E9E; + color: white; padding: 11px 30px; cursor: pointer; } @@ -123,22 +75,13 @@ /* User name and log out */ #header div { float: right; -} - -#header div span { - color: #424242; - padding: 2px 15px 0px 2px; /* Top right left bottom*/ - text-align: right; - text-decoration: none; - display: block; + margin: 12px; } #header div a { - padding: 2px 15px 0px 2px; /* Top right left bottom*/ - text-align: right; + padding: 0px 6px; color: #0000FF; text-decoration: none; - display: block; cursor: pointer; } @@ -161,9 +104,9 @@ body { } .content { - -moz-border-radius: .5em; - -webkit-border-radius: .5em; - border-radius: .5em; + -moz-border-radius: .3em; + -webkit-border-radius: .3em; + border-radius: .3em; width: 1000px; min-height: 600px; margin: 10px auto; @@ -172,7 +115,7 @@ body { } #content .ui-widget-header { - border-color: #4297D7 #4297D7 #7BB642; + border-color: transparent transparent #6eac2c; border-width: 1px 1px 4px; } @@ -354,7 +297,7 @@ legend { font: 12px verdana, arial, helvetica, sans-serif; color: #424242; font-weight: bold; - padding: 10px 15px; + padding: 10px 5px; } .tab ol { @@ -387,7 +330,7 @@ legend { .sf-menu { background : none repeat scroll 0 0 #79B7E7; border :1px solid #f5f5f5; - border-radius :0.5em 0.5em 0.5em 0.5em; + border-radius :0.3em 0.3em 0.3em 0.3em; margin-bottom: 0; } @@ -423,9 +366,9 @@ legend { overflow: auto; width: auto; margin: 10px auto; - -moz-border-radius:5px; - -webkit-border-radius:5px; - border-radius:5px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; background-color: #f5f5f5; } @@ -529,8 +472,8 @@ legend { .tab .datatable button { border: solid 1px #BDBDBD; - -moz-border-radius: .5em; - -webkit-border-radius: .5em; + -moz-border-radius: .3em; + -webkit-border-radius: .3em; padding: 5px 10px; margin: 0 10px; background-color: #D8D8D8; @@ -820,9 +763,9 @@ table a:hover { vertical-align: top; background-color: #A9D0F5; padding: 0px 0px 0px 5px; - -moz-border-radius: .5em; - -webkit-border-radius: .5em; - border-radius: .5em; + -moz-border-radius: .3em; + -webkit-border-radius: .3em; + border-radius: .3em; } .discovercurrentstep{ diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js index 3f9381f96..94e2f69c6 100644 --- a/xCAT-UI/js/ui.js +++ b/xCAT-UI/js/ui.js @@ -452,13 +452,45 @@ function createMenu(items) { * * @return Nothing */ -function initPage() { +function initPage() { + // Load theme + var theme = $.cookie('xcat_theme'); + if (theme) { + switch (theme) { + case 'cupertino': + includeCss("css/jquery-ui-cupertino.css"); + break; + case 'dark_hive': + includeCss("css/jquery-ui-dark_hive.css"); + break; + case 'redmond': + includeCss("css/jquery-ui-redmond.css"); + break; + case 'start': + includeCss("css/jquery-ui-start.css"); + break; + case 'sunny': + includeCss("css/jquery-ui-sunny.css"); + break; + case 'ui_dark': + includeCss("css/jquery-ui-ui_darkness.css"); + break; + default: + includeCss("css/jquery-ui-start.css"); + } + } + + includeCss("css/query.dataTables.css"); + includeCss("css/superfish.css"); + includeCss("css/jstree.css"); + includeCss("css/jquery.jqplot.css"); + includeCss("css/style.css"); + // JQuery plugins includeJs("js/jquery/jquery.dataTables.min.js"); includeJs("js/jquery/jquery.form.min.js"); includeJs("js/jquery/jquery.jeditable.min.js"); includeJs("js/jquery/jquery.contextmenu.min.js"); - includeJs("js/jquery/jquery.cookie.min.js"); includeJs("js/jquery/superfish.min.js"); includeJs("js/jquery/hoverIntent.min.js"); includeJs("js/jquery/jquery.jstree.min.js"); @@ -481,12 +513,16 @@ function initPage() { includeJs("js/custom/hmc.js"); includeJs("js/custom/customUtils.js"); + // Enable settings link + $('#xcat_settings').click(function() { + openSettings(); + }); + // Get the page being loaded var url = window.location.pathname; var page = url.replace('/xcat/', ''); - var headers = $('#header ul li a'); - + // Show the page $("#content").children().remove(); if (page == 'configure.php') { @@ -544,6 +580,30 @@ function includeJs(file) { } } +/** + * Include CSS link in
+ * + * @param file + * File to include + * @return Nothing + */ +function includeCss(file) { + var link = $("head link[href='" + file + "']"); + + // If does not contain the link + if (!link.length) { + // Append the CSS link to + var link = $(''); + link.attr( { + type : 'text/css', + rel : 'stylesheet', + href : file + }); + + $('head').append(link); + } +} + /** * Write ajax response to a paragraph * @@ -649,3 +709,64 @@ function createIFrame(src) { return infoBar; } + + +/** + * Open dialog to set xCAT UI settings + * + * @return Nothing + */ +function openSettings() { + // Create form to add node range + var settingsForm = $(''); + var info = createInfoBar('Select the settings you desire'); + settingsForm.append(info); + + // Create select drop down for themes + var themeFS = $(''); + settingsForm.append(themeFS); + var legend = $(''); + themeFS.append(legend); + var oList = $('eXtreme Cloud Administration Toolkit | ||||
eXtreme Cloud Administration Toolkit | ||||