Properly close the query analyser dialog

This commit is contained in:
Rouslan Placella 2012-12-04 16:17:36 +00:00
parent d142def034
commit e7efffeb0b

View File

@ -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('');
}
}
});
}