The branch, master has been updated via 4fdae9a0e0fc2b1a16fdd3f6e4c0e70b70436513 (commit) via a5ef7d4b3941e5a6f2c1f5a3e0d7a3435f8fd931 (commit) from a46a49b747f89cdc926fd7d2fd41237d6d060ee7 (commit)
- Log ----------------------------------------------------------------- commit 4fdae9a0e0fc2b1a16fdd3f6e4c0e70b70436513 Merge: a5ef7d4b3941e5a6f2c1f5a3e0d7a3435f8fd931 a46a49b747f89cdc926fd7d2fd41237d6d060ee7 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Mar 10 23:25:35 2011 +0530
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit a5ef7d4b3941e5a6f2c1f5a3e0d7a3435f8fd931 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Mar 10 23:20:57 2011 +0530
Bug #3187141 - Double query box shown
-----------------------------------------------------------------------
Summary of changes: js/sql.js | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/js/sql.js b/js/sql.js index a7b8e62..9b5edf9 100644 --- a/js/sql.js +++ b/js/sql.js @@ -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
hooks/post-receive