diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index ae7f4cad3e9..36ca9af4264 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -7987,6 +7987,31 @@ div.panel.ui-dialog div.list-view div.fixed-header { left: 0; } +.project-selector .button.cancel { + color: #808080; + background: url("../images/gradients.png") repeat scroll 0 -480px #B6B6B6; + border: 1px solid #AAAAAA; + border-radius: 4px 4px 4px 4px; + font-size: 13px; + font-weight: bold; + float: none; + cursor: pointer; + color: #838181; + /*+placement:shift 488px 9px;*/ + position: relative; + left: 170px; + top: -8px; + margin: 19px 0 0 0px; + width: 54px; + +} + +.project-selector .button.cancel:hover { + color: #3A3A3A; + +} + + /*** Resource management*/ .project-dashboard .resources { } diff --git a/ui/scripts/ui-custom/projects.js b/ui/scripts/ui-custom/projects.js index e5235e84bf8..51b4268ad41 100644 --- a/ui/scripts/ui-custom/projects.js +++ b/ui/scripts/ui-custom/projects.js @@ -533,6 +533,7 @@ .append($('').attr({ type: 'submit' }).val('')) ); var $projectSelect = args.$projectSelect; + var $cancel = $('
').addClass('button cancel').html(_l('label.cancel')); // Get project data var loadData = function(complete) { @@ -582,6 +583,13 @@ return false; }); + //Cancel button + $cancel.click(function() { + $(':ui-dialog, .overlay').remove(); + $('.select.default-view').click(); + }); + + // Initial load loadData(function() { if (!$list.find('li').size()) { @@ -639,7 +647,8 @@ return $selector .append($toolbar) - .append($list); + .append($list) + .append($cancel); } };