[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1893-ga6e6c3f

Michal Čihař nijel at users.sourceforge.net
Tue Feb 8 12:12:30 CET 2011


The branch, master has been updated
       via  a6e6c3fcf17fefd644bca3e7bce0311497ede539 (commit)
       via  a22f7aaf63f488ba0477daebb1afc0c3577b8d5d (commit)
       via  5b8b8b5bbab370b8afb5ae19e375ce16d7a91e7b (commit)
      from  f2e9103f5241caf4459401d744ffa637842a7c85 (commit)


- Log -----------------------------------------------------------------
commit a6e6c3fcf17fefd644bca3e7bce0311497ede539
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Feb 8 12:12:21 2011 +0100

    Init sliders again after getting it using AJAX

commit a22f7aaf63f488ba0477daebb1afc0c3577b8d5d
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Feb 8 12:07:25 2011 +0100

    Make PMA_init_slider idempotent

commit 5b8b8b5bbab370b8afb5ae19e375ce16d7a91e7b
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Feb 8 12:03:50 2011 +0100

    Move slider initialization to function

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

Summary of changes:
 js/functions.js |   35 ++++++++++++++++++++++-------------
 js/sql.js       |    4 ++++
 2 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/js/functions.js b/js/functions.js
index fba8f91..4fcfb1d 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -2410,6 +2410,27 @@ function PMA_set_status_label(id) {
 }
 
 /**
+ * Initializes slider effect.
+ */
+function PMA_init_slider() {
+    $('.pma_auto_slider').each(function(idx, e) {
+        if ($(e).hasClass('slider_init_done')) return;
+        $(e).addClass('slider_init_done');
+        $('<span id="anchor_status_' + e.id + '"><span>')
+            .insertBefore(e);
+        PMA_set_status_label(e.id);
+
+        $('<a href="#' + e.id + '" id="anchor_' + e.id + '">' + e.title + '</a>')
+            .insertBefore(e)
+            .click(function() {
+                $('#' + e.id).toggle('clip');
+                PMA_set_status_label(e.id);
+                return false;
+            });
+    });
+}
+
+/**
  * Vertical pointer
  */
 $(document).ready(function() {
@@ -2480,19 +2501,7 @@ $(document).ready(function() {
     /**
      * Slider effect.
      */
-    $('.pma_auto_slider').each(function(idx, e) {
-        $('<span id="anchor_status_' + e.id + '"><span>')
-            .insertBefore(e);
-        PMA_set_status_label(e.id);
-
-        $('<a href="#' + e.id + '" id="anchor_' + e.id + '">' + e.title + '</a>')
-            .insertBefore(e)
-            .click(function() {
-                $('#' + e.id).toggle('clip');
-                PMA_set_status_label(e.id);
-                return false;
-            });
-    });
+    PMA_init_slider();
 
 }) // end of $(document).ready()
 
diff --git a/js/sql.js b/js/sql.js
index 5593446..80f4337 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -255,6 +255,7 @@ $(document).ready(function() {
                 if($("#togglequerybox").siblings(":visible").length > 0) {
                     $("#togglequerybox").trigger('click');
                 }
+                PMA_init_slider();
             }
         }) // end $.post()
     }) // end SQL Query submit
@@ -287,6 +288,7 @@ $(document).ready(function() {
         $.post($the_form.attr('action'), $the_form.serialize(), function(data) {
             $("#sqlqueryresults").html(data);
             $("#sqlqueryresults").trigger('appendAnchor');
+            PMA_init_slider();
         }) // end $.post()
     })// end Paginate results table
 
@@ -307,6 +309,7 @@ $(document).ready(function() {
             $.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) {
                 $("#sqlqueryresults").html(data);
                 $("#sqlqueryresults").trigger('appendAnchor');
+                PMA_init_slider();
             }) // end $.post()
         } else {
             $the_form.submit();
@@ -349,6 +352,7 @@ $(document).ready(function() {
             $("#sqlqueryresults")
              .html(data)
              .trigger('appendAnchor');
+            PMA_init_slider();
         }) // end $.post()
     })
     //end displayOptionsForm handler


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list