2007-09-12 18:29:32 +00:00
|
|
|
// $Id$
|
2009-02-18 13:46:55 +00:00
|
|
|
(function($) {
|
2007-09-12 18:29:32 +00:00
|
|
|
|
2008-10-29 10:01:28 +00:00
|
|
|
Drupal.behaviors.multiselectSelector = {
|
2009-03-13 23:15:09 +00:00
|
|
|
attach: function(context, settings) {
|
2008-10-29 10:01:28 +00:00
|
|
|
// Automatically selects the right radio button in a multiselect control.
|
|
|
|
$('.multiselect select:not(.multiselectSelector-processed)', context)
|
|
|
|
.addClass('multiselectSelector-processed').change(function() {
|
|
|
|
$('.multiselect input:radio[value="'+ this.id.substr(5) +'"]')
|
|
|
|
.attr('checked', true);
|
|
|
|
});
|
|
|
|
}
|
2007-09-12 18:29:32 +00:00
|
|
|
};
|
2009-02-18 13:46:55 +00:00
|
|
|
|
2009-03-08 01:43:57 +00:00
|
|
|
|
|
|
|
/**
|
2009-03-30 03:15:41 +00:00
|
|
|
* Automatically display the guidelines of the selected text format.
|
2009-03-08 01:43:57 +00:00
|
|
|
*/
|
|
|
|
Drupal.behaviors.filterGuidelines = {
|
|
|
|
attach: function(context) {
|
2009-03-30 03:15:41 +00:00
|
|
|
$('.filter-guidelines:not(.filter-guidelines-processed)', context)
|
|
|
|
.addClass('filter-guidelines-processed')
|
2009-03-08 01:43:57 +00:00
|
|
|
.find('label').hide()
|
|
|
|
.parents('.filter-wrapper').find('select.filter-list')
|
2009-03-30 03:15:41 +00:00
|
|
|
.bind('change', function () {
|
2009-03-08 01:43:57 +00:00
|
|
|
$(this).parents('.filter-wrapper')
|
2009-03-30 03:15:41 +00:00
|
|
|
.find('.filter-guidelines-item').hide()
|
|
|
|
.siblings('#filter-guidelines-' + this.value).show();
|
2009-03-08 01:43:57 +00:00
|
|
|
})
|
|
|
|
.change();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-02-18 13:46:55 +00:00
|
|
|
})(jQuery);
|