summaryrefslogtreecommitdiff
path: root/includes/form.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/form.inc')
-rw-r--r--includes/form.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/form.inc b/includes/form.inc
index affd82b0e..68f24f65c 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -2542,8 +2542,10 @@ function theme_tableselect($variables) {
}
// Add an empty header or a "Select all" checkbox to provide room for the
// checkboxes/radios in the first table column.
- $first_col = $element['#js_select'] ? array(theme('table_select_header_cell')) : array('');
- $header = array_merge($first_col, $header);
+ if ($element['#js_select']) {
+ drupal_add_js('misc/tableselect.js');
+ array_unshift($header, array('class' => array('select-all')));
+ }
}
return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes']));
}