Skip to content
Snippets Groups Projects
Commit ea17f398 authored by Steven Wittens's avatar Steven Wittens
Browse files

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
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -112,8 +112,13 @@ function tablesort_header($cell, $header, $ts) { ...@@ -112,8 +112,13 @@ function tablesort_header($cell, $header, $ts) {
function tablesort_cell($cell, $header, $ts, $i) { function tablesort_cell($cell, $header, $ts, $i) {
if ($header[$i]['data'] == $ts['name'] && $header[$i]['field']) { if ($header[$i]['data'] == $ts['name'] && $header[$i]['field']) {
if (is_array($cell)) { if (is_array($cell)) {
if (isset($cell['class'])) {
$cell['class'] .= ' active'; $cell['class'] .= ' active';
} }
else {
$cell['class'] = 'active';
}
}
else { else {
$cell = array('data' => $cell, 'class' => 'active'); $cell = array('data' => $cell, 'class' => 'active');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment