[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA1-1415-g4dddaab

Marc Delisle lem9 at users.sourceforge.net
Mon Jan 3 23:29:41 CET 2011


The branch, master has been updated
       via  4dddaab5fe5dc0e703db907b5ee40d0e522dfd3f (commit)
      from  5bae920417fbc993a262e4e93af00f02ae225efe (commit)


- Log -----------------------------------------------------------------
commit 4dddaab5fe5dc0e703db907b5ee40d0e522dfd3f
Author: Marc Delisle <marc at infomarc.info>
Date:   Mon Jan 3 17:29:32 2011 -0500

    Fix displaying of "Show search criteria/Hide search criteria"

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

Summary of changes:
 js/tbl_select.js |   36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/js/tbl_select.js b/js/tbl_select.js
index 3c6cae3..48cf97b 100644
--- a/js/tbl_select.js
+++ b/js/tbl_select.js
@@ -22,23 +22,28 @@ $(document).ready(function() {
         cache: 'false'
     });
 
-    $('<a id="togglesearchform"></a>')
-     .html(PMA_messages['strShowSearchCriteria'])
+    /**
+     * Prepare a div containing a link, otherwise it's incorrectly displayed 
+     * after a couple of clicks
+     */
+    $('<div id="togglesearchformdiv"><a id="togglesearchformlink"></a></div>')
      .insertAfter('#tbl_search_form')
      // don't show it until we have results on-screen
      .hide();
 
-    $('#togglesearchform').bind('click', function() {
-        var $link = $(this);
-        $('#tbl_search_form').slideToggle();
-        if ($link.text() == PMA_messages['strHideSearchCriteria']) {
-            $link.text(PMA_messages['strShowSearchCriteria']);
-        } else {
-            $link.text(PMA_messages['strHideSearchCriteria']);
-        }
-        // avoid default click action
-        return false;
-    })
+    $('#togglesearchformlink')
+        .html(PMA_messages['strShowSearchCriteria'])
+        .bind('click', function() {
+            var $link = $(this);
+            $('#tbl_search_form').slideToggle();
+            if ($link.text() == PMA_messages['strHideSearchCriteria']) {
+                $link.text(PMA_messages['strShowSearchCriteria']);
+            } else {
+                $link.text(PMA_messages['strHideSearchCriteria']);
+            }
+            // avoid default click action
+            return false;
+        });
 
     /**
      * Ajax event handler for Table Search
@@ -65,10 +70,11 @@ $(document).ready(function() {
                 $("#sqlqueryresults").html(response);
                 $("#sqlqueryresults").trigger('appendAnchor');
                 $('#tbl_search_form').hide();
-                $('#togglesearchform')
+                $('#togglesearchformlink')
                  // always start with the Show message
                  .text(PMA_messages['strShowSearchCriteria'])
-                 // now it's time to show the link
+                $('#togglesearchformdiv')
+                 // now it's time to show the div containing the link 
                  .show();
             } else {
                 // error message (zero rows)


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list