From e0c0d21380fab68bf71fbfbdbd060f6f2178c29d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 28 Jan 2011 12:47:19 -0500 Subject: [PATCH] Conditional Ajax on SQL query form --- js/sql.js | 3 ++- libraries/sql_query_form.lib.php | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/sql.js b/js/sql.js index e83cee8d42..f4fe708478 100644 --- a/js/sql.js +++ b/js/sql.js @@ -208,10 +208,11 @@ $(document).ready(function() { * Ajax Event handler for 'SQL Query Submit' * * @see PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] * @memberOf jQuery * @name sqlqueryform_submit */ - $("#sqlqueryform").live('submit', function(event) { + $("#sqlqueryform.ajax").live('submit', function(event) { event.preventDefault(); // remove any div containing a previous error message $('.error').remove(); diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 7dfe8c5505..0435325936 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -115,7 +115,11 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';') return checkSqlQuery(this)"> ' . "\n"; } -- 2.11.4.GIT