
| Current Path : /var/www/html1/testsite/web/themes/contrib/bootstrap/js/modules/filter/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //var/www/html1/testsite/web/themes/contrib/bootstrap/js/modules/filter/filter.js |
/**
* @file
* Attaches behavior for the Filter module.
*/
(function ($) {
'use strict';
function updateFilterHelpLink () {
var $link = $(this).parents('.filter-wrapper').find('.filter-help > a');
var originalLink = $link.data('originalLink');
if (!originalLink) {
originalLink = $link.attr('href');
$link.data('originalLink', originalLink);
}
$link.attr('href', originalLink + '/' + $(this).find(':selected').val());
}
$(document).on('change', '.filter-wrapper select.filter-list', updateFilterHelpLink);
/**
* Displays the guidelines of the selected text format automatically.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior for updating filter guidelines.
*/
Drupal.behaviors.filterGuidelines = {
attach: function (context) {
$(context).find('.filter-wrapper select.filter-list').once('filter-list').each(updateFilterHelpLink);
}
};
})(jQuery);