From e7efffeb0be75ba7f3b9347e05cce03328065a86 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Tue, 4 Dec 2012 16:17:36 +0000 Subject: [PATCH] Properly close the query analyser dialog --- js/server_status_monitor.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index bcdbc8e83d..2bb7477e6e 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1925,25 +1925,26 @@ AJAX.registerOnload('server_status_monitor.js', function() { dlgBtns[PMA_messages['strAnalyzeQuery']] = function() { loadQueryAnalysis(rowData); }; - dlgBtns[PMA_messages['strClose']] = function() { - if (profilingChart != null) { - profilingChart.destroy(); - } - $('div#queryAnalyzerDialog div.placeHolder').html(''); - if (codemirror_editor) { - codemirror_editor.setValue(''); - } - else { - $('#sqlquery').val(''); - } - $(this).dialog("close"); + dlgBtns[PMA_messages['strClose']] = function () { + $(this).dialog('close'); }; $('div#queryAnalyzerDialog').dialog({ width: 'auto', height: 'auto', resizable: false, - buttons: dlgBtns + buttons: dlgBtns, + close: function() { + if (profilingChart != null) { + profilingChart.destroy(); + } + $('div#queryAnalyzerDialog div.placeHolder').html(''); + if (codemirror_editor) { + codemirror_editor.setValue(''); + } else { + $('#sqlquery').val(''); + } + } }); }