From a59ffb96540293eae9f102f3f024a5c3fe0e6788 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 21 May 2015 19:01:57 +0530 Subject: [PATCH] #4912 "Highlight pointer" and "Row marker" doesn't work properly Signed-off-by: Madhura Jayaratne --- libraries/DisplayResults.class.php | 11 +++++-- themes/original/css/common.css.php | 50 +++++++++++++----------------- themes/pmahomme/css/common.css.php | 38 ++++++++++------------- 3 files changed, 46 insertions(+), 53 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 909845d204..7a2f6d5558 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2621,11 +2621,18 @@ class PMA_DisplayResults ); } - $alternating_color_class = ($odd_row ? 'odd' : 'even'); + $tr_class = array(); + if ($GLOBALS['cfg']['BrowsePointerEnable'] != true) { + $tr_class[] = 'nopointer'; + } + if ($GLOBALS['cfg']['BrowseMarkerEnable'] != true) { + $tr_class[] = 'nomarker'; + } + $tr_class[] = ($odd_row ? 'odd' : 'even'); $odd_row = ! $odd_row; // pointer code part - $table_body_html .= ''; + $table_body_html .= ''; // 1. Prepares the row // 1.1 Results from a "SELECT" statement -> builds the diff --git a/themes/original/css/common.css.php b/themes/original/css/common.css.php index 49b55a3ea5..455ac98ead 100644 --- a/themes/original/css/common.css.php +++ b/themes/original/css/common.css.php @@ -281,38 +281,30 @@ table tr.even { text-align: ; } - - /* marked table rows */ - td.marked, - table tr.marked td, - table tr.marked th, - table tr.marked { - background: ; - color: ; - } - ; + color: ; } -?> - - /* hovered items */ - .odd:hover, - .even:hover, - .hover { - background: ; - color: ; - } - - /* hovered table rows */ - table tr.odd:hover th, - table tr.even:hover th, - table tr.hover th { - background: ; - color: ; - } - ; + color: ; +} + +/* hovered table rows */ +table tr.odd:not(.nopointer):hover th, +table tr.even:not(.nopointer):hover th, +table tr.hover:not(.nopointer) th { + background: ; + color: ; } -?> /** * marks table rows/cells if the db field is in a where condition diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php index ef51d8678d..45f1f9ba4a 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -564,36 +564,30 @@ table tr.even { text-align: ; } - - /* marked table rows */ - td.marked, - table tr.marked td, - table tr.marked th, - table tr.marked { +/* marked table rows */ +td.marked:not(.nomarker), +table tr.marked:not(.nomarker) td, +table tr.marked:not(.nomarker) th, +table tr.marked:not(.nomarker) { getCssGradient('ced6df', 'b6c6d7'); ?> color: ; - } - +} - - /* hovered items */ - .odd:hover, - .even:hover, - .hover { +/* hovered items */ +.odd:not(.nopointer):hover, +.even:not(.nopointer):hover, +.hover:not(.nopointer) { getCssGradient('ced6df', 'b6c6d7'); ?> color: ; - } +} - /* hovered table rows */ - table tr.odd:hover th, - table tr.even:hover th, - table tr.hover th { +/* hovered table rows */ +table tr.odd:not(.nopointer):hover th, +table tr.even:not(.nopointer):hover th, +table tr.hover:not(.nopointer) th { getCssGradient('ced6df', 'b6c6d7'); ?> color: ; - } - +} /** * marks table rows/cells if the db field is in a where condition