? parent-save.patch
? vocab-collapsible-optional.patch
Index: taxonomy_super_select.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_super_select/taxonomy_super_select.module,v
retrieving revision 1.10.2.1
diff -u -p -r1.10.2.1 taxonomy_super_select.module
--- taxonomy_super_select.module	21 Jan 2009 22:44:21 -0000	1.10.2.1
+++ taxonomy_super_select.module	1 Oct 2010 22:35:26 -0000
@@ -47,6 +47,14 @@ function taxonomy_super_select_form_alte
         '#weight'         => 0,
         '#description'    => t('Leaving this disabled forces users to select dangling child terms. Useful for grouping terms with descriptive parent terms that are not themselves needed for display.'),
       );
+      $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['collapsible'] = array(
+        '#type'           => 'checkbox',
+        '#title'          => t('Make this vocabulary collapsible'),
+        '#default_value'  => ($tss ? $tss['collapsible'] : TRUE),
+        '#return_value'   => 1,
+        '#weight'         => 0,
+        '#description'    => t('Display this vocabulary in a fieldset (collapsible).'),
+      );
 
       if (module_exists('taxonomy_image')) {
         $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['image'] = array(
@@ -94,7 +102,7 @@ function taxonomy_super_select_form_alte
       if (!$terms = taxonomy_get_tree($vid, 0, -1, 1)) {
         continue;
       }
-      $form['taxonomy'][$vid] = _tss_branch($vid, $vocabularies[$vid]);
+      $form['taxonomy'][$vid] = _tss_branch($vid, $vocabularies[$vid], NULL, $tss[$vid]['collapsible'] ? 'fieldset' : 'normal');
       if ($tags[$vid]) {
         $form['taxonomy'][$vid]['tags'] = $tags[$vid];
       }
@@ -145,6 +153,7 @@ function _tss_branch($vid, $term, $value
   $required = $term->required ? ' <span class="form-required" title="'. t('This field is required.') .'">*</span>' : '';
   switch ($type) {
     case 'fieldset':
+    case 'normal':
       // In this section, $term is actually the vocabulary.
       // Automatically expand required vocabs or if the parent term is selected
       $collapsed = ($required OR $term->parent_value) ? FALSE : TRUE;
@@ -155,16 +164,26 @@ function _tss_branch($vid, $term, $value
         $help = null;
       }
       $form = array(
-        '#type' => 'fieldset',
-        '#title' => check_plain($term->name) . $required,
-        '#collapsible' => TRUE,
-        '#collapsed' => $collapsed,
         '#weight' => ($fieldweight >= 0) ? $fieldweight : $term->weight,
         '#parents' => array('taxonomy', $vid),
         '#description' => $term->description . $help,
         '#prefix' => '<div class="taxonomy-super-select-'. ($term->multiple ? 'checkboxes' : 'radios') .'">',
         '#suffix' => '</div>',
       );
+      if ($type == 'fieldset') {
+        $form += array(
+          '#type' => 'fieldset',
+          '#title' => check_plain($term->name) . $required,
+          '#collapsible' => TRUE,
+          '#collapsed' => $collapsed,
+        );
+      }
+      else {
+        $form += array(
+          '#type' => 'item',
+          '#title' => check_plain($term->name) . $required,
+        );
+      }
       // If we have vocabulary that is single select and not required or is freetagging we need a way to unselect the term
       if ((!$required OR $term->tags) AND $term->multiple == 0 AND $term->module == 'taxonomy') {
         $form['none'] = array(
@@ -314,6 +333,7 @@ function taxonomy_super_select_submit(&$
         'types' => $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['types']['#value'],
        'parents' => $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['parents']['#value'],
         'image' => $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['image']['#value'],
+        'collapsible' => $form['settings']['tss']['taxonomy_super_select_vid_'. $vid]['collapsible']['#value'],
       );
     variable_set('taxonomy_super_select_vid_'. $vid, $tostore);    
   }
