Tablesort used to output class=" active" for active columns with other properties (align="right"). Now it correctly uses class="foo active" if a class 'foo' was specified, and class="active" otherwise.

4.5.x
Steven Wittens 2004-10-15 22:16:00 +00:00
parent a35ff36673
commit ea17f39811
1 changed files with 6 additions and 1 deletions

View File

@ -112,7 +112,12 @@ function tablesort_header($cell, $header, $ts) {
function tablesort_cell($cell, $header, $ts, $i) {
if ($header[$i]['data'] == $ts['name'] && $header[$i]['field']) {
if (is_array($cell)) {
$cell['class'] .= ' active';
if (isset($cell['class'])) {
$cell['class'] .= ' active';
}
else {
$cell['class'] = 'active';
}
}
else {
$cell = array('data' => $cell, 'class' => 'active');