Bug #3187141 - Double query box shown
This commit is contained in:
21
js/sql.js
21
js/sql.js
@@ -286,14 +286,21 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// real results are returned
|
// real results are returned
|
||||||
$('#sqlqueryresults').show();
|
$received_data = $(data);
|
||||||
$("#sqlqueryresults").html(data);
|
$zero_row_results = $received_data.find('textarea[name="sql_query"]');
|
||||||
$("#sqlqueryresults").trigger('appendAnchor');
|
// if zero rows are returned from the query execution
|
||||||
$('#togglequerybox').show();
|
if ($zero_row_results.length > 0) {
|
||||||
if($("#togglequerybox").siblings(":visible").length > 0) {
|
$('#sqlquery').val($zero_row_results.val());
|
||||||
$("#togglequerybox").trigger('click');
|
} 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 $.post()
|
||||||
}) // end SQL Query submit
|
}) // end SQL Query submit
|
||||||
|
Reference in New Issue
Block a user