PageSourceSearch

https://give.sscmusic.org/_includes/app.ui.js?v=2026-09-22T11:37:44

js sscmusic.org collected 2026-09-26 02:24:49 UTC 3,733 bytes, 105 lines download raw bytes

1//IMPORTANT
2//Read Before Editing
3//*******************
4/*
5This file is not theme based and is designed to power core UI functionality that is shared for all web applications.
6No Framework dependencies (e.g. JQuery) should be referenced in this file to ensure the application works without third-party UI dependencies.
7This file is ALWAYS included and contains APP-SPECIFIC ui code only - i.e. code ot make the application work
8
9NOTE: the difference between this and [app name].ui.js is that this is a library contains functionality that is shared for all web apps
10NOTE: this difference between this and app.lib.js is that this contains runtime UI bindings versus reusable functions
11
12GENERAL CONCEPT:
13    - We define classes to represent a form and its sections
14    - We expose a public interface as properties, methods and events
15    - We rely on data from the WebFormContext json published by the backend .NET Framework
16
17*/
18//*******************
19
20'use strict'; 
21
22document.addEventListener('DOMContentLoaded', function () {
23
24	console.log('app.ui.js loaded');
25
26	//app system mobile nav handling
27	//moved from theme to support non-jquery sites (4.18.2023)
28
29	console.log('app.ui.js UI initialize mobile app navigation');
30
31	let appSystemMenuContainerElem = document.getElementById('systemNav');
32	let mobileMenuShowElem = document.getElementById('mobileMenuToggle');
33
34	if (appSystemMenuContainerElem != null && mobileMenuShowElem != null) {
35		
36		if (appSystemMenuContainerElem.querySelector('ul') != null) { 
37			appSystemMenuContainerElem.querySelector('ul').style.display = 'block'; //required to initialize toggle with different app raw markup (4.18.2023)
38			appSystemMenuContainerElem.querySelector('ul').vanish();
39		}
40
41		mobileMenuShowElem.addEventListener('click',
42			function () {
43
44				let systemNavLinksContainerElem = document.getElementById('systemNav').querySelector('ul');
45				if (systemNavLinksContainerElem != null) 
46					systemNavLinksContainerElem.toggleVisible();				
47
48			});
49
50	}
51	 
52	let mainNavBarContainerElem = document.getElementById('ceNavbar');
53
54	if (mainNavBarContainerElem != null) {
55
56		let mainNavBarToggleButton = mainNavBarContainerElem.querySelector('button.navbar-toggler');
57
58		let customMobileNav = document.getElementById('customNavMobile');
59		let customMobileNavUnderlay = document.getElementById('customNavMobileUnderlay');
60
61		if (customMobileNav != null && customMobileNavUnderlay != null) {
62
63			document.getElementById('customNavMobile').vanish();
64			document.getElementById('customNavMobileUnderlay').vanish();
65
66			if (mainNavBarToggleButton != null) {
67
68				mainNavBarToggleButton.addEventListener('click', function () {
69					document.getElementById('customNavMobile').show();
70					document.getElementById('customNavMobileUnderlay').show();
71				});
72
73			}
74
75			customMobileNavUnderlay.addEventListener('click', function () {
76				document.getElementById('customNavMobile').vanish();
77				document.getElementById('customNavMobileUnderlay').vanish();
78			});
79
80		}
81
82	}
83
84	//copied from default template
85	let siteCategoryListing = document.getElementById('customNav');
86    let mobileNavToggle = document.getElementById('navbarToggerContainer');
87    if (siteCategoryListing != null) {
88
89		//if there are no categories, hide the mobile nav since it will have no links
90		mobileNavToggle.vanish();
91
92        if (siteCategoryListing.querySelector('ul') != null) 
93            mobileNavToggle.show();
94                
95	}
96
97	initializePublicAppFormExpirationDateTextBoxes();
98
99	initializePublicAppFormDynamicLabels();
100
101	initializePublicAppFormFieldDependentButtons();
102
103	initializePublicAppFormValidatedFields();
104
105});

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.