-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (61 loc) · 2.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>Puget Sound Bulletin Content Generator</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<meta name="theme-color" content="#fafafa">
</head>
<body>
<div id="system" style="display:none;">CSPRD CSPRD CSPRD CSPRD CSPRD</div>
<div id="departments-container">
<!-- Add your site or application content here -->
<p>Puget Sound Bulletin Content Generator</p>
<label for="term-select">Choose an academic year</label>
<select name="term" id="term-select">
<option value="2020">2020</option>
<option value="2020">2020</option>
<option value="2020" selected>2020</option>
<option value="2020">2020</option>
</select>
<ul id="departments"></ul>
<br><br>
<label for="system-select">Choose a system</label>
<select name="system" id="system-select">
<option value="csprd" selected>PRD</option>
<option value="cstst">TST</option>
<option value="cststp">TSTp</option>
<option value="csdev">DEV</option>
<option value="csdevp">DEVp</option>
</select>
<script id="departments-template" type="text/x-handlebars-template">
{{#each acad_orgs}}
<li><a href="display.html?department={{#urlencode}}{{{acad_org}}}{{/urlencode}}&year=2022&system={{../system_href}}">{{acad_org_descr}}</a></li>
{{/each}}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.7/handlebars.min.js"></script>
<script src="js/config.js"></script>
<script src="js/departments.js"></script>
<script>
var redirectURL = window.location.pathname;
if(window.location.origin !== 'null') {
redirectURL = window.location.origin + redirectURL;
}
var selectElement = document.querySelector('#term-select');
selectElement.addEventListener('change', (event) => {
redirectURL = redirectURL + "?system=" + systemElement.value + "&year=" + event.target.value;
window.location = redirectURL;
});
var systemElement = document.querySelector('#system-select');
systemElement.addEventListener('change', (event) => {
redirectURL = redirectURL + "?system=" + event.target.value + "&year=" + selectElement.value;
window.location = redirectURL;
});
</script>
</div>
</body>
</html>