diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-08 01:43:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-08 01:43:57 +0000 |
commit | ce6a3e17cbee9caccdf53fb73343dc40bd0bc603 (patch) | |
tree | 71086fcf1096b383ecf3b33deff4ba2a1075a745 /misc/form.js | |
parent | fbad7327af412e5c1dc43b1656cb6c9dca275d76 (diff) | |
download | brdo-ce6a3e17cbee9caccdf53fb73343dc40bd0bc603.tar.gz brdo-ce6a3e17cbee9caccdf53fb73343dc40bd0bc603.tar.bz2 |
#304330 by ximo, alpritt, Amitaibu, edmund.kwok, Xano, ff1, BrightLoudNoise, et al: Dramatically improved text format widget. USABILITY AWESOMENESS.
Diffstat (limited to 'misc/form.js')
-rw-r--r-- | misc/form.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/misc/form.js b/misc/form.js index 8631ed68c..fd34cd103 100644 --- a/misc/form.js +++ b/misc/form.js @@ -12,4 +12,23 @@ Drupal.behaviors.multiselectSelector = { } }; + +/** + * Automatically displays the guidelines of the selected text format. + */ +Drupal.behaviors.filterGuidelines = { + attach: function(context) { + $('.filter-guidelines:not(.filterGuidelines-processed)', context) + .addClass('filterGuidelines-processed') + .find('label').hide() + .parents('.filter-wrapper').find('select.filter-list') + .bind('change', function() { + $(this).parents('.filter-wrapper') + .find('.filter-guidelines-item').hide() + .siblings('#filter-guidelines-' + this.value).show(); + }) + .change(); + } +}; + })(jQuery); |