Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/CHANGELOG.txt,v
retrieving revision 1.33.2.6
diff -u -p -r1.33.2.6 CHANGELOG.txt
--- CHANGELOG.txt	9 Jun 2008 10:19:41 -0000	1.33.2.6
+++ CHANGELOG.txt	11 Jun 2008 01:35:41 -0000
@@ -8,6 +8,12 @@ Admin Menu 6.x-x.x, xxxx-xx-xx
 ------------------------------
 #132524 by pwolanin: Fixed admin_menu links are re-inserted each time menu links
   are rebuilt.
+by smk-ka: Performance: Use 'defer' attribute for JavaScript to delay execution.
+#266099 by sun: Fixed description of "Apply margin-top" configuration setting.
+#266308 by sun: Usability: Added Utility module features to collapse module
+  fieldsets on Modules page.
+by sun: Added menu callback to disable/enable developer modules.
+#251341 by sun: Added docs about display drupal links permission.
 
 
 Admin Menu 6.x-1.0-BETA, 2008-06-08
@@ -26,7 +32,7 @@ Admin Menu 5.x-2.x, xxxx-xx-xx
 #246221 by sun: Fixed user counter displays different values than Who's online
   block.
 #239022 by mikl: Added Danish translation.
-#234444 by smk-ka: Fixed favicon issue for the "admin" menu.
+#234444 by smk-ka: Fixed admin_menu icon does not respect theme settings.
 #198240 by sun: Fixed admin_menu displayed in print output.
 
 
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/README.txt,v
retrieving revision 1.20.2.1
diff -u -p -r1.20.2.1 README.txt
--- README.txt	7 Jun 2008 16:34:09 -0000	1.20.2.1
+++ README.txt	11 Jun 2008 01:33:56 -0000
@@ -22,17 +22,13 @@ None.
 
 -- INSTALLATION --
 
-* Copy admin_menu module to your modules directory and enable it on the admin
-  modules page.
+* Install as usual, see http://drupal.org/node/70151 for further information.
 
 
 -- CONFIGURATION --
 
-* Configure module settings in administer -> Site configuration ->
-  Administration Menu.
-
-* Go to Administer -> User management -> Access control and assign permissions
-  for Drupal Administration Menu:
+* Configure user permissions in Administer >> User management >> Permissions
+  >> admin_menu module:
 
   - access administration menu: Displays Drupal Administration Menu.
 
@@ -44,6 +40,9 @@ None.
   have the permission 'administer access control' and 'administer users', the
   whole 'User management' menu item will not be displayed.
 
+* Customize module settings in Administer >> Site configuration >> Administration
+  Menu.
+
 
 -- CUSTOMIZATION --
 
@@ -89,6 +88,15 @@ body #admin-menu { font-size: 10px; }
 
 -- FAQ --
 
+Q: When admin_menu is enabled, plenty of blank space is added to the bottom of
+   my theme. Why?
+
+A: This is caused by a long list of links to module issue queues at Drupal.org.
+   Just go to Administer >> User management >> Permissions >> admin_menu and
+   disable the permission "display drupal links" for your or all roles.
+   Since uid 1 always has all permissions, this link list cannot be disabled
+   for uid 1.
+
 Q: After upgrading to 6.x-1.x, admin_menu disappeared. Why?
 
 A: This should not happen. If it did, visit
@@ -106,6 +114,7 @@ A: Yes, this is the intended behavior. S
 
 Current maintainers:
 * Daniel F. Kudwien (sun) - dev@unleashedmind.com
+* Peter Wolanin (pwolanin) - http://drupal.org/user/49851
 * Stefan M. Kudwien (smk-ka) - dev@unleashedmind.com
 
 Major rewrite for Drupal 6 by Peter Wolanin (pwolanin).
Index: admin_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v
retrieving revision 1.11.2.4
diff -u -p -r1.11.2.4 admin_menu.inc
--- admin_menu.inc	9 Jun 2008 10:19:41 -0000	1.11.2.4
+++ admin_menu.inc	14 Jun 2008 22:45:44 -0000
@@ -241,6 +241,14 @@ function admin_menu_admin_menu(&$deleted
       }
     }
   }
+  // Add developer modules toggle link.
+  $current_state = variable_get('admin_menu_devel_modules_enabled', NULL);
+  $links[] = array(
+    'title' => isset($current_state) ? t('Enable developer modules') : t('Disable developer modules'),
+    'path' => 'admin_menu/toggle-modules',
+    'weight' => 88,
+    'parent_path' => $icon_path,
+  );
 
   return $links;
 }
@@ -315,3 +323,56 @@ function admin_menu_adjust_items(&$menu_
   return $deleted;
 }
 
+/**
+ * Form builder function for module settings.
+ */
+function admin_menu_theme_settings() {
+  $form['admin_menu_margin_top'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Apply margin-top to page body'),
+    '#default_value' => variable_get('admin_menu_margin_top', 1),
+    '#description' => t('If enabled, the output of this site will be shifted for approx. 20 pixels from the top of the viewport to make room for the Administration Menu. If this setting is disabled, some absolute or fixed positioned page elements at the top of the viewport may be covered by Administration Menu.'),
+  );
+  $form['tweaks'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Drupal Administration Tweaks'),
+  );
+  $form['tweaks']['admin_menu_tweak_modules'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Collapse fieldsets on modules page'),
+    '#default_value' => variable_get('admin_menu_tweak_modules', 1),
+    '#description' => t('If enabled, fieldsets on the <a href="!modules-url">Site building &raquo; Modules</a> page will be initially collapsed.', array('!modules-url' => url('admin/build/modules'))),
+  );
+  if (module_exists('util')) {
+    $form['tweaks']['admin_menu_tweak_modules']['#description'] .= '<br /><strong>'. t('If you installed Utility module for this purpose, you can safely uninstall it now!') .'</strong>';
+  }
+  return system_settings_form($form);
+}
+
+/**
+ * Menu callback to enable/disable developer modules.
+ *
+ * This saves up to 150ms on each uncached page request. Not much, but
+ * on larger Drupal sites this is actually a 10% performance increase.
+ */
+function admin_menu_toggle_modules() {
+  $current_state = variable_get('admin_menu_devel_modules_enabled', NULL);
+  if (isset($current_state)) {
+    // Re-enable modules that were enabled before.
+    module_enable($current_state);
+    variable_del('admin_menu_devel_modules_enabled');
+  }
+  else {
+    // Allow site admins to override this variable via settings.php.
+    $devel_modules = variable_get('admin_menu_devel_modules', array('cache_disable', 'coder', 'debug', 'delete_all', 'demo', 'devel', 'devel_node_access', 'macro', 'form_controller', 'imagecache_ui', 'journal', 'trace', 'util', 'views_ui', 'views_theme_wizard'));
+    // Store currently enabled modules in a variable.
+    $devel_modules = array_intersect(module_list(FALSE, FALSE), $devel_modules);
+    variable_set('admin_menu_devel_modules_enabled', $devel_modules);
+    // Disable developer modules.
+    module_disable($devel_modules);
+  }
+  // Rebuild the admin menu.
+  admin_menu_menu_alter();
+  drupal_goto(referer_uri());
+}
+
Index: admin_menu.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.install,v
retrieving revision 1.4.2.1
diff -u -p -r1.4.2.1 admin_menu.install
--- admin_menu.install	7 Jun 2008 16:34:09 -0000	1.4.2.1
+++ admin_menu.install	11 Jun 2008 04:11:01 -0000
@@ -8,10 +8,25 @@ function admin_menu_uninstall() {
   // Delete menu links.
   db_query("DELETE FROM {menu_links} WHERE module = 'admin_menu'");
   menu_cache_clear_all();
+  // Delete variables.
+  variable_del('admin_menu_rebuild_links');
+  variable_del('admin_menu_devel_modules_enabled');
 }
 
 /**
- * @todo Drop the {admin_menu} table in admin_menu_update_6000() on sites
- *   that used one of the later patches in #132524.
+ * Ensure that admin_menu is rebuilt after upgrading to D6.
  */
+function admin_menu_update_6000() {
+  $ret = array();
+  // Delete menu links.
+  db_query("DELETE FROM {menu_links} WHERE module = 'admin_menu'");
+  variable_set('admin_menu_rebuild_links', TRUE);
+  // Drop the {admin_menu} table in admin_menu_update_6000() on sites that used
+  // one of the later patches in #132524.
+  if (db_table_exists('admin_menu')) {
+    $ret = update_sql("DROP TABLE {admin_menu}");
+  }
+  return $ret;
+}
+
 
Index: admin_menu.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.js,v
retrieving revision 1.7
diff -u -p -r1.7 admin_menu.js
--- admin_menu.js	24 Feb 2008 19:02:45 -0000	1.7
+++ admin_menu.js	11 Jun 2008 01:18:49 -0000
@@ -2,10 +2,15 @@
 
 $(document).ready(function() {
   // Apply margin-top if enabled; directly applying marginTop doesn't work in IE.
-  if (Drupal.settings.admin_menu_margin_top == 1) {
+  if (Drupal.settings.admin_menu.margin_top) {
     $('body').addClass('admin-menu');
   }
 
+  // Collapse fieldsets on Modules page.
+  if (Drupal.settings.admin_menu.tweak_modules) {
+    $('[id^="system-modules"] fieldset:not(.collapsed)').addClass('collapsed');
+  }
+
   // Hover emulation for IE 6.
   if ($.browser.msie && parseInt(jQuery.browser.version) == 6) {
     $('#admin-menu li').hover(function() {
Index: admin_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v
retrieving revision 1.43.2.2
diff -u -p -r1.43.2.2 admin_menu.module
--- admin_menu.module	8 Jun 2008 02:40:32 -0000	1.43.2.2
+++ admin_menu.module	11 Jun 2008 04:12:53 -0000
@@ -69,11 +69,19 @@ function admin_menu_init() {
   if (user_access('access administration menu')) {
     $path = drupal_get_path('module', 'admin_menu');
     drupal_add_css($path .'/admin_menu.css', 'module', 'all', FALSE);
-    drupal_add_js($path .'/admin_menu.js');
-    drupal_add_js(array('admin_menu_margin_top' => variable_get('admin_menu_margin_top', 1)), 'setting');
+    // Performance: Defer execution.
+    drupal_add_js($path .'/admin_menu.js', 'module', 'header', TRUE);
+
+    drupal_add_js(array('admin_menu' => array('margin_top' => variable_get('admin_menu_margin_top', 1))), 'setting');
+    if ($_GET['q'] == 'admin/build/modules') {
+      drupal_add_js(array('admin_menu' => array('tweak_modules' => variable_get('admin_menu_tweak_modules', 1))), 'setting');
+    }
   }
 }
 
+/**
+ * Implementation of hook_menu().
+ */
 function admin_menu_menu() {
   $items = array();
   $items['admin/settings/admin_menu'] = array(
@@ -82,21 +90,15 @@ function admin_menu_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('admin_menu_theme_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'admin_menu.inc',
   );
-  return $items;
-}
-
-/**
- * Form builder function for module settings.
- */
-function admin_menu_theme_settings() {
-  $form['admin_menu_margin_top'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Apply margin-top to page body'),
-    '#default_value' => variable_get('admin_menu_margin_top', 1),
-    '#description' => t('If this setting is disabled, some absolute or fixed positioned page elements may be covered by Administration Menu.'),
+  $items['admin_menu/toggle-modules'] = array(
+    'page callback' => 'admin_menu_toggle_modules',
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_CALLBACK,
+    'file' => 'admin_menu.inc',
   );
-  return system_settings_form($form);
+  return $items;
 }
 
 /**
@@ -216,7 +218,7 @@ function admin_menu_form_devel_admin_set
     '#default_value' => variable_get('admin_menu_show_all', 0),
     '#description' => t('Enable this option to disable user access checks for menu items, i.e. every menu item in the visible menu tree will be displayed to every user regardless of access permissions.'),
   );
-  // Rebuild the admin menu
+  // Rebuild the admin menu.
   $form['#submit'][] = 'admin_menu_menu_alter';
 }
 
