[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_8-10930-gb2d7a78

Marc Delisle lem9 at users.sourceforge.net
Thu Nov 18 23:11:15 CET 2010


The branch, master has been updated
       via  b2d7a780120ccaca22f11a0cd644d22090a4f7cc (commit)
      from  4659be88eb7100870a48491467d1c16c348d24ae (commit)


- Log -----------------------------------------------------------------
commit b2d7a780120ccaca22f11a0cd644d22090a4f7cc
Author: Marc Delisle <marc at infomarc.info>
Date:   Thu Nov 18 17:11:04 2010 -0500

    rfe #3111455 [interface] Column highlighting and marking in table view

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

Summary of changes:
 ChangeLog                     |    1 +
 js/sql.js                     |   30 ++++++++++++++++++++++++++++++
 libraries/display_tbl.lib.php |    6 +++++-
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 92a3a50..73375bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -118,6 +118,7 @@
 - rfe #2956556 [interface] Allow to wrap enum values.
 - bug #1669459 [interface] Do not automatically mark PDF schema rows to delete
 - bug #3087682 [interface] Do not apply LeftFrameDBSeparator on first character.
+- rfe #3111455 [interface] Column highlighting and marking in table view
 
 3.3.9.0 (not yet released)
 - bug [doc] Fix references to MySQL doc
diff --git a/js/sql.js b/js/sql.js
index 8e04323..ab3bd94 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -686,4 +686,34 @@ $(document).ready(function() {
     }) // End After editing, clicking again should post data
 }, 'top.frame_content') // end $(document).ready()
 
+/**
+ * Starting from some th, change the class of all td under it
+ */
+function PMA_changeClassForColumn($this_th, class) {
+    // index 0 is the th containing the big T
+    var th_index = $this_th.index();
+    // .eq() is zero-based
+    th_index--;
+    var $tr_with_data = $this_th.closest('table').find('tbody tr ').has('td.data_inline_edit');
+    $tr_with_data.each(function() {
+        $(this).find('td.data_inline_edit:eq('+th_index+')').toggleClass(class);
+    });
+}
+
+$(document).ready(function() {
+    /**
+     * column highlighting in horizontal mode when hovering over the column header
+     */
+    $('.column_heading').live('hover', function() {
+        PMA_changeClassForColumn($(this), 'hover'); 
+        });
+
+    /**
+     * column marking in horizontal mode when clicking the column header
+     */
+    $('.column_heading').live('click', function() {
+        PMA_changeClassForColumn($(this), 'marked'); 
+        });
+})
+
 /**#@- */
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 700899a..ed6b488 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -864,9 +864,13 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
              || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
                 echo '<th';
+                $th_class = array(); 
                 if ($condition_field) {
-                    echo ' class="condition"';
+                    $th_class[] = 'condition';
                 }
+                $th_class[] = 'column_heading';
+                echo ' class="' . implode(' ', $th_class) . '"';
+
                 if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
                     echo ' valign="bottom"';
                 }


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list