PageSourceSearch

https://www.fpoe-noe.at/typo3conf/ext/theme_fpoe/Resources/Public/JS/main.js?1648621820

js fpoe-noe.at collected 2026-10-02 19:49:57 UTC 5,039 bytes, 204 lines download raw bytes

1$=jQuery.noConflict();
2$(function() {
3
4
5  // Fancybox
6  $("[data-fancybox]").fancybox({
7    loop: true,
8    keyboard: true,
9    toolbar: true,
10    buttons: [
11      "zoom",
12      "thumbs",
13      "close"
14    ],
15    arrows: true,
16    clickContent: false,
17  });
18
19	// toggle 'navbar-open' class to body (disables scrolling in document while navbar is open)
20	$('#mainmenu').on('shown.bs.collapse', function(e) {
21		$('#mainmenu .active').addClass('open');
22		$('body').addClass('navbar-open');
23	}).on('hidden.bs.collapse', function (e) {
24		$('body').removeClass('navbar-open');
25	});
26
27	/**
28	 * Main Menu dropdown control
29	 */
30	$('#mainmenu .dropdown button').on('click', function(e) {
31		// Avoid following the href location when clicking
32		e.preventDefault();
33		// Avoid having the menu to close when clicking
34		e.stopPropagation();
35		// Re-add .open to parent sub-menu item
36		if ($(this).parent().hasClass('open')) {
37			$(this).parent().removeClass('open');
38		} else {
39			$(this).parent().siblings().removeClass('open');
40			$(this).parent().addClass('open');
41		}
42	});
43
44	// initialize any singlePageNav
45	$('.single-page-nav').singlePageNav({
46		offset: 60
47	});
48
49	// collapse nav on mobile if singlePageNav
50	$('.single-page-nav a').on('click', function() {
51		if ($(window).width() < 1024) {
52			$('#mainmenu').collapse('hide');
53		}
54	});
55
56	$('#searchbox .search-toggle').on('click', function() {
57		$('#searchbox').toggleClass('active');
58		$('#searchbox .search-input > input').focus();
59	});
60
61	$('#searchbox .search-input > input').on('blur', function() {
62		$('#searchbox').removeClass('active');
63	});
64
65	/**
66	 * On a button submit click, check if the form is valid. If so disable the submit button and
67	 * change the text of the submit button.
68	 */
69
70	// $('form').on('submit', function(e) {
71	// 	var $btn = $(this).find(':submit');
72
73	// 	if (hasFormValidation() && $(this).attr("name") !== "SubscribeUnsubscribeForm") {
74	// 		if ($(this)[0].checkValidity()) {
75
76	// 			($btn.prop("tagName") == 'INPUT') ? $btn.val('Bitte warten...') : $btn.html('Bitte warten...');
77
78	// 			$btn.css('pointer-events', 'none'); // $(this).prop('disabled', 'disabled') does not work due to webkit bug: https://bugs.webkit.org/show_bug.cgi?id=14443
79
80	// 		}
81	// 	}
82	// });
83
84  $('[data-toggle="tooltip"]').tooltip();
85
86	$('.lightbox').lightcase({
87		attr: 'rel',
88		maxWidth: 1024,
89		maxHeight: 768,
90		transition: 'elastic',
91		swipe: true,
92		onFinish: {
93			initFlexslider: function() {
94				var $flexslider = lightcase.get('case').find('.flexslider');
95				if ($flexslider.length > 0) {
96					$flexslider.flexslider({
97						controlNav: 0,
98						directionNav: 0
99					});
100					$flexslider.find('.direction-nav .prev').on('click', function() {
101						$flexslider.flexslider('prev');
102					});
103					$flexslider.find('.direction-nav .next').on('click', function() {
104						$flexslider.flexslider('next');
105					});
106				}
107			},
108			setupNewsletterCE: function(e) {
109				setupNewsletterCE();
110				$(lightcase.get('case')).find('.btn-later').addClass('hidden');
111			}
112		}
113	});
114
115	$('.ytplayer').each(function() {
116		if ($(this).width() < 640) {
117			$(this).addClass('small');
118		}
119	});
120
121	$('.nano').nanoScroller({ iOSNativeScrolling: true });
122
123	$('.date-picker').datepicker({
124		language: 'de'
125	});
126
127	$(window).on('scroll', function() {
128		if ($(document).scrollTop() > 46) {
129			$('body').addClass('shrink');
130		} else {
131			$('body').removeClass('shrink');
132		}
133	});
134
135
136	if(window.location.href.indexOf("#article") != -1){
137		var $link = $('a[href="/'+ $article +'"]');
138		$link[0].click();
139	}
140	//show preview image of filelist in filebrowswer extension
141	//$('li.file').mouseenter(function() {
142	//	$( event.target ).children(".thumb").removeClass("hidden");
143	//}).mouseleave(function() {
144	//	$('.tx-filebrowser').find(".thumb").addClass("hidden");
145	//});
146
147	setupNewsletterCE();
148
149});
150
151/**
152 * Checks if the website
153 */
154function hasFormValidation() {
155	return (typeof document.createElement("input").checkValidity == "function");
156}
157
158/**
159 * Returns difference between two dates in seconds
160 */
161function deltaSeconds(date1, date2) {
162	if (!date1 || !date2) return null;
163	return (date2.getTime() - date1.getTime()) / 1000;
164}
165
166/**
167 * Newsletter Partial Cookie Functions
168 */
169
170/**
171 * newsletter partials
172 */
173function setupNewsletterCE() {
174	$("#btn_nlreg").click(function () {
175	setCookie('newsletter', 'shown', 99)
176	parent.jQuery.fancybox.close();
177	});
178
179
180	$(".datenschutz_checkbox").click(function (e) {
181	if ($(e.target).is(':checked')) {
182		$(".btn_nlreg").prop('disabled', false);
183	}
184	else {
185		$(".btn_nlreg").prop('disabled', true);
186	}
187	});
188	setTimeout(function () { /*document.getElementById("btn_nlreg").disabled = true;*/ }, 1000);
189}
190
191function setCookie(name, value, days) {
192	var expires = "";
193	if (days) {
194		var date = new Date();
195		date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
196		expires = "; expires=" + date.toUTCString();
197	}
198	document.cookie = name + "=" + (value || "") + expires + "; path=/";
199}
200
201function closeFancybox() {
202	setCookie('newsletter', 'shown', 1)
203	parent.jQuery.fancybox.close();
204}

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.