[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1483-ge0c0d21

Marc Delisle lem9 at users.sourceforge.net
Fri Jan 28 18:47:28 CET 2011


The branch, master has been updated
       via  e0c0d21380fab68bf71fbfbdbd060f6f2178c29d (commit)
      from  2f751fbf94824d5a90be16b94acf76378fddbcde (commit)


- Log -----------------------------------------------------------------
commit e0c0d21380fab68bf71fbfbdbd060f6f2178c29d
Author: Marc Delisle <marc at infomarc.info>
Date:   Fri Jan 28 12:47:19 2011 -0500

    Conditional Ajax on SQL query form

-----------------------------------------------------------------------

Summary of changes:
 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 e83cee8..f4fe708 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 7dfe8c5..0435325 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)">
         <?php
     } else {
-        echo '<form method="post" action="import.php" ' . $enctype . ' id="sqlqueryform"'
+        echo '<form method="post" action="import.php" ' . $enctype;
+        if ($GLOBALS['cfg']['AjaxEnable']) {
+            echo ' class="ajax"';
+        }
+        echo ' id="sqlqueryform"'
             .' onsubmit="return checkSqlQuery(this)" name="sqlform">' . "\n";
     }
 


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list