diff --git a/js/sql.js b/js/sql.js index e762bb53c0..3a50f242aa 100644 --- a/js/sql.js +++ b/js/sql.js @@ -945,10 +945,10 @@ $(document).ready(function() { */ var button_options = {}; // in the following function we need to use $(this) - button_options[PMA_messages['strCancel']] = function() {$(this).parent().dialog('close').remove();} + button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();} var button_options_error = {}; - button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();} + button_options_error[PMA_messages['strOK']] = function() {$(this).dialog('close').remove();} var $form = $("#resultsForm"); var $msgbox = PMA_ajaxShowMessage(); @@ -962,6 +962,9 @@ $(document).ready(function() { height: 230, width: 900, open: PMA_verifyTypeOfAllColumns, + close: function(event, ui) { + $('#change_row_dialog').remove(); + }, buttons : button_options_error })// end dialog options } else { @@ -972,6 +975,9 @@ $(document).ready(function() { height: 600, width: 900, open: PMA_verifyTypeOfAllColumns, + close: function(event, ui) { + $('#change_row_dialog').remove(); + }, buttons : button_options }) //Remove the top menu container from the dialog