=== added file 'misc/checkbox.js'
--- misc/checkbox.js	1970-01-01 00:00:00 +0000
+++ misc/checkbox.js	2006-11-13 04:01:57 +0000
@@ -0,0 +1,19 @@
+// $Id$
+
+Drupal.checkAllAttach = function() {
+  // Look for an element with class="checkall" and insert a check box into it
+  // that will check/uncheck all check boxes within the enclosing form.
+  $(".checkall").each(function() {
+    $('<input type="checkbox" class="form-checkbox" />').click(function() {
+      var state = this.checked;
+      $(this.form).find("input[@type='checkbox']").each(function() {
+        this.checked = state;
+      });
+    }).appendTo(this);
+  });
+}
+
+// Global Killswitch
+if (Drupal.jsEnabled) {
+  $(document).ready(Drupal.checkAllAttach);
+}

=== modified file 'modules/comment/comment.module'
--- modules/comment/comment.module	2006-11-12 00:11:15 +0000
+++ modules/comment/comment.module	2006-11-13 03:55:47 +0000
@@ -1029,6 +1029,8 @@ function comment_admin($type = 'new') {
 }
 
 function comment_admin_overview($type = 'new', $arg) {
+  drupal_add_js('misc/checkbox.js');
+
   // build an 'Update options' form
   $form['options'] = array(
     '#type' => 'fieldset', '#title' => t('Update options'),
@@ -1044,7 +1046,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,
+    array('class' => 'checkall'),
     array('data' => t('Subject'), 'field' => 'subject'),
     array('data' => t('Author'), 'field' => 'name'),
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),

=== modified file 'modules/node/node.module'
--- modules/node/node.module	2006-11-12 19:56:07 +0000
+++ modules/node/node.module	2006-11-13 03:55:47 +0000
@@ -1490,6 +1490,8 @@ function node_admin_content() {
 }
 
 function node_admin_nodes() {
+  drupal_add_js('misc/checkbox.js');
+
   global $form_values;
   $filter = node_build_filter_query();
 
@@ -1526,7 +1528,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(array('class' => 'checkall'), t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
 
   $output .= drupal_render($form['options']);
   if (isset($form['title']) && is_array($form['title'])) {

=== modified file 'modules/user/user.module'
--- modules/user/user.module	2006-11-11 23:52:11 +0000
+++ modules/user/user.module	2006-11-13 03:55:47 +0000
@@ -1960,6 +1960,8 @@ function theme_user_admin_new_role($form
 }
 
 function user_admin_account() {
+  drupal_add_js('misc/checkbox.js');
+
   $filter = user_build_filter_query();
 
   $header = array(
@@ -2031,7 +2033,7 @@ function user_admin_account() {
 function theme_user_admin_account($form) {
   // Overview table:
   $header = array(
-    array(),
+    array('class' => 'checkall'),
     array('data' => t('Username'), 'field' => 'u.name'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),

