Index: directory.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/directory/directory.css,v retrieving revision 1.4.2.2 diff -u -p -r1.4.2.2 directory.css --- directory.css 22 May 2007 06:11:58 -0000 1.4.2.2 +++ directory.css 2 Jun 2007 13:15:19 -0000 @@ -24,3 +24,31 @@ table.directory-resources ul li { displa table.directory-resources { width: 98%; } table.directory-resources { margin-top: 1em; margin-bottom: .25em; } table.directory-resources tr td { width: 50%; } /* make columns evenly spaced */ + + +/* Controls the javascript collapsible vocabs on the main page */ +xdiv.directory-home-vocabulary-collapsed { + margin-bottom: 2em; +} + + + +div.directory-home-vocabulary-collapsible h3{ + display: inline; +} + +.directory-home-toggle-link { + text-decoration: underline; + color: blue; + padding-left: 3em; + font-size: 80%; +} + +.directory-home-toggle-link { + color: blue; +} + +.directory-home-toggle-link:hover { + cursor:pointer; +} + Index: directory.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/directory/directory.module,v retrieving revision 1.11.2.24 diff -u -p -r1.11.2.24 directory.module --- directory.module 2 Jun 2007 10:32:50 -0000 1.11.2.24 +++ directory.module 2 Jun 2007 13:15:21 -0000 @@ -23,6 +23,8 @@ function directory_menu($may_cache) { if (!$may_cache) { drupal_add_css(drupal_get_path('module', 'directory') .'/directory.css'); + drupal_add_js(drupal_get_path('module', 'directory') .'/directory.js'); + drupal_add_js("var toggle = ". drupal_to_js(t('toggle')) .';', 'inline'); } if ($may_cache) { @@ -115,6 +117,17 @@ function directory_admin_settings() { '#extra' => 0, '#multiple' => TRUE, ); + + $form['directory_vocabularies_collapsed'] = array( + '#type' => 'select', + '#title' => t('Which vocabularies are collapsed by default?'), + '#description' => t('The checked vocabularies will be collapsed by default if they are shown on the main directory page.'), + '#options' => $vocs, + '#default_value' => variable_get('directory_vocabularies_collapsed', array()), + '#required' => FALSE, + '#extra' => 0, + '#multiple' => TRUE, + ); $form['directory_show_child_counts'] = array( '#type' => 'checkbox', @@ -377,7 +391,13 @@ function theme_directory_home_vocabulary $vocabulary = taxonomy_get_vocabulary($vid); $terms = taxonomy_get_children(0, $vid); - $output = '