The branch, master has been updated
via ce116ac614778efaa61f641b02d36ce0269feb56 (commit)
from 22bb1aa134cdb52a37c06f8fbe83d8534e01a475 (commit)
- Log -----------------------------------------------------------------
commit ce116ac614778efaa61f641b02d36ce0269feb56
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Fri Mar 11 23:55:52 2011 +0100
fixed row/column highlighting
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 23 ++++++++++++++++++++---
themes/original/css/theme_right.css.php | 1 +
themes/pmahomme/css/theme_right.css.php | 1 +
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index 8abdc51..94221b1 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -594,10 +594,27 @@ $(document).ready(function() {
*/
$('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) {
//do not trigger when clicked on anchor or inside input element (in inline editing mode) with exception of the first checkbox
- if (!jQuery(e.target).is('a, a *, :input:not([name^="rows_to_delete"])')) {
- var $tr = $(this);
+ if ($(e.target).is('a, a *')) {
+ return;
+ }
+ // XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
+ var $tr = $(this);
+ var $checkbox = $tr.find(':checkbox');
+ if ($checkbox.length) {
+ // checkbox in a row, add or remove class depending on checkbox state
+ var checked = $checkbox.attr('checked');
+ if (!$(e.target).is(':checkbox, label')) {
+ checked = !checked;
+ $checkbox.attr('checked', checked);
+ }
+ if (checked) {
+ $tr.addClass('marked');
+ } else {
+ $tr.removeClass('marked');
+ }
+ } else {
+ // normaln data table, just toggle class
$tr.toggleClass('marked');
- $tr.children().toggleClass('marked');
}
});
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index a0bbfea..1c9d5f5 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -206,6 +206,7 @@ table tr.even {
<?php if ($GLOBALS['cfg']['BrowseMarkerEnable']) { ?>
/* marked table rows */
td.marked,
+table tr.marked td,
table tr.marked th,
table tr.marked {
background: <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index 924a729..652b441 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -356,6 +356,7 @@ table tr.even {
<?php if ($GLOBALS['cfg']['BrowseMarkerEnable']) { ?>
/* marked table rows */
td.marked,
+table tr.marked td,
table tr.marked th,
table tr.marked {
background: url(./themes/pmahomme/img/marked_bg.png) repeat-x #b6c6d7;
hooks/post-receive
--
phpMyAdmin