Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.321
diff -u -F^f -r1.321 theme.inc
--- includes/theme.inc	17 Nov 2006 06:53:31 -0000	1.321
+++ includes/theme.inc	18 Nov 2006 00:21:35 -0000
@@ -779,6 +779,16 @@ function theme_table($header, $rows, $at
 }
 
 /**
+ * Returns a header cell for tables that have a select all functionality.
+ */
+function theme_table_select_header_cell() {
+  drupal_add_js(array('tableSelect' => array('selectAll' => t('Select all rows in this table'), 'selectNone' => t('Deselect all rows in this table'))), 'setting');
+  drupal_add_js('misc/tableselect.js');
+  
+  return array('class' => 'select-all');
+}
+
+/**
  * Return a themed sort icon.
  *
  * @param $style
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.496
diff -u -F^f -r1.496 comment.module
--- modules/comment/comment.module	12 Nov 2006 00:11:15 -0000	1.496
+++ modules/comment/comment.module	18 Nov 2006 00:21:36 -0000
@@ -1044,7 +1044,7 @@ function comment_admin_overview($type = 
   // load the comments that we want to display
   $status = ($type == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
   $form['header'] = array('#type' => 'value', '#value' => array(
-    NULL,
+    theme_table_select_header_cell(),
     array('data' => t('Subject'), 'field' => 'subject'),
     array('data' => t('Author'), 'field' => 'name'),
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.731
diff -u -F^f -r1.731 node.module
--- modules/node/node.module	17 Nov 2006 07:01:38 -0000	1.731
+++ modules/node/node.module	18 Nov 2006 00:21:39 -0000
@@ -1533,7 +1533,7 @@ function node_admin_nodes() {
  */
 function theme_node_admin_nodes($form) {
   // Overview table:
-  $header = array(NULL, t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
+  $header = array(theme_table_select_header_cell(), t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
 
   $output .= drupal_render($form['options']);
   if (isset($form['title']) && is_array($form['title'])) {
Index: modules/system/system.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.css,v
retrieving revision 1.14
diff -u -F^f -r1.14 system.css
--- modules/system/system.css	24 Oct 2006 19:36:52 -0000	1.14
+++ modules/system/system.css	18 Nov 2006 00:21:39 -0000
@@ -325,3 +325,10 @@
   display: block;
   padding: 1.5em 0 .5em;
 }
+
+/*
+** To be used with tableselect.js
+*/
+tr.selected td {
+  background: #ffc;
+}
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.712
diff -u -F^f -r1.712 user.module
--- modules/user/user.module	17 Nov 2006 21:46:32 -0000	1.712
+++ modules/user/user.module	18 Nov 2006 00:21:42 -0000
@@ -2043,7 +2043,7 @@ function user_admin_account() {
 function theme_user_admin_account($form) {
   // Overview table:
   $header = array(
-    array(),
+    theme_table_select_header_cell(),
     array('data' => t('Username'), 'field' => 'u.name'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),
