From 6cf6820a3f4c935b7571dccf130b714314bd5782 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 1 Mar 2012 16:31:55 -0800 Subject: [PATCH] switch definition of 'destroy' action with definition of 'remove' action. i.e. 'remove' action will hide detailView and remove corresponding row from listView after action is done. --- ui/css/cloudstack3.css | 2 ++ ui/scripts/configuration.js | 12 ++++++------ ui/scripts/ui/widgets/detailView.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 80f80ebdaba..df7aa95ed1b 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -8340,12 +8340,14 @@ div.panel.ui-dialog div.list-view div.fixed-header { } .destroy .icon, +.remove .icon, .delete .icon, .decline .icon { background-position: 1px -92px; } .destroy:hover .icon, +.remove:hover .icon, .delete:hover .icon { background-position: 1px -674px; } diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 7e23b99a68c..3f595fc9518 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -229,7 +229,7 @@ } }, - 'delete': { + remove: { label: 'label.action.delete.service.offering', messages: { confirm: function(args) { @@ -542,7 +542,7 @@ } }, - 'delete': { + remove: { label: 'label.action.delete.system.service.offering', messages: { confirm: function(args) { @@ -814,7 +814,7 @@ } }, - 'delete': { + remove: { label: 'label.action.delete.disk.offering', messages: { confirm: function(args) { @@ -1627,7 +1627,7 @@ var jsonObj = args.context.item; var allowedActions = []; allowedActions.push("edit"); - allowedActions.push("delete"); + allowedActions.push("remove"); return allowedActions; }; @@ -1635,7 +1635,7 @@ var jsonObj = args.context.item; var allowedActions = []; allowedActions.push("edit"); - allowedActions.push("delete"); + allowedActions.push("remove"); return allowedActions; }; @@ -1643,7 +1643,7 @@ var jsonObj = args.context.item; var allowedActions = []; allowedActions.push("edit"); - allowedActions.push("delete"); + allowedActions.push("remove"); return allowedActions; }; diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js index 2d3bb7a47fd..204c7045105 100644 --- a/ui/scripts/ui/widgets/detailView.js +++ b/ui/scripts/ui/widgets/detailView.js @@ -242,7 +242,7 @@ } }, - destroy: function($detailView, args) { + remove: function($detailView, args) { uiActions.standard($detailView, args, { noRefresh: true, complete: function(args) {