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 /modules/node/node.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 'modules/node/node.js')
-rw-r--r-- | modules/node/node.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/node/node.js b/modules/node/node.js new file mode 100644 index 000000000..59647b34e --- /dev/null +++ b/modules/node/node.js @@ -0,0 +1,35 @@ +// $Id$ + +(function($) { + +Drupal.behaviors.nodeFieldsetSummaries = { + attach: function(context) { + $('fieldset#edit-revision-information', context).setSummary(function(context) { + return $('#edit-revision', context).is(':checked') ? + Drupal.t('New revision') : + Drupal.t('No revision'); + }); + + $('fieldset#edit-author', context).setSummary(function(context) { + var name = $('#edit-name').val(), date = $('#edit-date').val(); + return date ? + Drupal.t('By @name on @date', { '@name': name, '@date': date }) : + Drupal.t('By @name', { '@name': name }); + }); + + $('fieldset#edit-options', context).setSummary(function(context) { + var vals = []; + + $('input:checked', context).parent().each(function() { + vals.push(Drupal.checkPlain($.trim($(this).text()))); + }); + + if (!$('#edit-status', context).is(':checked')) { + vals.unshift(Drupal.t('Not published')); + } + return vals.join(', '); + }); + } +}; + +})(jQuery); |