[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_5_0BETA1-1047-gf958426
Marc Delisle
lem9 at users.sourceforge.net
Wed Feb 1 17:47:58 CET 2012
The branch, master has been updated
via f9584261dc6ea5000be85561164c6b3a5caac082 (commit)
via aa8eb9360b768d0056a096eff969f72e98785ed6 (commit)
via a952ee531ab944bd19f0cb073a41d78a83001285 (commit)
via 3151d41d0e13e2f422aaf88faeffd5e1f93c897a (commit)
from f74caa46e7befa173912726501262705eee64a0d (commit)
- Log -----------------------------------------------------------------
commit f9584261dc6ea5000be85561164c6b3a5caac082
Merge: f74caa4 aa8eb93
Author: Marc Delisle <marc at infomarc.info>
Date: Wed Feb 1 11:43:39 2012 -0500
Merge branch 'QA_3_5'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
js/functions.js | 19 ++++++++++++++++++-
js/tbl_select.js | 8 +++++++-
sql.php | 4 ++++
4 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 96cc554..9ee967a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -73,6 +73,7 @@ phpMyAdmin - ChangeLog
+ patch #3303195 [interface] Checkbox to have SQL input remain
- patch #3472899 [export] Fixed CSV escape for the export
- patch #3475424 [import] Fixed CSV escape for the import
+- bug #3482734 [interface] No warning on syntax error in search form
3.4.11.0 (not yet released)
diff --git a/js/functions.js b/js/functions.js
index 12c6a65..ed8ebaf 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1150,8 +1150,25 @@ $(document).ready(function(){
new_content += "<input type=\"button\" class=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\">\n";
new_content += "<input type=\"button\" class=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">\n";
$inner_sql.replaceWith(new_content);
+
+ // These settings are duplicated from the .ready()function in functions.js
+ var height = $('#sql_query_edit').css('height');
+ codemirror_editor = CodeMirror.fromTextArea($('textarea[name="sql_query_edit"]')[0], {
+ lineNumbers: true,
+ matchBrackets: true,
+ indentUnit: 4,
+ mode: "text/x-mysql",
+ lineWrapping: true
+ });
+ codemirror_editor.getScrollerElement().style.height = height;
+ codemirror_editor.refresh();
+
$(".btnSave").click(function(){
- var sql_query = $(this).prev().val();
+ if (codemirror_editor !== undefined) {
+ var sql_query = codemirror_editor.getValue();
+ } else {
+ var sql_query = $(this).prev().val();
+ }
var $fake_form = $('<form>', {action: 'import.php', method: 'post'})
.append($form.find("input[name=server], input[name=db], input[name=table], input[name=token]").clone())
.append($('<input>', {type: 'hidden', name: 'show_query', value: 1}))
diff --git a/js/tbl_select.js b/js/tbl_select.js
index ac700f0..ba14495 100644
--- a/js/tbl_select.js
+++ b/js/tbl_select.js
@@ -73,7 +73,13 @@ $(document).ready(function() {
PMA_init_slider();
} else {
// error message (zero rows)
- $("#sqlqueryresults").html(response['message']);
+ if (response.message != undefined) {
+ $("#sqlqueryresults").html(response['message']);
+ }
+ // other error (syntax error?)
+ if (response.error != undefined) {
+ $("#sqlqueryresults").html(response['error']);
+ }
}
}) // end $.post()
})
diff --git a/sql.php b/sql.php
index 3e6e6d4..d736bdf 100644
--- a/sql.php
+++ b/sql.php
@@ -20,6 +20,10 @@ $GLOBALS['js_include'][] = 'tbl_change.js';
// the next one needed because sql.php may do a "goto" to tbl_structure.php
$GLOBALS['js_include'][] = 'tbl_structure.js';
$GLOBALS['js_include'][] = 'gis_data_editor.js';
+$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
+$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
+
+
if (isset($_SESSION['profiling'])) {
$GLOBALS['js_include'][] = 'highcharts/highcharts.js';
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list