Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--js/functions.js8
-rw-r--r--js/sql.js3
-rw-r--r--js/tbl_chart.js3
4 files changed, 7 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index c0545990e0..d65e4d383a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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, '') !== '') {
diff --git a/js/sql.js b/js/sql.js
index e41304beaf..0e0ea829eb 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -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;
}