diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-11 22:19:46 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-11 22:19:46 +0000 |
commit | e888f0061cb7ca2f07b38ad4ff09da99faa75580 (patch) | |
tree | b1ffa36ead61e0061e99fdb4c33a8ea823eb4af5 /misc/collapse.js | |
parent | f278da9e50815f279ce4c7bda993f5d21b43efa3 (diff) | |
download | brdo-e888f0061cb7ca2f07b38ad4ff09da99faa75580.tar.gz brdo-e888f0061cb7ca2f07b38ad4ff09da99faa75580.tar.bz2 |
#323112 by dmitrig01, kkaefer, quicksketch, frando and many many more: Now presenting... Vertical Tabs. Fantastic new UI improvement for node forms and hopefully more in the future.
Diffstat (limited to 'misc/collapse.js')
-rw-r--r-- | misc/collapse.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/collapse.js b/misc/collapse.js index 35ebe5287..11426a1de 100644 --- a/misc/collapse.js +++ b/misc/collapse.js @@ -60,6 +60,14 @@ Drupal.behaviors.collapse = { fieldset.removeClass('collapsed'); } + var summary = $('<span class="summary"></span>'); + fieldset. + bind('summaryUpdated', function() { + var text = $.trim(fieldset.getSummary()); + summary.html(text ? ' (' + text + ')' : ''); + }) + .trigger('summaryUpdated'); + // Turn the legend into a clickable link and wrap the contents of the fieldset // in a div for easier animation var text = this.innerHTML; @@ -72,6 +80,7 @@ Drupal.behaviors.collapse = { } return false; })) + .append(summary) .after($('<div class="fieldset-wrapper"></div>') .append(fieldset.children(':not(legend):not(.action)'))) .addClass('collapse-processed'); |