| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 // $Id: taxonomy.js,v 1.1.2.1 2009/12/09 01:08:39 davereid Exp $ 2 3 Drupal.verticalTabs = Drupal.verticalTabs || {}; 4 5 Drupal.verticalTabs.taxonomy = function() { 6 var terms = {}; 7 var termCount = 0; 8 $('fieldset.vertical-tabs-taxonomy').find('select, input.form-text').each(function() { 9 if (this.value) { 10 var vocabulary = $(this).siblings('label').html(); 11 terms[vocabulary] = terms[vocabulary] || []; 12 if ($(this).is('input.form-text')) { 13 terms[vocabulary].push(this.value); 14 termCount++; 15 } 16 else if ($(this).is('select')) { 17 $(this).find('option[selected]').each(function() { 18 terms[vocabulary].push($(this).text()); 19 termCount++; 20 }); 21 } 22 } 23 }); 24 25 if (termCount) { 26 var output = ''; 27 $.each(terms, function(vocab, vocab_terms) { 28 if (output) { 29 output += '<br />'; 30 } 31 output += vocab; 32 output += vocab_terms.join(', '); 33 }); 34 return output; 35 } 36 else { 37 return Drupal.t('No terms'); 38 } 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |