diff -u suggestedterms/suggestedterms.js suggestedterms.new/suggestedterms.js --- suggestedterms/suggestedterms.js 2007-07-07 21:49:42.000000000 -0400 +++ suggestedterms.new/suggestedterms.js 2007-09-17 04:11:59.000000000 -0400 @@ -10,7 +10,7 @@ .addClass($(this).attr('class')) .bind('click', function(event) { event.preventDefault(); - var input = $(this).parent().siblings('input'); + var input = $(this).parent().parent().find('input:first'); var text = $(this).text(); if (((', ' + input.val() + ',').indexOf(', ' + text + ',') < 0) && ((', ' + input.val() + ',').indexOf(', "' + text + '",') < 0)) { if ((input.val()).length > 0) { Only in suggestedterms.new: suggestedterms.js~ diff -u suggestedterms/suggestedterms.module suggestedterms.new/suggestedterms.module --- suggestedterms/suggestedterms.module 2007-06-29 21:04:49.000000000 -0400 +++ suggestedterms.new/suggestedterms.module 2007-09-17 04:07:10.000000000 -0400 @@ -78,28 +78,33 @@ * Implementation of hook_form_alter(). */ function suggestedterms_form_alter($form_id, &$form) { - if ((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && isset($form['taxonomy']['tags'])) { + + if (((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && isset($form['taxonomy']['tags'])) || isset($form['tags']) ) { $path = drupal_get_path('module', 'suggestedterms'); drupal_add_js($path . '/suggestedterms.js'); - // if multiple vocabularies, loop over each - foreach ($form['taxonomy']['tags'] as $vid => $thisindex) { - // if free-tagging taxonomy is true, add new links for each free-tag textfield - $sort_order = variable_get('suggestedterms_sort_order', SUGGESTEDTERMS_SORT_NAME); - switch ($sort_order) { - case SUGGESTEDTERMS_SORT_POPULAR: - $tag_description = 'Most popular terms'; - break; - - case SUGGESTEDTERMS_SORT_RECENT: - $tag_description = 'Recently added'; - break; - - default: - $tag_description = 'Terms by name'; - break; + // if free-tagging taxonomy is true, add new links for each free-tag textfield + $sort_order = variable_get('suggestedterms_sort_order', SUGGESTEDTERMS_SORT_NAME); + switch ($sort_order) { + case SUGGESTEDTERMS_SORT_POPULAR: + $tag_description = 'Most popular terms'; + break; + + case SUGGESTEDTERMS_SORT_RECENT: + $tag_description = 'Recently added'; + break; + + default: + $tag_description = 'Terms by name'; + break; + } + if (isset($form['tags'])) { + $form['tags']['#description'] = t($tag_description) . ': ' . _suggestedterms_build_suggestions($form['#parameters'][1]['vid'], $sort_order); + } else { + // if multiple vocabularies, loop over each + foreach ($form['taxonomy']['tags'] as $vid => $thisindex) { + // build the suggested terms and set in description tag + $form['taxonomy']['tags'][$vid]['#description'] = t($tag_description) . ': ' . _suggestedterms_build_suggestions($vid, $sort_order); } - // build the suggested terms and set in description tag - $form['taxonomy']['tags'][$vid]['#description'] = t($tag_description) . ': ' . _suggestedterms_build_suggestions($vid, $sort_order); } } } Only in suggestedterms.new: support-tagadelic-tab.patch