diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | js/functions.js | 8 | ||||
-rw-r--r-- | js/sql.js | 3 | ||||
-rw-r--r-- | js/tbl_chart.js | 3 |
4 files changed, 7 insertions, 8 deletions
@@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - bug #4190 Fractional seconds cause row update even if the value is not changed - bug #4170 Overflow scroll for table grid is not a good solution - bug #2961 Relations settings not updated on config change +- bug #4187 SQL query inline edit doesn't post changes on the first run 4.1.1.0 (2013-12-17) - bug #4154 Error using UNION query diff --git a/js/functions.js b/js/functions.js index b3fb79b667..c9e9691947 100644 --- a/js/functions.js +++ b/js/functions.js @@ -378,16 +378,8 @@ function confirmQuery(theForm1, sqlQuery1) */ function checkSqlQuery(theForm) { - - // First check if codemirror is active. - if (codemirror_editor) { - theForm.elements['sql_query'].value = codemirror_editor.getValue(); - } - var sqlQuery = theForm.elements['sql_query']; - var isEmpty = 1; - var space_re = new RegExp('\\s+'); if (typeof(theForm.elements['sql_file']) != 'undefined' && theForm.elements['sql_file'].value.replace(space_re, '') !== '') { @@ -232,6 +232,9 @@ AJAX.registerOnload('sql.js', function () { event.preventDefault(); var $form = $(this); + if (codemirror_editor) { + $form[0].elements['sql_query'].value = codemirror_editor.getValue(); + } if (! checkSqlQuery($form[0])) { return false; } diff --git a/js/tbl_chart.js b/js/tbl_chart.js index d0794f336f..3e11725aca 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -288,6 +288,9 @@ $("#tblchartform").live('submit', function (event) { } var $form = $(this); + if (codemirror_editor) { + $form[0].elements['sql_query'].value = codemirror_editor.getValue(); + } if (!checkSqlQuery($form[0])) { return false; } |