Clear right panel after middle menu item is removed from DOM. Otherwise, removed item's content will be populated to right panel again.

This commit is contained in:
Jessica Wang 2011-01-13 14:27:31 -08:00
parent 2ee08d88e4
commit 3c6258a0bf
7 changed files with 40 additions and 41 deletions

View File

@ -103,12 +103,12 @@ var clusterActionMap = {
inProcessText: "Deleting Cluster....",
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();
clusterClearRightPanel();
}
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
clusterClearRightPanel();
}
});
}
}
}

View File

@ -631,12 +631,12 @@ var domainActionMap = {
inProcessText: "Deleting Domain....",
afterActionSeccessFn: function(json, $midmenuItem1, id) {
$midmenuItem1.slideUp(function() {
$(this).remove();
});
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
domainJsonClearRightPanel();
}
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
domainJsonClearRightPanel();
}
});
}
}
}

View File

@ -679,12 +679,12 @@ var hostActionMap = {
inProcessText: "Removing Host....",
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();
hostClearRightPanel();
}
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
hostClearRightPanel();
}
});
}
},
"Update OS Preference": {

View File

@ -1229,12 +1229,12 @@ var directNetworkActionMap = {
inProcessText: "Deleting Network....",
afterActionSeccessFn: function(json, $midmenuItem1, id) {
$midmenuItem1.slideUp("slow", function() {
$(this).remove();
});
if(id.toString() == $("#right_panel_content").find("#direct_network_page").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
directNetworkClearRightPanel();
}
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#direct_network_page").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
directNetworkClearRightPanel();
}
});
}
}
}

View File

@ -878,12 +878,12 @@ var podActionMap = {
inProcessText: "Deleting Pod....",
afterActionSeccessFn: function(json, $midmenuItem1, id) {
$midmenuItem1.slideUp("slow", function() {
$(this).remove();
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
podJsonClearRightPanel();
}
});
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
podJsonClearRightPanel();
}
}
}
}

View File

@ -223,12 +223,12 @@ var primarystorageActionMap = {
inProcessText: "Deleting Primary Storage....",
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();
primarystorageClearRightPanel();
}
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
primarystorageClearRightPanel();
}
});
}
}
}

View File

@ -911,16 +911,15 @@ var zoneActionMap = {
inProcessText: "Deleting Zone....",
afterActionSeccessFn: function(json, $leftmenuItem1, id) {
$leftmenuItem1.slideUp(function() {
$(this).remove();
$(this).remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
zoneJsonClearRightPanel();
}
});
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
zoneJsonClearRightPanel();
}
}
}
}
function doEditZone($actionLink, $detailsTab, $leftmenuItem1) {
var $readonlyFields = $detailsTab.find("#name, #dns1, #dns2, #internaldns1, #internaldns2, #vlan, #guestcidraddress");