diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js index 04346ba80..6756f2521 100644 --- a/xCAT-UI/js/custom/zvm.js +++ b/xCAT-UI/js/custom/zvm.js @@ -496,12 +496,12 @@ zvmPlugin.prototype.loadInventory = function(data) { modal: true, width: 300, buttons: { - "Cancel": function() { - $(this).dialog("close"); - }, "Ok": function(){ removeProcessor(node, addr); $(this).dialog("close"); + }, + "Cancel": function() { + $(this).dialog("close"); } } }); @@ -604,12 +604,12 @@ zvmPlugin.prototype.loadInventory = function(data) { modal: true, width: 300, buttons: { - "Cancel": function() { - $(this).dialog("close"); - }, "Ok": function(){ removeDisk(node, addr); $(this).dialog("close"); + }, + "Cancel": function() { + $(this).dialog("close"); } } }); @@ -696,12 +696,12 @@ zvmPlugin.prototype.loadInventory = function(data) { modal: true, width: 300, buttons: { - "Cancel": function() { - $(this).dialog("close"); - }, "Ok": function(){ removeNic(node, addr); $(this).dialog("close"); + }, + "Cancel": function() { + $(this).dialog("close"); } } }); @@ -923,10 +923,7 @@ zvmPlugin.prototype.addNode = function() { modal: true, width: 400, buttons: { - "Cancel": function(){ - $(this).dialog( "close" ); - }, - "Ok": function(){ + "Ok": function(){ // Remove any warning messages $(this).find('.ui-state-error').remove(); @@ -1098,7 +1095,10 @@ zvmPlugin.prototype.addNode = function() { warn.prependTo($(this)); } } // End of else - } // End of function() + }, + "Cancel": function(){ + $(this).dialog( "close" ); + } } }); }; \ No newline at end of file diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index b77db18b5..a02de226c 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -1029,10 +1029,7 @@ function openAddProcDialog(node) { modal: true, width: 400, buttons: { - "Cancel": function() { - $(this).dialog( "close" ); - }, - "Ok": function(){ + "Ok": function(){ // Remove any warning messages $(this).find('.ui-state-error').remove(); @@ -1072,7 +1069,10 @@ function openAddProcDialog(node) { // Close dialog $(this).dialog( "close" ); } - } + }, + "Cancel": function() { + $(this).dialog( "close" ); + } } }); } @@ -1133,10 +1133,7 @@ function openAddDiskDialog(node, hcp) { modal: true, width: 400, buttons: { - "Cancel": function() { - $(this).dialog( "close" ); - }, - "Ok": function(){ + "Ok": function(){ // Remove any warning messages $(this).find('.ui-state-error').remove(); @@ -1209,7 +1206,10 @@ function openAddDiskDialog(node, hcp) { // Close dialog $(this).dialog( "close" ); } // End of else - } // End of function() + }, + "Cancel": function() { + $(this).dialog( "close" ); + } } }); } @@ -1363,10 +1363,7 @@ function openAddNicDialog(node, hcp) { modal: true, width: 400, buttons: { - "Cancel": function(){ - $(this).dialog( "close" ); - }, - "Ok": function(){ + "Ok": function(){ // Remove any warning messages $(this).find('.ui-state-error').remove(); @@ -1455,7 +1452,10 @@ function openAddNicDialog(node, hcp) { // Close dialog $(this).dialog( "close" ); } // End of else - } // End of function() + }, + "Cancel": function(){ + $(this).dialog( "close" ); + } } }); } @@ -2315,9 +2315,6 @@ function createZProvisionNew(inst) { modal: true, width: 400, buttons: { - "Cancel": function() { - $(this).dialog("close"); - }, "Ok": function(){ // Disable provision button provisionBtn.attr('disabled', 'true'); @@ -2377,7 +2374,10 @@ function createZProvisionNew(inst) { }); $(this).dialog("close"); - } // End of function() + }, + "Cancel": function() { + $(this).dialog("close"); + } } }); } else { diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js index f2baf4cb2..f5cac656a 100644 --- a/xCAT-UI/js/nodes/nodes.js +++ b/xCAT-UI/js/nodes/nodes.js @@ -173,10 +173,7 @@ function loadGroups(data) { modal: true, width: 400, buttons: { - "Cancel": function(){ - $(this).dialog( "close" ); - }, - "Ok": function(){ + "Ok": function(){ // Get hardware management var mgt = $(this).find('select[name=mgt]').val(); @@ -204,7 +201,10 @@ function loadGroups(data) { plugin.addNode(); $(this).dialog( "close" ); - } + }, + "Cancel": function(){ + $(this).dialog( "close" ); + } } });