bug 11070: cloudStack - delete domain/IPAddress/SecurityGroup/snapshot/volume - fix a bug that an API error showed after account was deleted ("listxxxxxxx&id=N")

This commit is contained in:
Jessica Wang 2011-08-11 14:23:49 -07:00
parent 10034bc196
commit ac62f290d3
5 changed files with 27 additions and 37 deletions

View File

@ -717,13 +717,11 @@ var domainActionMap = {
asyncJobResponse: "deletedomainresponse",
inProcessText: "label.action.delete.domain.processing",
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();
}
});
$midmenuItem1.remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
domainJsonClearRightPanel();
}
}
}
}

View File

@ -1718,14 +1718,11 @@ var ipActionMap = {
dialogBeforeActionFn : doReleaseIp,
inProcessText: "label.action.release.ip.processing",
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();
ipClearRightPanel();
}
});
$midmenuItem1.remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
ipClearRightPanel();
}
}
},
"label.action.enable.static.NAT": {

View File

@ -588,13 +588,11 @@ var securityGroupActionMap = {
dialogBeforeActionFn : doDeleteSecurityGroup,
inProcessText: "Deleting Security Group....",
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();
securityGroupClearRightPanel();
}
});
$midmenuItem1.remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
securityGroupClearRightPanel();
}
}
}
}

View File

@ -198,7 +198,8 @@ function snapshotClearDetailsTab() {
var $thisTab = $("#right_panel_content #tab_content_details");
$thisTab.find("#id").text("");
$thisTab.find("#name").text("");
$thisTab.find("#volume_name").text("");
$thisTab.find("#volume_name").text("");
$thisTab.find("#state").text("");
$thisTab.find("#interval_type").text("");
$thisTab.find("#account").text("");
$thisTab.find("#domain").text("");
@ -220,13 +221,11 @@ var snapshotActionMap = {
dialogBeforeActionFn : doSnapshotDelete,
inProcessText: "label.action.delete.snapshot.processing",
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();
snapshotClearRightPanel();
}
});
$midmenuItem1.remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
snapshotClearRightPanel();
}
}
}
,

View File

@ -601,13 +601,11 @@ var volumeActionMap = {
dialogBeforeActionFn : doDeleteVolume,
inProcessText: "label.action.delete.volume.processing",
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();
volumeClearRightPanel();
}
});
$midmenuItem1.remove();
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
clearRightPanel();
volumeClearRightPanel();
}
}
},
"label.action.take.snapshot": {