Commit 8911c4ef authored by webchick's avatar webchick

#891476 by solotandem: Fixed Tableselect is missing a column header when not multiple value.

parent 9fedd987
...@@ -2788,9 +2788,14 @@ function theme_tableselect($variables) { ...@@ -2788,9 +2788,14 @@ function theme_tableselect($variables) {
// Add an empty header or a "Select all" checkbox to provide room for the // Add an empty header or a "Select all" checkbox to provide room for the
// checkboxes/radios in the first table column. // checkboxes/radios in the first table column.
if ($element['#js_select']) { if ($element['#js_select']) {
// Add a "Select all" checkbox when checkboxes are displayed.
drupal_add_js('misc/tableselect.js'); drupal_add_js('misc/tableselect.js');
array_unshift($header, array('class' => array('select-all'))); array_unshift($header, array('class' => array('select-all')));
} }
else {
// Add an empty header when radio buttons are displayed.
array_unshift($header, '');
}
} }
return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes'])); return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes']));
} }
......
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