
| Current Path : /var/www/html1/testsite/web/modules/contrib/simple_sitemap/js/ |
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/modules/contrib/simple_sitemap/js/simple_sitemap.sitemapEntities.js |
/**
* @file
* Attaches simple_sitemap behaviors to the sitemap entities form.
*/
(function($) {
"use strict";
Drupal.behaviors.simple_sitemapSitemapEntities = {
attach: function(context, settings) {
$.each(settings.simple_sitemap.all_entities, function(index, entityId) {
var target = '#edit-' + entityId + '-enabled';
triggerVisibility(target, entityId);
$(target).change(function() {
triggerVisibility(target, entityId);
});
});
function triggerVisibility(target, entityId) {
if ($(target).is(':checked')) {
$('#warning-' + entityId).hide();
$('#indexed-bundles-' + entityId).show();
}
else {
$('#warning-' + entityId).show();
$('#indexed-bundles-' + entityId).hide();
}
}
}
};
})(jQuery);