-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustomize-schedule.html
317 lines (287 loc) · 15 KB
/
customize-schedule.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<!-- Bootstrap CSS -->
<link crossorigin="anonymous" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<link href="apple-icon-57x57.png" rel="apple-touch-icon" sizes="57x57">
<link href="apple-icon-60x60.png" rel="apple-touch-icon" sizes="60x60">
<link href="apple-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
<link href="apple-icon-76x76.png" rel="apple-touch-icon" sizes="76x76">
<link href="apple-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
<link href="apple-icon-120x120.png" rel="apple-touch-icon" sizes="120x120">
<link href="apple-icon-144x144.png" rel="apple-touch-icon" sizes="144x144">
<link href="apple-icon-152x152.png" rel="apple-touch-icon" sizes="152x152">
<link href="apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180">
<link href="android-icon-192x192.png" rel="icon" sizes="192x192" type="image/png">
<link href="favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link href="favicon-96x96.png" rel="icon" sizes="96x96" type="image/png">
<link href="favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
<link href="manifest.json" rel="manifest">
<meta content="#ffffff" name="msapplication-TileColor">
<meta content="ms-icon-144x144.png" name="msapplication-TileImage">
<meta content="#ffffff" name="theme-color">
<meta property="og:type" content="website">
<meta property="og:title" content="Harker MS Virtual Bell - Customize Schedule" />
<meta property="og:site_name" content="Harker MS Virtual Bell" />
<meta property="og:description" content="Settings for Harker Virtual Bell: Create a custom schedule!" />
<meta property="og:url" content="https://rotartsi82.github.io/VirtualBell/customize-schedule.html" />
<meta property="og:image" content="https://rotartsi82.github.io/VirtualBell/favicon-96x96.png" />
<title>Harker MS Virtual Bell</title>
</head>
<body>
<div class="alert alert-primary fixed-top ml-5 mr-5 mt-2" role="alert">
<span class="lead">
<button aria-label="Close" class="close" data-dismiss="alert" type="button">
<span aria-hidden="true">×</span>
</button>
Hey! This page is for creating your own schedule and adding your own events to the schedule,
like extracurricular activities. Use the <a href="settings.html">Settings page</a> for adding custom links and names!
</span>
</div>
<div class="modal fade" id="cantSave" tabindex="-1" role="dialog" aria-labelledby="cantSaveLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="cantSaveLabel">Can't Save Schedule!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Please supply a valid time for every event, or delete empty events.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="noMoveup" tabindex="-1" role="dialog" aria-labelledby="noMoveupLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="noMoveupLabel">Can't Move Event!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
You can't move the topmost event up! I've thought of that edge case already >:]
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="noMovedown" tabindex="-1" role="dialog" aria-labelledby="noMovedownLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="noMovedownLabel">Can't Move Event!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
You can't move the bottommost event down! I've thought of that edge case already >:]
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="eventLater" tabindex="-1" role="dialog" aria-labelledby="eventLaterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="eventLaterLabel">Can't Save Schedule!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
No, no no! Every event must be at a later time than the previous events!
You were trying to make my code crash and burn, weren't you >:[
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saved" tabindex="-1" role="dialog" aria-labelledby="savedLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="savedLabel">Success!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Operation was successful.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="clearData" tabindex="-1" role="dialog" aria-labelledby="clearLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="clearLabel">Are you sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to reset the schedule for this day to the default?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="localStorage.removeItem(getDayStr(targetedDay) + '-schedule'); $('#saved').modal('show'); updateDisplayedSched();">Yes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="clearDataAll" tabindex="-1" role="dialog" aria-labelledby="clearAllLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="clearAllLabel">Are you sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to reset ALL schedules to their default?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="resetAllScheds(); $('#saved').modal('show'); updateDisplayedSched();">Yes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="clearMotd" tabindex="-1" role="dialog" aria-labelledby="motdClabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="motdClabel">Are you sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to reset the Message of the Day for this day to the default?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="localStorage.removeItem(getDayStr(targetedDay) + '-motd'); $('#saved').modal('show'); updateDisplayedSched();">Yes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="allMotdClear" tabindex="-1" role="dialog" aria-labelledby="clearAllMotdLab" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="clearAllMotdLab">Are you sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to reset ALL Messages of the Day to their defaults?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="resetAllMotds(); $('#saved').modal('show'); updateDisplayedSched();">Yes</button>
</div>
</div>
</div>
</div>
<div class="pad center">
<div class="pad center dark-theme bg-dark">
<h1>Harker MS Virtual Bell - Customize Schedule</h1>
<hr>
<div class="row">
<div class="col-sm">
<button type="button" class="btn btn-primary" onclick="prevDay();">← Previous Day</button>
</div>
<div class="col-sm">
<h2 class="disp" id="disp-day">ERROR</h2>
</div>
<div class="col-sm">
<button type="button" class="btn btn-primary" onclick="nextDay();">Next Day →</button>
</div>
</div>
<hr>
<div class="inner-center w-50">
<label class="w-100">
Message of the Day
<input class="form-control form-control" id="motd" type="text" placeholder="Default input">
</label>
<div class="row">
<div class="col-sm">
<button class="btn btn-danger" id="reset-all-motd" type="button" onclick="$('#allMotdClear').modal('show');">Reset ALL MOTDs</button>
</div>
<div class="col-sm">
<button class="btn btn-danger" id="reset-motd" type="button" onclick="$('#clearMotd').modal('show');">Reset MOTD</button>
</div>
<div class="col-sm">
<button class="btn btn-primary" id="save-motd" type="button" onclick="localStorage.setItem(getDayStr(targetedDay) + '-motd', document.getElementById('motd').value); $('#saved').modal('show'); ">Save MOTD</button>
</div>
</div>
</div>
<hr>
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">Event</th>
<th scope="col">Start Time</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="schedule-custom-body"></tbody>
</table>
<hr>
<div class="row">
<div class="col-sm">
<button type="button" class="btn btn-primary" onclick="addRow();">Add An Event</button>
</div>
<div class="col-sm">
<button type="button" class="btn btn-danger" onclick="$('#clearDataAll').modal('show');">Reset <b class="disp">ALL</b> Schedules</button>
</div>
<div class="col-sm">
<button type="button" class="btn btn-danger" onclick="$('#clearData').modal('show');">Reset Schedule for <span id="disp-day-btn2" class="disp">ERROR</span></button>
</div>
<div class="col-sm">
<button type="button" class="btn btn-primary" onclick="saveCustomSched(true);">Save Schedule for <span id="disp-day-btn" class="disp">ERROR</span></button>
</div>
</div>
<hr>
<h5><a href="index.html">← Back to the Bell</a></h5>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script crossorigin="anonymous" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script crossorigin="anonymous" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script crossorigin="anonymous" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="scripts/default-schedules.js"></script>
<script src="scripts/customize-logic.js"></script>
</body>
</html>