[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1561-g15fd805

Marc Delisle lem9 at users.sourceforge.net
Tue Feb 1 13:42:46 CET 2011


The branch, master has been updated
       via  15fd805b8077a07e2b1c0af5b4401697e556bb8e (commit)
      from  414a09a2e030439db713b78c9032bd2d2f0d7924 (commit)


- Log -----------------------------------------------------------------
commit 15fd805b8077a07e2b1c0af5b4401697e556bb8e
Author: Marc Delisle <marc at infomarc.info>
Date:   Tue Feb 1 07:42:36 2011 -0500

    Conditional Ajax for DROP TRIGGER

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

Summary of changes:
 js/functions.js                |    1 +
 libraries/tbl_triggers.lib.php |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/js/functions.js b/js/functions.js
index 5b3273c..f4a939b 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1830,6 +1830,7 @@ $(document).ready(function() {
 
 /**
  * Attach Ajax event handlers for Drop Trigger.  Used on tbl_structure.php
+ * @see $cfg['AjaxEnable']
  */
 $(document).ready(function() {
 
diff --git a/libraries/tbl_triggers.lib.php b/libraries/tbl_triggers.lib.php
index 43ba18e..15f07b2 100644
--- a/libraries/tbl_triggers.lib.php
+++ b/libraries/tbl_triggers.lib.php
@@ -28,6 +28,12 @@ if ($triggers) {
               __('Event'));
     $ct=0;
     $delimiter = '//';
+    if ($GLOBALS['cfg']['AjaxEnable']) {
+        $conditional_class = 'class="drop_trigger_anchor"';
+    } else {
+        $conditional_class = '';
+    }
+
     foreach ($triggers as $trigger) {
         $drop_and_create = $trigger['drop'] . $delimiter . "\n" . $trigger['create'] . "\n";
 
@@ -41,7 +47,7 @@ if ($triggers) {
                          ($ct%2 == 0) ? 'even' : 'odd',
                          $trigger['name'],
                          PMA_linkOrButton('tbl_sql.php?' . $url_query . '&sql_query=' . urlencode($drop_and_create) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Change']),
-                         '<a class="drop_trigger_anchor" href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>',
+                         '<a ' . $conditional_class . ' href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>',
                          $trigger['action_timing'],
                          $trigger['event_manipulation']);
         $ct++;


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list