From fb04b04835fe1b8a2a21f7fde0c17ce83c65a993 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 13 Jan 2011 09:40:42 -0800 Subject: [PATCH] pod page, zone page - not update right panel after an action succeeds since the action might not belong to currently selected middle menu item. --- ui/scripts/cloud.core.host.js | 6 ++++-- ui/scripts/cloud.core.pod.js | 8 +++++--- ui/scripts/cloud.core.primarystorage.js | 6 ++++-- ui/scripts/cloud.core.zone.js | 8 +++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ui/scripts/cloud.core.host.js b/ui/scripts/cloud.core.host.js index 8c3eb989230..394ca760e30 100644 --- a/ui/scripts/cloud.core.host.js +++ b/ui/scripts/cloud.core.host.js @@ -681,8 +681,10 @@ var hostActionMap = { $midmenuItem1.slideUp("slow", function() { $(this).remove(); }); - clearRightPanel(); - hostClearRightPanel(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + hostClearRightPanel(); + } } }, "Update OS Preference": { diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index 888787e9762..419438c89dd 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -879,9 +879,11 @@ var podActionMap = { afterActionSeccessFn: function(json, $midmenuItem1, id) { $midmenuItem1.slideUp("slow", function() { $(this).remove(); - }); - clearRightPanel(); - podJsonClearRightPanel(); + }); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + podJsonClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.primarystorage.js b/ui/scripts/cloud.core.primarystorage.js index 403f62a9dc2..f82efc9088a 100644 --- a/ui/scripts/cloud.core.primarystorage.js +++ b/ui/scripts/cloud.core.primarystorage.js @@ -225,8 +225,10 @@ var primarystorageActionMap = { $midmenuItem1.slideUp("slow", function() { $(this).remove(); }); - clearRightPanel(); - primarystorageClearRightPanel(); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + primarystorageClearRightPanel(); + } } } } diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js index d0a765fc5f0..c7305c579a3 100644 --- a/ui/scripts/cloud.core.zone.js +++ b/ui/scripts/cloud.core.zone.js @@ -912,9 +912,11 @@ var zoneActionMap = { afterActionSeccessFn: function(json, $leftmenuItem1, id) { $leftmenuItem1.slideUp(function() { $(this).remove(); - }); - clearRightPanel(); - zoneJsonClearRightPanel(); + }); + if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) { + clearRightPanel(); + zoneJsonClearRightPanel(); + } } } }