#4912 "Highlight pointer" and "Row marker" doesn't work properly

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2015-05-21 19:01:57 +05:30
parent ac2f9acaa3
commit a59ffb9654
3 changed files with 46 additions and 53 deletions

View File

@ -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 .= '<tr class="' . $alternating_color_class . '">';
$table_body_html .= '<tr class="' . implode(' ', $tr_class) . '">';
// 1. Prepares the row
// 1.1 Results from a "SELECT" statement -> builds the

View File

@ -281,38 +281,30 @@ table tr.even {
text-align: <?php echo $left; ?>;
}
<?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']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowseMarkerColor']; ?>;
}
<?php
/* marked table rows */
td.marked:not(.nomarker),
table tr.marked:not(.nomarker) td,
table tr.marked:not(.nomarker) th,
table tr.marked:not(.nomarker) {
background: <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowseMarkerColor']; ?>;
}
?>
<?php if ($GLOBALS['cfg']['BrowsePointerEnable']) { ?>
/* hovered items */
.odd:hover,
.even:hover,
.hover {
background: <?php echo $GLOBALS['cfg']['BrowsePointerBackground']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
/* hovered table rows */
table tr.odd:hover th,
table tr.even:hover th,
table tr.hover th {
background: <?php echo $GLOBALS['cfg']['BrowsePointerBackground']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
<?php
/* hovered items */
.odd:not(.nopointer):hover,
.even:not(.nopointer):hover,
.hover:not(.nopointer) {
background: <?php echo $GLOBALS['cfg']['BrowsePointerBackground']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
/* hovered table rows */
table tr.odd:not(.nopointer):hover th,
table tr.even:not(.nopointer):hover th,
table tr.hover:not(.nopointer) th {
background: <?php echo $GLOBALS['cfg']['BrowsePointerBackground']; ?>;
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
?>
/**
* marks table rows/cells if the db field is in a where condition

View File

@ -564,36 +564,30 @@ table tr.even {
text-align: <?php echo $left; ?>;
}
<?php if ($GLOBALS['cfg']['BrowseMarkerEnable']) { ?>
/* 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) {
<?php echo $_SESSION['PMA_Theme']->getCssGradient('ced6df', 'b6c6d7'); ?>
color: <?php echo $GLOBALS['cfg']['BrowseMarkerColor']; ?>;
}
<?php
} ?>
}
<?php if ($GLOBALS['cfg']['BrowsePointerEnable']) { ?>
/* hovered items */
.odd:hover,
.even:hover,
.hover {
/* hovered items */
.odd:not(.nopointer):hover,
.even:not(.nopointer):hover,
.hover:not(.nopointer) {
<?php echo $_SESSION['PMA_Theme']->getCssGradient('ced6df', 'b6c6d7'); ?>
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
}
/* 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 {
<?php echo $_SESSION['PMA_Theme']->getCssGradient('ced6df', 'b6c6d7'); ?>
color: <?php echo $GLOBALS['cfg']['BrowsePointerColor']; ?>;
}
<?php
} ?>
}
/**
* marks table rows/cells if the db field is in a where condition