From 650b19cc7388f6d41cab2f62c18fa0bd3656fcfc Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 19 Jul 2011 15:42:41 -0700 Subject: [PATCH] cloudStack UI - secondary storage page - remove middle menu item after Delete Secondary Storage action succeeds. --- ui/scripts/cloud.core.secondarystorage.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/scripts/cloud.core.secondarystorage.js b/ui/scripts/cloud.core.secondarystorage.js index 9a67a415aad..fc87f36c9c6 100644 --- a/ui/scripts/cloud.core.secondarystorage.js +++ b/ui/scripts/cloud.core.secondarystorage.js @@ -167,10 +167,14 @@ var secondaryStorageActionMap = { isAsyncJob: false, dialogBeforeActionFn: doDeleteSecondaryStorage, inProcessText: "label.action.delete.secondary.storage.processing", - afterActionSeccessFn: function(json, $midmenuItem1, id) { - if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { - secondaryStorageClearRightPanel(); - } + afterActionSeccessFn: function(json, $midmenuItem1, id) { + $midmenuItem1.slideUp("slow", function() { + $(this).remove(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + secondaryStorageClearRightPanel(); + } + }); } } }