PageSourceSearch

https://longviewnc.gov/_assets_/js/scripts.js

js longviewnc.gov collected 2026-10-04 13:26:47 UTC 21,959 bytes, 746 lines download raw bytes

1/*-----------------------------------------------------------------------------------
2
3	Theme Name: Town of Long View
4	Front-end developer: Suman Shrestha
5	Author Design: Jessie Eskildsen
6	Author URI: https://www.revize.com/
7	Date: 05/28/2025
8
9-----------------------------------------------------------------------------------*/
10
11function RZRenderMini(elementList) {
12
13	$('.mini-calendar').css('display', 'block');
14
15	function hasEventClick() {
16		$('.fc-day-top.day-has-event a').on('click', function(){
17			$('.fc-left .fc-button-group+.fc-button-group').css('opacity', '1');
18			$('.fc-left .fc-button-group+.fc-button-group button').css('cursor', 'pointer');
19			$('.fc-left .fc-button-group+.fc-button-group button').css('pointer-events', 'all');
20			$('.fc-left .fc-prev-button').css('opacity', '0').css('pointer-events', 'none');
21			$('.fc-left .fc-next-button').css('opacity', '0').css('pointer-events', 'none');
22		})
23	}
24
25	function eachEvent(){
26		$('a.fc-day-grid-event').each(function(){
27			var eventIndex = $(this).parent('.fc-event-container').index();
28			$(this).parent().parent(':first-child').parent().siblings().find('td').eq(eventIndex).addClass('day-has-event');
29		});
30
31		hasEventClick()
32	}
33
34	eachEvent();
35	hasEventClick()
36
37	$('.fc-left .fc-button-group > .fc-dayGridMonth-button')
38	.add('.fc-left .fc-button-group > .fc-prev-button')
39	.add('.fc-left .fc-button-group > .fc-next-button')
40	.add('.fc-left .fc-button-group > .fc-today-button')
41	.on('click', function(){
42		eachEvent();
43	});
44
45	$('.fc-left .fc-button-group+.fc-button-group .fc-dayGridMonth-button').on('click', function(){
46		$('.fc-left .fc-button-group+.fc-button-group').css('opacity', '0');
47		$('.fc-left .fc-button-group+.fc-button-group button').css('pointer-events', 'none');
48		$('.fc-left .fc-prev-button').css('opacity', '1').css('pointer-events', 'all');
49		$('.fc-left .fc-next-button').css('opacity', '1').css('pointer-events', 'all');
50		hasEventClick();
51	})
52
53	$('.fc-left .fc-button-group+.fc-button-group .fc-today-button').on('click', function(){
54		$('.fc-left .fc-button-group+.fc-button-group').css('opacity', '1');
55	})
56}
57
58(function($) {
59
60	'use strict';
61
62	var $window = $(window),
63	$body = $('body'),
64	$html = $('html'),
65	$rzBarWrap = $('#rz-bar-wrap'),
66	$rzBtnsContainer = $('.rz-btns-container');
67
68	// RZ Class + remove revize bar
69	if(typeof RZ !== "undefined"){
70		if(RZ.login){
71			$body.addClass("user-logged-in");
72		} else{
73			$body.addClass("user-not-logged-in");
74		}
75	}
76	
77	// needed for revize bar
78	$('[data-toggle="tooltip"]').tooltip({trigger:"hover"})
79	
80	//make menu Mega
81	$("#nav>li>ul").filter(function () {
82		return $(this).find('li').length >= 8
83	}).addClass("make-mage").parent().addClass("static");
84
85	$(window).on("scroll", function() {
86		if($(window).scrollTop() > 0) {
87			$(".sticky-header").addClass("sticky-top");
88		} else {
89			//remove the background property so it comes transparent again (defined in your css)
90		   $(".sticky-header").removeClass("sticky-top");
91		}
92	});
93	
94	// Clone icons to each navigation link/span
95	$('#navicons li').each(function(){
96		var navIconIndex = $(this).index();
97		$(this).find('img').prependTo($('#nav>li').eq(navIconIndex).children('a,span'));
98	});
99
100	// Keyboard Navigation: Nav, flyout
101	var isClick = false;
102	$("#nav li a, #flyout  li a, a, button, .toggle, .toggle2").on('focusin', function(e) {
103		if( isClick === false ) {
104			$(".focused").removeClass("focused");
105			$(e.currentTarget).parents("#nav li, #flyout li").addClass("focused");
106			$(".opened:not(.focused) ul:visible,.opened2:not(.focused) ul:visible").slideUp().parent().removeClass("opened opened2");
107		} else {
108			$(".focused").removeClass("focused");
109			isClick = false;
110		}
111	});
112
113	// for revize buttons container
114	$rzBtnsContainer.each(function(){
115		var $container = $(this);
116		if($container.html().trim()!=""){
117			$container.closest(".has-edit-buttons").addClass('yes-has-edit-buttons');
118		}
119	});
120	$(".has-edit-buttons").not(".yes-has-edit-buttons").removeClass("has-edit-buttons");
121
122	// responsive views from revize bar 
123	var urlParams = new URLSearchParams(window.location.search); //get all parameters
124	var hidebar = urlParams.get('hidebar'); //extract the hidebar parameter - this will return NULL if hidebar isn't a parameter
125	
126	if(hidebar) { //check if hidebar parameter is set to anything
127		$body.removeClass("user-logged-in").addClass("hide-edit-btns");
128	}
129		
130	// prevent focused class changes on click - This way arrows wont pop when clicking nav links
131	$("#nav a,#flyout a").on('mousedown',function(){
132		isClick = true;
133	});
134
135	// Search Toggle
136	$('#search-toggle').on('click',function(e){
137		$('#search').stop().slideToggle(200);
138		$(this).toggleClass('fa-search fa-close');
139	});
140
141	// Navigation Toggle
142	$("#nav-toggle").on("click", function(){
143		$("#nav").stop().slideToggle();
144		$(this).toggleClass("fa-bars fa-close");
145	});
146
147	// Navigation Toggle
148	$("#info-toggle").on("click", function(){
149		$(".headerTop").stop().slideToggle();
150		$(this).toggleClass("fa-info fa-close");
151	});
152
153	// Menu Arrows and Toggles
154	$("#nav >li>ul,#flyout >li>ul").addClass('first-level');
155	$("#nav  li ul ul").addClass('second-level');
156	$("#nav>li:has(ul)").each(function(){
157		$('<a href="#" class="fa fa-angle-down toggle" tabindex="0" aria-haspopup="true" aria-expanded="false" id="dropdown-toggle-'+$(this).index()+'" aria-label="Show Dropdown for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
158		$(this).find('ul:first').attr('aria-labelledby', 'dropdown-toggle-'+$(this).index());
159	});
160	$('#nav li ul>li:has(ul)').each(function(index) {
161		$('<a href="#" class="fa fa-angle-down toggle2" tabindex="0" aria-haspopup="true" aria-expanded="false" id="sub-dropdown-toggle-'+index+'" aria-label="Show Dropdown for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
162		$(this).find('ul:first').attr('aria-labelledby', 'sub-dropdown-toggle-'+index);
163	});
164	$('#flyout >li:has(ul)').each(function() {
165		$('<a href="#" class="fa fa-angle-down toggle" tabindex="0" aria-haspopup="true" aria-expanded="false" id="flyout-dropdown-toggle-'+$(this).index()+'" aria-label="Show Flyout for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
166		$(this).find('ul:first').attr('aria-labelledby', 'flyout-dropdown-toggle-'+$(this).index());
167	});
168
169	function addNavClass() {
170		if ($window.width() < 992) {
171			// Insert needed for mobile
172		} else{
173			// Insert needed for desktop
174			$('#nav ul, #flyout ul').css('display', '');
175		}
176	}
177	addNavClass();
178	$window.resize(addNavClass);
179
180	$(".toggle").on("click keydown",function(e) {
181		if (e.keyCode === 13 || e.type === 'click') {
182			e.preventDefault();
183			var $parent = $(this).parent();
184			var $parentLi = $parent.parent();
185			$parent.toggleClass('opened');
186			if($parent.addClass('active') && $(this).next('.first-level').is(":visible")){
187				$(this).next('.first-level').slideUp();
188				$parent.removeClass('active');
189				$(this).attr({'aria-expanded': 'false'});
190			} else {
191				$(this).attr({'aria-expanded': 'true'});
192				$(".first-level").slideUp("slow");
193				$parent.addClass('active');
194				$(this).next('.first-level').slideToggle();
195			}
196		}
197	});
198	$(".toggle2").on("click keydown",function(e) {
199		if (e.keyCode === 13 || e.type === 'click') {
200			e.preventDefault();
201			var $parent = $(this).parent();
202			var $parentLi = $parent.parent();
203			$parent.toggleClass('opened2');
204			if($parent.addClass('active') && $(this).next('.second-level').is(":visible")){
205				$(this).next('.second-level').slideUp();
206				$parent.removeClass('active');
207				$(this).attr({'aria-expanded': 'false'});
208			} else {
209				$(this).attr({'aria-expanded': 'true'});
210				$(".second-level").slideUp("slow");
211				$parent.addClass('active');
212				$(this).next('.second-level').slideToggle();
213			}
214		}
215	});
216
217	// close nav if left
218	$(".desktop *").focus(function(e){
219		var $opened = $(".opened");
220		var $opened2 = $(".opened2");
221		if( $opened.length > 0 || $opened2.length > 0 ) {
222			if( $(".opened :focus").length < 1 ){
223				$opened.children("ul").slideUp();
224				$opened.removeClass("opened");
225				$(".opened2").removeClass("opened2");
226			}
227			if( $(".opened2 :focus").length < 1 ){
228				$opened2.children("ul").slideUp();
229				$opened2.removeClass("opened2");
230			}
231		}
232	});
233
234	// Flyout
235	var flyout = $('#flyout'),
236		flyoutwrap = $('#flyout-wrap');
237
238	if (flyout.text().length){
239		flyoutwrap.prepend('<div id="flyout-toggle" class="hidden-lg hidden-md"><i class="fa fa-bars"></i> Related Pages</div>');
240	}
241
242	$("#flyout-toggle").on("click", function(){
243		flyout.slideToggle();
244		$(this).toggleClass("active");
245	});
246
247
248	// if($(window).width() > 991){
249	// 	$('#freeform #main .sideBar').addClass('fillRight')
250	// }
251
252	// fillside
253	function fillSide(){
254		$('.fillRight').each(function(){
255			var cContainer = parseFloat($(this).closest('.container').css('margin-right')) + 15;
256			console.log('fillright', cContainer)
257			$('.fillRight').css('margin-right',-cContainer);
258			$('.fillRight.withPadding').css('padding-right',cContainer);
259		});
260		$('.fillLeft').each(function(){
261			var cContainer = parseFloat($(this).closest('.container').css('margin-left')) + 15;
262			console.log('fillleft', cContainer)
263			$('.fillLeft').css('margin-left',-cContainer);
264			$('.fillLeft.withPadding').css('padding-left',cContainer);
265		});
266	}
267
268
269	fillSide();
270	$window.resize(fillSide);
271
272	/*
273	* E-Notify Auto submit
274	*/
275	$.urlParam=function(n){var e=new RegExp("[?&]"+n+"=([^]*)").exec(window.location.href);return null==e?null:e[1]||0};
276	var $enotify = $('iframe[src*="/revize/plugins/notify/notify.jsp"]');
277	if( $enotify.length > 0 ){
278		var emailStr = $.urlParam("email");
279		if( emailStr != null ){
280			$enotify.attr("src", $enotify.attr("src") + "&email=" + emailStr);
281		}
282	}
283
284	// Make sure all calendars have unique ids
285	$('iframe[name="calendar"]').each(function (index, calendar) {
286		calendar.id = 'calendar-' + index;
287	});
288
289	// Start Frame Resizer
290	function resizeIframe(height, frameElement) {
291		if ( frameElement ) {
292			frameElement.height = "";
293			frameElement.height = height;
294		}
295	}
296
297	var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
298	var eventHandler = window[eventMethod];
299	var messageEvent = eventMethod === "attachEvent" ? "onmessage" : "message";
300	eventHandler(messageEvent, function (e) {
301		if ( Array.isArray(e.data) ) {
302			if( e.data[0] === "setCalHeight" || e.data[0] === "setNotifyHeight") {
303				var frames = document.querySelectorAll('iframe');
304				for( var i = 0; i < frames.length; i++ ) {
305					if( frames[i].contentWindow === e.source ){
306						resizeIframe(e.data[1], frames[i]);
307					}
308				}
309			}
310		}
311	});
312	// End Frame Resizer
313
314	$window.ready(function(){
315	
316		// Video for slider
317		if(typeof $.fn.YTPlayer !== "undefined" && $('body').attr('id') == 'homepage'){
318		    $("#sliderVideo").YTPlayer();
319	        }
320
321		// hide hero slider control when video will be play
322		var interval = setInterval(hideControl,1000);
323		function hideControl(){
324			var videoId = document.getElementById('wrapper_sliderVideo');
325			if(videoId){
326				if(videoId.style.opacity == '1'){
327				clearInterval(interval);
328				$('#slider .tns-controls button').hide();
329				}else{
330					$('#slider .tns-controls button').show();
331				}
332			}
333		}
334		
335	});
336
337	// Alert Close Caching
338	if ($("div.alert").length) {
339		var hide = window.sessionStorage && parseInt(window.sessionStorage.getItem("alertClosed")) > 1;
340		if (!hide || $(".user-logged-in").length != 0) {
341			$("div.alert").addClass('show');
342		}
343		$("div.alert .close-alert").on('click', function(e) {
344			if (window.sessionStorage) {
345				window.sessionStorage.setItem("alertClosed",parseInt(window.sessionStorage.getItem("alertClosed")||0)+1);
346			}
347		});
348	}
349
350	$(".site-header #nav>li.children").addClass("static");
351	$(".site-header #nav>li>ul.first-level").addClass("make-mage");
352
353	var $translateButton = $('#translate-button');
354	$translateButton.on('keydown click', function(e){
355		if (e.keyCode === 13 || e.type === 'click') {
356			$('#translation-links ul').stop().fadeToggle();
357			$translateButton.attr('aria-expanded', !('true' === $translateButton.attr('aria-expanded')));
358		}
359	});
360	
361	$('#translation-links ul').on('mouseleave',function(){
362		$(this).fadeOut();
363		$translateButton.attr('aria-expanded', false);
364	});
365	
366	function removeCookieString(value, domain) {
367		domain = domain ? 'domain='+domain+'; ' : '';
368		return value+'; expires=Thu, 01 Jan 1970 00:00:01 GMT; '+domain+'path=/';
369	}
370	
371	function unsetGoogtransCookie() {
372		for (var domains = window.location.hostname.split('.'); domains.length >= 2; domains.shift()) {
373			var cookieString = removeCookieString('googtrans=unset', domains.join('.'));
374			document.cookie=cookieString;
375			if  (domains.length === 2) {
376				cookieString = removeCookieString('googtrans=unset', '.'+domains.join('.'));
377				document.cookie=cookieString;
378			}
379		}
380		document.cookie=removeCookieString('googtrans=unset');
381	}
382	
383	if (document.cookie.split(';').some(function(item) { return item.trim().startsWith('googtrans=/auto/en'); })) {
384		unsetGoogtransCookie();
385	}
386	
387	 // Translate Script
388	var translateURL = "//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
389	$.getScript(translateURL);
390	$('#translation-links a').click(function() {
391		var lang = $(this).data('lang');
392		var $frame = $('iframe.skiptranslate');
393		if (!$frame.length) {
394			return false;
395		}
396		var $el = $frame.contents().find('span.text:contains(' + lang + ')').parent().parent().get(0);
397	
398		if (!$el) {
399			$frame.contents().find('span.text:contains("English")').parent().parent().get(0);
400		}
401		$el.click();
402		return false;
403	});
404	
405	var $translateReset = $('#translate-reset');
406	$translateReset.on('keydown click', function(e){
407		
408		if (e.keyCode === 13 || e.type === 'click') {
409			$('iframe.skiptranslate').contents().find('span.text:contains("English")').parent().parent().get(0).click();
410		}
411	});
412
413	//SKIP TO MAIN CONTENT
414	$(document).ready(function(){
415		$('#skip').click(function(){
416		$("html, body").animate({ scrollTop: $('#main').offset().top-100 }, 1000);
417		return false;
418		});
419	}); 
420
421	// Tiny Slider
422	if (typeof tns !== "undefined") {
423		$('.tiny-slider').each(function(i, el) {
424			tns({
425				autoplay: true,
426				autoplayTimeout: 8000,
427				container: el,
428				items: 1,
429				lazyload: true,
430				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
431				mode: "gallery",
432				nav: false,
433				touch:false,
434				preventScrollOnTouch: 'force',
435				autoplayButtonOutput: false,
436				controlsText: ['<i class="fa fa-angle-left" aria-hidden="true"></i>','<i class="fa fa-angle-right" aria-hidden="true"></i>'],
437				loop: true
438			});
439		});
440	
441		$('#qlinks .tiny-carousel').each(function(i, el) {
442			var $el = $(el);
443			var tinyItemCount = $el.children().length;
444			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 6;
445			tns({
446				container: el,
447				items: Math.min(tinyItemCount, tinyItemData),
448				lazyload: true,
449				nav: false,
450				touch:false,
451				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
452				preventScrollOnTouch: 'force',
453				controlsText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
454				loop: false,
455				responsive:{
456					1400:{
457						items: 6
458					},
459					1199:{
460						items: 6
461					},
462					991:{
463						items: 4
464					},
465					767:{
466						items: 3
467					},
468					479:{
469						items: 2
470					},
471					0:{
472						items: 1
473					}
474				}
475			});
476		});
477
478		$('#news .tiny-carousel').each(function(i, el) {
479			var $el = $(el);
480			var tinyItemCount = $el.children().length;
481			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 4;
482			tns({
483				container: el,
484				items: Math.min(tinyItemCount, tinyItemData),
485				lazyload: true,
486				nav: false,
487				touch:false,
488				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
489				preventScrollOnTouch: 'force',
490				controlsText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
491				loop: false,
492				responsive:{
493					1400:{
494						items: 4
495					},
496					1199:{
497						items: 4
498					},
499					991:{
500						items: 3
501					},
502					767:{
503						items: 2
504					},
505					479:{
506						items: 1
507					},
508					0:{
509						items: 1
510					}
511				}
512			});
513		});
514
515		$('.freeSlide .tiny-carousel').each(function(i, el) {
516			var $el = $(el);
517			var tinyItemCount = $el.children().length;
518			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 1;
519			tns({
520				container: el,
521				items: Math.min(tinyItemCount, tinyItemData),
522				lazyload: true,
523				nav: true,
524				touch:false,
525				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
526				preventScrollOnTouch: 'force',
527				controlsText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
528				loop: false,
529				responsive:{
530					1400:{
531						items: 1
532					},
533					1199:{
534						items: 1
535					},
536					991:{
537						items: 1
538					},
539					767:{
540						items: 1
541					},
542					479:{
543						items: 1
544					},
545					0:{
546						items: 1
547					}
548				}
549			});
550		});
551	}
552
553	$('.adaBtn').on('click', function(){
554		$('.uai').click();
555	})
556
557	$(".user-not-logged-in#freeform aside").each(function () {
558		if ($(this).find("h2").is(":empty")) {
559			$(this).hide();
560		}
561	});
562	
563	$(".user-logged-in#freeform aside").each(function () {
564		if ($(this).find("h2").is(":empty")) {
565			$(this).addClass("bg-color");
566		}
567	});
568
569	$(document).ready(function() {
570		var content = $('.user-not-logged-in #resource-wrap .resourceBx').text().trim();
571		if (content === '') {
572			$('.user-not-logged-in #resource-wrap').hide();
573		}
574	});
575
576	$(document).ready(function() {
577		var content = $('.user-not-logged-in #flyout-wrap #flyout').text().trim();
578		if (content === '') {
579			$('.user-not-logged-in #flyout-wrap').hide();
580		}
581	});
582
583	$(document).ready(function() {
584		var content = $('.user-not-logged-in #contact-wrap .cnt-head').text().trim();
585		if (content === '') {
586			$('.user-not-logged-in #contact-wrap').hide();
587		}
588	});
589
590	$(document).ready(function() {
591		var content = $('.user-not-logged-in #hr-wrap .hrBx').text().trim();
592		if (content === '') {
593			$('.user-not-logged-in #hr-wrap').hide();
594		}
595	});
596
597	// Responsive Tables
598	$('.post table:not(.layout-table):not(.not-responsive)').wrap('<div class="table-responsive"></div>');
599	$('.layout-table').attr('role', 'presentation');
600
601	// Preloader
602	$window.on('load', function() {
603
604		setTimeout(function(){
605			$body.addClass('loaded');
606			 $('#loader-wrapper').fadeOut();
607		}, 600);
608
609	});
610
611	$(document).ready(function() {
612		// Check for window width and initialize the scrollbar if max-width is 580px
613		if ($(window).width() >= 580) {
614			$.mCustomScrollbar.defaults.scrollButtons.enable = true; // Enable scrolling buttons by default
615			$.mCustomScrollbar.defaults.axis = "yx"; // Enable 2 axis scrollbars by default
616
617			$("#content-rd").mCustomScrollbar({ theme: "rounded-dark" });
618		}
619	});
620
621	// matchHeight
622	if(typeof $.fn.matchHeight !== "undefined"){
623		$('.equal').matchHeight({
624			//defaults
625			byRow: true,
626			property: 'height', // height or min-height
627			target: null,
628			remove: false
629		});
630		$('#qlinks .title').matchHeight({byRow: false});
631	}	
632
633	$window.ready(function(){
634
635		//#Smooth Scrolling
636		$('a[href*="#"]').not('[href="#"]').not('[href*="#collapse"]').not('a.faq-header').click(function(event) {
637			if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) {
638				var target = $(this.hash);
639				target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
640				if (target.length) {
641					event.preventDefault();
642					$('html,body').animate({
643						scrollTop: target.offset().top
644					}, 1000, function() {
645						var $target = $(target);
646						$target.focus();
647						if ($target.is(":focus")) {
648							return false;
649						} else {
650							$target.attr('tabindex','-1');
651							$target.focus();
652							$target.removeAttr('tabindex');
653						};
654					});
655				}
656			}
657		});	
658	}); // Ready
659
660
661	// ADA
662	var labels = {
663		'goog-gt-votingInputSrcLang': 'Source Language:',
664		'goog-gt-votingInputTrgLang': 'Target Language:',
665		'goog-gt-votingInputSrcText': 'Source Text:',
666		'goog-gt-votingInputTrgText': 'Translated Text:',
667		'goog-gt-votingInputVote': 'Vote:'
668	};
669
670	function addLabels() {
671		$.each(labels, function(id, text) {
672			var input = $('#' + id);
673			if (input.length && !input.prev('label').length) {
674				var label = $('<label>').attr('for', id).text(text);
675				input.before(label);
676			}
677		});
678	}
679
680	var observer = new MutationObserver(function(mutations) {
681		mutations.forEach(function(mutation) {
682			if (mutation.addedNodes.length) {
683				addLabels();
684			}
685		});
686	});
687
688	var config = { childList: true, subtree: true };
689
690	observer.observe(document.body, config);
691
692	addLabels();
693
694	// ADA rz-bar ( for empty alt )
695	$('#rz-bar-wrap a img').each(function() {
696		var src = $(this).attr('src');
697		var fileName = src.split('/').pop().split('.')[0];
698		var altText = fileName.replace(/[_-]/g, ' ') + ' icon';
699		$(this).attr('alt', altText);
700	});
701
702})(jQuery);
703
704function RZRenderMini(elementList) {
705
706	// ADA
707	function ensureNonEmptyHeadings() {
708		var title = $('#modal-event-title');
709		var subtitle = $('#modal-event-subtitle');
710		
711		if (!title.text().trim()) {
712			title.text('Default Event Title');
713		}
714		if (!subtitle.text().trim()) {
715			subtitle.text('Default Event Subtitle');
716		}
717	}
718
719	function observeModalContent() {
720		var targetNode = document.getElementById('event-modal-body');
721		if (targetNode) {
722			var config = { childList: true, subtree: true, characterData: true };
723
724			var callback = function(mutationsList, observer) {
725				for (var mutation of mutationsList) {
726					if (mutation.type === 'childList' || mutation.type === 'characterData') {
727						ensureNonEmptyHeadings();
728					}
729				}
730			};
731
732			var observer = new MutationObserver(callback);
733			observer.observe(targetNode, config);
734		}
735	}
736
737	$('#event-modal').on('show.bs.modal', function() {
738		ensureNonEmptyHeadings();
739		observeModalContent();
740	});
741
742	ensureNonEmptyHeadings();
743
744}
745
746

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.