Last updated September 27, 2011. Created on July 7, 2009.
Edited by JuliaKM, pawel.traczynski, joshmiller. Log in to edit this page.

To collapse all of the field groups on the modules pages:

1) Create a new block with the block body:

<script language="javascript">
$(document).ready(function () {
  $("form#system-modules fieldset.collapsible:not(.collapsed) .collapse-processed a").click();
});
</script>

2) Set the Input Format to "Full HTML" or "PHP code."

3) Under "Page Specific Visibility Settings", select "Show on only the listed pages." and enter the path:

admin/build/modules/list

4) Assign the block to appear in a region that will apear as part of your admin/build/modules/list page.

Learn more about jQuery in Drupal at http://drupal.org/node/301181.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

aniediudo’s picture

You can also do this via the settings page of the Admin Menu contrib module. I would strongly advise newbies to embrace this module. It could save you a whole lot of clicks, page loads & headaches, esp. if you have a crawling internet connection like mine!

giuseppepillera’s picture

This tips is very useful!! Thank u very much! I was becoming almost idiot to search and search in my modules adm page!

ñull’s picture

I would like to use the same method to close one check out pane of Ubercart, but this code does not work (any more). Any clue why?