Index: project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.inc,v
retrieving revision 1.147
diff -u -r1.147 project.inc
--- project.inc	25 Nov 2009 16:38:15 -0000	1.147
+++ project.inc	12 Feb 2010 02:22:20 -0000
@@ -79,15 +79,27 @@
       '#required' => TRUE,
     );
     $select_size = max(5, 2*count($top_level));
-    foreach ($options as $tid => $values) {
-      $form['project_taxonomy']["tid_$tid"] = array(
-        '#title' => t('!type categories', array('!type' => $top_level[$tid])),
-        '#type' => 'select',
-        '#multiple' => TRUE,
-        '#options' => $values,
-        '#default_value' => $current_options,
-        '#attributes' => array('size' => min($select_size, count($values))),
-      );
+    foreach (array_keys($top_level) as $tid) {
+      if (isset($options[$tid])) {
+        $values = $options[$tid];
+        $form['project_taxonomy']["tid_$tid"] = array(
+          '#title' => t('!type categories', array('!type' => $top_level[$tid])),
+          '#type' => 'select',
+          '#multiple' => TRUE,
+          '#options' => $values,
+          '#default_value' => $current_options,
+          '#attributes' => array('size' => min($select_size, count($values))),
+        );
+      }
+      else {
+        // provide a div for all top-level terms so that outside elements
+        // (vocabularies) can be shifted into the project taxonomy fieldset
+        // in the same paradigm as the modules sub-terms
+        $form['project_taxonomy']["tid_$tid"] = array(
+          '#type' => 'form_element',
+          '#id' => 'edit-tid-' . $tid,
+        );
+      }
     }
   }
 
Index: project.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.js,v
retrieving revision 1.3
diff -u -r1.3 project.js
--- project.js	12 Jan 2009 20:07:19 -0000	1.3
+++ project.js	12 Feb 2010 02:22:20 -0000
@@ -7,6 +7,7 @@
       if (this.checked) {
         tid = this.value;
       }
+      Drupal.projectMoveElement(this.value);
     })
     .click(function () {
       Drupal.projectSetTaxonomy(this.value);
@@ -14,11 +15,22 @@
   Drupal.projectSetTaxonomy(tid);
 }
 
+Drupal.projectMoveElement = function(tid) {
+  // move all elements with a class linked to this tid into the
+  // project taxonomy fieldset (similar to module sub-terms)
+  $('.related-tid-' + tid).each(function() {
+    if ($(this).parent().siblings().size() == 1) {
+      $(this).parent().parent().remove();
+    }
+    $('#edit-tid-' + tid + '-wrapper').append($(this).parent().remove());
+  }); 
+}
+
 Drupal.projectSetTaxonomy = function (tid) {
   $('div.project-taxonomy-element select').each(function () {
-    // If this is the selector for the currently selected
-    // term, show it (in case it was previously hidden).
-    if (this.id == 'edit-tid-' + tid) {
+    // If this is the selector for the currently selected term or a
+    // related element, show it (in case it was previously hidden).
+    if (this.id == 'edit-tid-' + tid || $(this).hasClass('related-tid-' + tid)) {
       // Hide not the select but its containing div (which also contains
       // the label).
       $(this).parents('div.form-item').show();
