Commit ea17f398 authored by Steven Wittens's avatar Steven Wittens

Tablesort used to output class=" active" for active columns with other...

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.
parent a35ff366
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment