[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_7-10544-gb5cd7e6

Marc Delisle lem9 at users.sourceforge.net
Fri Oct 8 19:21:35 CEST 2010


The branch, master has been updated
       via  b5cd7e69ea4d29ad6b7a8e12bbc8fdec9966b72f (commit)
      from  8eec123dd8f45a45b7324ba0e89b0da0e688badd (commit)


- Log -----------------------------------------------------------------
commit b5cd7e69ea4d29ad6b7a8e12bbc8fdec9966b72f
Author: Marc Delisle <marc at infomarc.info>
Date:   Fri Oct 8 13:21:27 2010 -0400

    inline edit (in tools) and ajax mode

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

Summary of changes:
 libraries/common.lib.php |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index b1da1de..104af09 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1232,18 +1232,23 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
             echo '</form>';
         }
 
+        // in the tools div, only display the Inline link when not in ajax
+        // mode because 1) it currently does not work and 2) we would
+        // have two similar mechanisms on the page for the same goal
+        if ($GLOBALS['is_ajax_request'] === false) {
         // see in js/functions.js the jQuery code attached to id inline_edit
         // document.write conflicts with jQuery, hence used $().append()
-        $inline_edit = "<script type=\"text/javascript\">\n" .
-            "//<![CDATA[\n" .
-            "$('.tools').append('[<a href=\"#\" title=\"" .
-            PMA_escapeJsString(__('Inline edit of this query')) .
-            "\" id=\"inline_edit\">" .
-            PMA_escapeJsString(__('Inline')) .
-            "</a>]');\n" .
-            "//]]>\n" .
-            "</script>";
-        echo $inline_edit . $edit_link . $explain_link . $php_link . $refresh_link . $validate_link;
+            echo "<script type=\"text/javascript\">\n" .
+                "//<![CDATA[\n" .
+                "$('.tools').append('[<a href=\"#\" title=\"" .
+                PMA_escapeJsString(__('Inline edit of this query')) .
+                "\" id=\"inline_edit\">" .
+                PMA_escapeJsString(__('Inline')) .
+                "</a>]');\n" .
+                "//]]>\n" .
+                "</script>";
+        }
+        echo $edit_link . $explain_link . $php_link . $refresh_link . $validate_link;
         echo '</div>';
     }
     echo '</div><br />' . "\n";


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list