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


- Log -----------------------------------------------------------------
commit 15fd805b8077a07e2b1c0af5b4401697e556bb8e
Author: Marc Delisle <[email protected]>
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 . 
'&amp;sql_query=' . urlencode($drop_and_create) . 
'&amp;show_query=1&amp;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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git

Reply via email to