### Eclipse Workspace Patch 1.0
#P Drupal HEAD (Core)
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.715
diff -u -r1.715 node.module
--- modules/node/node.module	23 Oct 2006 20:45:08 -0000	1.715
+++ modules/node/node.module	25 Oct 2006 07:17:56 -0000
@@ -1469,6 +1469,8 @@
 }
 
 function node_admin_nodes() {
+  drupal_add_js('misc/checkbox.js');
+
   global $form_values;
   $filter = node_build_filter_query();
 
@@ -1505,7 +1507,7 @@
  */
 function theme_node_admin_nodes($form) {
   // Overview table:
-  $header = array(NULL, t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
+  $header = array('<span class="checkall"></span>', 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/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.698
diff -u -r1.698 user.module
--- modules/user/user.module	23 Oct 2006 20:59:56 -0000	1.698
+++ modules/user/user.module	25 Oct 2006 07:17:58 -0000
@@ -1946,6 +1946,8 @@
 }
 
 function user_admin_account() {
+  drupal_add_js('misc/checkbox.js');
+
   $filter = user_build_filter_query();
 
   $header = array(
@@ -2017,7 +2019,7 @@
 function theme_user_admin_account($form) {
   // Overview table:
   $header = array(
-    array(),
+    array('data' => '<span class="checkall"></span>'),
     array('data' => t('Username'), 'field' => 'u.name'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.494
diff -u -r1.494 comment.module
--- modules/comment/comment.module	24 Oct 2006 20:31:25 -0000	1.494
+++ modules/comment/comment.module	25 Oct 2006 07:17:53 -0000
@@ -1028,6 +1028,8 @@
 }
 
 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'),
@@ -1043,7 +1045,7 @@
   // load the comments that we want to display
   $status = ($type == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
   $form['header'] = array('#type' => 'value', '#value' => array(
-    NULL,
+    '<span class="checkall"></span>',
     array('data' => t('Subject'), 'field' => 'subject'),
     array('data' => t('Author'), 'field' => 'name'),
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
Index: misc/checkbox.js
===================================================================
RCS file: misc/checkbox.js
diff -N misc/checkbox.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ misc/checkbox.js	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,20 @@
+// $Id: $
+
+Drupal.checkAllAttach = function() {
+  // Look for a <span class="checkall"></span> and turn it into a check box
+  // that will check/uncheck all check boxes within the enclosing form.
+  $("span[@class='checkall']").each(function() {
+    $(this).html('<input type="checkbox" onClick="Drupal.checkAll(this.form, this.checked)" />');
+  });
+}
+
+Drupal.checkAll = function(formObj, checked) {
+  $(formObj).find("input[@type='checkbox']").each(function() {
+		this.checked = checked;
+  });
+};
+
+// Global Killswitch
+if (Drupal.jsEnabled) {
+  $(document).ready(Drupal.checkAllAttach);
+}
