From 726d3af2788d4b7dc2d7eb2325ce902266c7da82 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 7 Mar 2010 23:59:20 +0000 Subject: #414424 follow-up: Forgot to add filter.js --- modules/filter/filter.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/filter/filter.js (limited to 'modules') diff --git a/modules/filter/filter.js b/modules/filter/filter.js new file mode 100644 index 000000000..13b0277c2 --- /dev/null +++ b/modules/filter/filter.js @@ -0,0 +1,21 @@ +// $Id$ +(function ($) { + +/** + * Automatically display the guidelines of the selected text format. + */ +Drupal.behaviors.filterGuidelines = { + attach: function (context) { + $('.filter-guidelines', context).once('filter-guidelines') + .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); -- cgit v1.2.3