Fixed bug in how jQuery dialogs are closed. If you use dialog('close'), it will only hide the dialog. But if you use dialog('destroy').remove(), the entire dialog will be removed from the page.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16120 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2013-04-29 15:08:10 +00:00
parent e6c6be8827
commit 2515cfc4d4
10 changed files with 37 additions and 37 deletions

View File

@ -367,7 +367,7 @@ function addAmmNode(){
$('#addBladeCenter').prepend(createInfoBar('AMM node was successfully added'));
$('#addBladeCenter').dialog("option", "buttons", {
"Close" : function() {
$('#addBladeCenter').dialog('close');
$('#addBladeCenter').dialog('destroy').remove();
}
});
}
@ -547,7 +547,7 @@ function addMmScanNode(){
msg : ''
},
success : function(data){
$('#addBladeCenter').dialog('close');
$('#addBladeCenter').dialog('destroy').remove();
}
});
}

View File

@ -546,10 +546,10 @@ esxPlugin.prototype.addNode = function() {
title: 'Add node',
modal: true,
width: 400,
close: function(){$(this).remove();},
close: function() {$(this).remove();},
buttons: {
"OK" : function(){addEsxNode();},
"Cancel": function(){$(this).dialog('close');}
"OK" : function() {addEsxNode();},
"Cancel": function() {$(this).dialog('destroy').remove();}
}
});
};
@ -587,8 +587,8 @@ function addEsxNode(){
// Change dialog buttons
$('#addEsx').dialog('option', 'buttons', {
'Close':function(){
$('#addEsx').dialog('close');
'Close':function() {
$('#addEsx').dialog('destroy').remove();
}
});

View File

@ -217,7 +217,7 @@ hmcPlugin.prototype.addNode = function() {
addHmcNode();
},
'Cancel' : function() {
$('#addHmc').dialog('close');
$('#addHmc').dialog('destroy').remove();
}
});
} else {
@ -227,7 +227,7 @@ hmcPlugin.prototype.addNode = function() {
// Change dialog buttons
$('#addHmc').dialog('option', 'buttons', {
'Cancel' : function() {
$('#addHmc').dialog('close');
$('#addHmc').dialog('destroy').remove();
}
});
@ -295,7 +295,7 @@ function addHmcNode() {
msg : ''
},
success : function(data) {
$('#addHmc').dialog('close');
$('#addHmc').dialog('destroy').remove();
}
});
}
@ -349,7 +349,7 @@ function drawHmcSelector(hmcs) {
addPNode();
},
'Cancel' : function() {
$('#addHmc').dialog('close');
$('#addHmc').dialog('destroy').remove();
}
});
}
@ -466,7 +466,7 @@ function addPNode() {
},
success : function(data) {
// Refresh the area on the right side
$('#addHmc').dialog('close');
$('#addHmc').dialog('destroy').remove();
$('.selectgroup').trigger('click');
}
});

View File

@ -207,7 +207,7 @@ ipmiPlugin.prototype.addNode = function() {
addIdataplex();
},
"Cancel" : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -247,7 +247,7 @@ function addIdataplex() {
// Change dialog buttons
$('#addIdplx').dialog('option', 'buttons', {
'Close' : function() {
$('#addIdplx').dialog('close');
$('#addIdplx').dialog('destroy').remove();
}
});

View File

@ -544,7 +544,7 @@ kvmPlugin.prototype.addNode = function() {
close: function(){$(this).remove();},
buttons: {
"OK" : function(){addKvmNode();},
"Cancel": function(){$(this).dialog('close');}
"Cancel": function(){$(this).dialog('destroy').remove();}
}
});
};
@ -583,7 +583,7 @@ function addKvmNode(){
// Change dialog buttons
$('#addKvm').dialog('option', 'buttons', {
'Close':function(){
$('#addKvm').dialog('close');
$('#addKvm').dialog('destroy').remove();
}
});

View File

@ -2035,12 +2035,12 @@ zvmPlugin.prototype.addNode = function() {
// If there are no errors
if (ready) {
$('#addZvm').append(createLoader());
$('#addZvm').append(createLoader());
// Change dialog buttons
$('#addZvm').dialog('option', 'buttons', {
'Close':function(){
$('#addZvm').dialog('close');
'Close':function() {
$('#addZvm').dialog('destroy').remove();
}
});
@ -2233,7 +2233,7 @@ zvmPlugin.prototype.addNode = function() {
}
},
"Cancel": function(){
$(this).dialog( "close" );
$(this).dialog('destroy').remove();
}
}
});

View File

@ -6098,7 +6098,7 @@ function profileDialog() {
// Change dialog buttons
$('#' + dialogId).dialog('option', 'buttons', {
'Close':function(){
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
});
@ -6279,7 +6279,7 @@ function editProfileDialog(profile, pool, size, entry) {
// Change dialog buttons
$('#' + dialogId).dialog('option', 'buttons', {
'Close':function(){
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
});

View File

@ -828,10 +828,10 @@ function mkCondRespDia() {
}
});
}
$(this).dialog('close');
$(this).dialog('destroy').remove();
},
'Cancel' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -920,7 +920,7 @@ function chCondScopeDia() {
});
},
'Cancel' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -941,10 +941,10 @@ function mkResponseDia() {
},
buttons : {
'Ok' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
},
'Cancel' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -994,7 +994,7 @@ function startStopCondRespDia() {
},
buttons : {
'Close' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -1122,10 +1122,10 @@ function stopCondRespDia() {
$('#rmcEventStatus div').empty().append(data.rsp[0]);
}
});
$(this).dialog('close');
$(this).dialog('destroy').remove();
},
'Cancel' : function() {
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});

View File

@ -400,7 +400,7 @@ function mkAddNodeLink() {
});
// Close dialog
addNodeForm.dialog('close');
addNodeForm.dialog('destroy').remove();
});
advanced.append(advancedLnk);
addNodeForm.append(advanced);
@ -410,9 +410,9 @@ function mkAddNodeLink() {
modal: true,
width: 400,
title:'Add node',
close: function(){$(this).remove();},
close: function() {$(this).remove();},
buttons: {
'Ok': function(){
'Ok': function() {
// Get hardware management
var mgt = $(this).find('select[name=mgt]').val();
@ -438,11 +438,11 @@ function mkAddNodeLink() {
break;
}
$(this).dialog('destroy').remove();
plugin.addNode();
$(this).dialog('close');
},
'Cancel': function(){
$(this).dialog('close');
$(this).dialog('destroy').remove();
}
}
});
@ -1346,7 +1346,7 @@ function addNodes2Table(data) {
$('.node').bind('click', loadNode);
// Close dialog for updating table
$('.ui-dialog-content').dialog('close');
$('.ui-dialog-content').dialog('destroy').remove();
/**
* Enable editable columns

View File

@ -914,7 +914,7 @@ function changePassword() {
// Change dialog buttons
$('#changePassword').dialog('option', 'buttons', {
'Close':function(){
$('#changePassword').dialog('close');
$('#changePassword').dialog('destroy').remove();
}
});