From eb6392d48cb4b007c36175cbb4e1577a91a96f61 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Mon, 21 May 2012 10:28:35 -0700 Subject: [PATCH] CS-12462: no close button on select project list view popup --- ui/css/cloudstack3.css | 25 +++++++++++++++++++++++++ ui/scripts/ui-custom/projects.js | 11 ++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index b1b16d8afcc..5e44099e12e 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -7988,6 +7988,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); } };