PageSourceSearch

https://www.barleben.de/layout/_basis/layout.js?__ts=1741176500

js barleben.de collected 2026-10-02 11:23:01 UTC 7,830 bytes, 244 lines download raw bytes

1jQuery(document).ready(function($) {
2
3    /*Video im Titelbild*/
4    /*$('.jumbotronvideo').each(function(index,videonode){
5        videonode.controls = true;
6        videonode.addEventListener('timeupdate', function(){
7            videonode.setAttribute("controls","controls");
8        }, false);
9    })*/
10    
11	// Suche
12	$('.suche-btn, .suche-btn-fs').attr({'aria-expanded': 'false', 'aria-label': 'Volltextsuche \u00f6ffnen' });
13	// -> modern
14	$('.suche-btn, .open-modern-search').on('click', function(ev) {
15		$('.suche-btn, .suche-outer').toggleClass('active');
16		$('.suche-outer form input, .suche-outer form button').attr('tabindex', function(index, attr){
17			return attr == -1 ? null : -1;
18		});
19		if ($('.suche-btn').hasClass('active')) {
20			$('.suche-btn').attr({ 'aria-expanded': 'true', 'aria-label': 'Volltextsuche schlie\u00dfen' });
21			setTimeout(function() {
22				$('.suche-outer form input[type=text]').focus();
23			}, 25);
24		} else {
25			$('.suche-btn').attr({ 'aria-expanded': 'false', 'aria-label': 'Volltextsuche \u00f6ffnen' }).focus();
26		}
27	});
28	
29	// -> fullscreen
30	$('.suche-btn-fs, .open-fullscreen-search').on('click', function() {
31		$('.suche-btn-fs').toggleClass('active');
32		$('.suche-fullscreen').toggleClass('flex');
33		$('html').toggleClass('noscroll');
34		
35		if ($('.suche-btn-fs').hasClass('active')) {
36			$('.suche-btn-fs').attr({ 'aria-expanded': 'true', 'aria-label': 'Volltextsuche schlie\u00dfen' });
37			$('.suche-fullscreen form input').focus();
38		} else {
39			$('.suche-btn-fs').attr({ 'aria-expanded': 'false', 'aria-label': 'Volltextsuche \u00f6ffnen' }).focus();
40		}
41	});
42	
43	/*Fake-Suchebutton*/
44	$('.suche-btn-header').on('click', function() {
45	    $('.top-bar').toggleClass('search-active');
46	    $('.suche-btn-fs').addClass('active');
47	    $('.suche-btn-fs').attr({ 'aria-expanded': 'true', 'aria-label': 'Volltextsuche schlie\u00dfen' });
48	    $('.suche-fullscreen').addClass('flex');
49	    $('.suche-fullscreen form input[type=text]').focus();
50		$('html').addClass('noscroll');
51		$('.suche-btn-fs .btn-desc').html('Suche');
52	});
53	
54	$.fn.ikissKeepFocus({
55		elements: [
56			{ 
57				selector: '.suche-fullscreen',
58				isVisible: function() { return $('.suche-fullscreen').hasClass('flex'); },
59				extraElements: function() {
60					return $('.modern-search .header-right .flex-inner .suche-btn-fs');
61				}
62			},
63			{
64				selector: '.modern-nav',
65				isVisible: function() { return $('.modern-nav').hasClass('active'); }
66			},
67			{
68				selector: '.classicnav + #nav-mob',
69				isVisible: function() { return $('.slicknav_btn').hasClass('slicknav_open'); },
70				extraElements: function() {
71					return $('.header-right .flex-inner .slicknav_btn');
72				}
73			}
74		]
75	});
76	
77
78	// Accordion
79	if ($.fn.ikissAccordion) {
80		
81		$('.accordion').ikissAccordion({
82			iconStyle			: 'fa-regular',
83			iconOpen			: 'fa-chevron-down',
84			iconClose			: 'fa-chevron-down flip-x',
85			autoOpenFirst		: false, // bei pauschaler Aktivierung muss auf dem Parameterformular "ix_auto_open_first" auskommentiert werden
86			autoClose			: false, // bei pauschaler Aktivierung muss auf dem Parameterformular "ix_auto_close" auskommentiert werden
87			activeCls			: 'active'
88		});
89		
90		// Alte Toggler auf Accordion umstellen
91		ikissAccordion({
92			titleSelector		: '.toggler-title',
93			containerSelector	: '.toggler-container'
94		});
95		ikissAccordion({
96			titleSelector		: '.toggler-link',
97			containerSelector	: '.toggler-container'
98		});
99		
100	}
101	
102	// BITV: Fokus-Hervorhebung durch Tabulator-Taste mit spezieller CSS-Klasse formatieren
103	$('body').on('focusin focusout', 'button, input, select, textarea, a, *[tabindex]', function(ev) {
104		var me = this;
105
106		if (ev.type == 'focusout') {
107			if ($(me).hasClass('js-link-source')) {
108				$(me).closest('.js-link').removeClass('tab-focus');
109			} else {
110				$(me).removeClass('tab-focus');
111			}
112			$(window).off('keyup.tabkey');
113		} else {
114			$(window).one('keyup.tabkey', function (e) {
115				var keyCode = (e.keyCode ? e.keyCode : e.which);
116				if (keyCode == 9 || keyCode == 13) {
117					if (!$('.tab-focus', me).length) {
118						$(me).closest('.tab-focus').removeClass('tab-focus');
119						if ($(me).hasClass('js-link-source')) {
120							$(me).closest('.js-link').addClass('tab-focus');
121						} else {
122							$(me).addClass('tab-focus');
123						}
124					}
125				}
126			});
127		}
128	});
129
130	// BITV: Im Flexslider bei Fokus-Hervorhebung durch Tabulator-Taste Symbole fuer vor/zurueck anpassen
131	$('body').on('focusin focusout', 'a[class*="next"], a[class*="prev"], button[class*="next"], button[class*="prev"]', function(ev) {
132		var me		= this,
133			fVars	= null;
134		
135		$(me).parents().filter(function() { 
136			return $(this).data('flexslider'); 
137		}).each(function() { 
138			var fVars	= $(this).data('flexslider').vars,
139				mode	= /next/.test(me.className) ? 'next' : 'prev';
140			
141			if (!fVars[mode+'TextOnTab'])
142				return;
143			
144			if (ev.type == 'focusout') {
145				$(me).html(fVars[mode+'Text']);
146				$(window).off('flexslidertabkey');
147			} else {
148				$(window).one('keyup.flexslidertabkey', function (e) {
149					var keyCode = (e.keyCode ? e.keyCode : e.which);
150					if (keyCode == 9 || keyCode == 13) {
151						$(me).html(fVars[mode+'TextOnTab']);
152					}
153				});
154			}
155		});
156	});
157
158	// Suchergebnis/Listengenerator: JavaScript-Link zur Detailansicht
159	$('.js-link').on('click', function(ev) {
160		
161		// bei no-js-link sowie auf echten Links keine Aktion
162		if ($(ev.target).closest('.no-js-link, a').length) return;
163		
164		// ansonsten den Link aus js-link-source aufrufen
165		if ($('.js-link-source', this).length) {
166			$('.js-link-source', this)[0].click();
167			return;
168		}
169	});
170	
171	// Suchergebnis/Listengenerator: Icons dynamisch skalieren
172	window.ikissIconResize = function(node) {
173	    var icons = $('.js-icon-resize', node || document.body).parent();
174	    icons.each(function() {
175			var w = $(this).width(),
176				h = $(this).height(),
177				minSize = (Math.min(w,h)/2);
178			this.style.fontSize = minSize + 'px';
179		});
180	}
181	
182    window.ikissIconResize();
183
184    $(window).on('resize', function(ev) {
185        if (ev.target !== window)
186            return;
187        window.ikissIconResize();
188    });
189
190	// BITV: Fokus beim Klick auf Sprunglinks direkt auf den 1. Navigationspunkt setzen
191	$('#sr-link-subnav').on('click', function(ev) {
192		$('#subnav a').first().focus();
193		ev.preventDefault();
194	});
195	$('#sr-link-quicknav').on('click', function(ev) {
196		$('#quicknav a').first().focus();
197		ev.preventDefault();
198	});
199	
200	// Leere HTML-Elemente loeschen
201	(function() {
202		function isEmpty(node) {
203			var html = $(node).html();  
204			html = html.replace(/(\r\n|\n|\r|\s)/gm, "");
205			return html.length === 0;
206		}
207		function removeNodeIfEmpty(node) {
208			var parentNode = $(node).parents('.js-remove-empty').first();
209			node.remove();
210			if (parentNode.length && isEmpty(parentNode[0]))
211				removeNodeIfEmpty(parentNode[0])
212		}
213		var emptyNodes = [];
214		$('.js-remove-empty').each((idx, node) => {
215			if (isEmpty(node)) 
216				emptyNodes.push(node);		
217		});
218		emptyNodes.forEach((node, idx) => removeNodeIfEmpty(node));
219	})();
220	
221	// BITV: Horizontaler Scrollbalken fuer Tabellen
222	$('table.autoscroll, .main-content table:not(.noscroll)').wrap('<div class="ikiss-autoscroll"></div>');
223	
224	// BITV: Spezielle Klasse für Links mit URL als Textinhalt
225	$('a').each(function() {
226		if (/^http/.test($(this).html())) {
227			$(this).addClass('js-text-is-url');
228		}
229	});
230	
231});
232
233// Variable für Scrollbar-Breite 
234document.documentElement.style.setProperty('--scrollbar-width', (window.innerWidth - document.documentElement.clientWidth) + "px");
235
236// Readspeaker
237window.rsConf = {
238	cb: {
239		ui: {
240			open: function() { $('#readthis').addClass('rs_active'); }, // Klasse ergaenzen, um alle Aufklapper zu oeffnen
241			close: function() { location.reload(); } // Seite aktualisieren, wenn Readspeaker geschlossen wird, da danach das JS nicht mehr funktioniert
242		}
243	}
244};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.