Bug #3187141 - Double query box shown

This commit is contained in:
Madhura Jayaratne
2011-03-10 23:20:57 +05:30
parent 9deac3deb2
commit a5ef7d4b39

View File

@@ -286,14 +286,21 @@ $(document).ready(function() {
}
else {
// real results are returned
$('#sqlqueryresults').show();
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
$('#togglequerybox').show();
if($("#togglequerybox").siblings(":visible").length > 0) {
$("#togglequerybox").trigger('click');
$received_data = $(data);
$zero_row_results = $received_data.find('textarea[name="sql_query"]');
// if zero rows are returned from the query execution
if ($zero_row_results.length > 0) {
$('#sqlquery').val($zero_row_results.val());
} else {
$('#sqlqueryresults').show();
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
$('#togglequerybox').show();
if($("#togglequerybox").siblings(":visible").length > 0) {
$("#togglequerybox").trigger('click');
}
PMA_init_slider();
}
PMA_init_slider();
}
}) // end $.post()
}) // end SQL Query submit