-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
309 lines (288 loc) · 11.4 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Add Your MySU Course Schedule to Google Calendar</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async
src="https://www.googletagmanager.com/gtag/js?id=UA-113204083-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-113204083-1');
</script>
<style>
.calendar-summary {
text-decoration: underline;
}
</style>
</head>
<body class="bg-light">
<div class="container">
<div class="my-5 text-center">
<h2>Add Your MySU Course Schedule to Google Calendar</h2>
<p class="lead">If you are a Sabancı University student
and you would like to add your classes to Google Calendar,
this page is created to make that process as easy as possible.
</p>
</div>
<hr class="my-4"/>
<h4 class="mb-3 text-center">Set the Current Term</h4>
<form id="term-submit-form" class="row justify-content-center">
<div class="form-inline col-6 col-md-auto">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<label for="current-term-year">Year</label>
</div>
</div>
<input type="number" class="form-control" id="current-term-year" min="0" max="9999">
</div>
</div>
<div class="form-inline col-6 col-md-auto">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<label for="current-term-type">Type</label>
</div>
</div>
<select id="current-term-type" class="form-control">
<option value="Fall">Fall</option>
<option value="Spring">Spring</option>
</select>
</div>
</div>
</form>
<hr class="my-4"/>
<h4 class="mb-3 text-center">Get Your Schedule from MySU</h4>
<div class="row">
<div class="col">
<p class="lead">
<a id="term-schedule-link" target="_blank" href="#">
Link to Your <span class="current-term-verbal"></span> Schedule
</a>
</p>
<p class="lead">
As shown in the image,
simply select all the text content (Control+A or ⌘+A) in your schedule page
and copy it.
</p>
<textarea class="form-control" id="paste" rows="5"
placeholder="Then Paste Your Schedule Here"></textarea>
</div>
<div class="col-auto">
<img class="img-fluid img-thumbnail"
src="./example.png" alt="Figure 1: Example">
</div>
</div>
<div class="row mt-4 d-none" id="generated-schedule-row">
<div class="col text-center">
<p class="text-danger">
Please make sure your schedule matches with the below.
</p>
<h4>Generated Calendar</h4>
<table class="table" id="schedule">
<thead>
<tr class="row">
<td class="col"></td>
<td class="col">MON</td>
<td class="col">TUES</td>
<td class="col">WED</td>
<td class="col">THURS</td>
<td class="col">FRI</td>
</tr>
</thead>
<tbody>
<tr class="row">
<td class="col">08:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">09:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">10:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">11:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">12:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">13:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">14:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">15:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">16:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">17:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
<tr class="row">
<td class="col">18:40</td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
<td class="col"></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr class="my-4"/>
<div class="row">
<div class="col-md-6 order-md-1">
<h4 class="mb-3">Notification Area</h4>
<div id="notificationArea"
style="overflow-y: scroll; height:260px; background: white; padding: 0.6rem;">
</div>
</div>
<div class="col-md-6 order-md-2">
<div class="mb-3">
<h4 class="text-muted">Authorization</h4>
<h4 class="mb-3">Connect Using Your Google Account</h4>
<button class="btn btn-primary btn-lg btn-block" id="authorize-button">
Sign In
</button>
<button class="btn btn-warning btn-lg btn-block"
id="signout-button" style="display: none;">
Sign Out
</button>
<div id="authorized-actions" style="display:none;">
<hr class="mb-4">
<h4 class="mb-3">
Add
<span class="calendar-summary"></span>
To Your Calendar
</h4>
<p>Please select the current week from below.</p>
<div class="col">
<div class="row">
<h5 class="col-md-4">Current Week:</h5>
<select class="form-control col-md-8" name="week" id="week">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
</select>
</div>
</div>
<button class="btn btn-success btn-lg btn-block mt-3" id="add-button"
style="display: none;">
Add
</button>
<hr class="mb-4">
<h4 class="mb-3">
Delete
<span class="calendar-summary"></span>
From Your Calendar
</h4>
<p>
<b>Be Careful!</b>
This button will remove the
<span class="calendar-summary"></span>
from your Google Calendar.
</p>
<button class="btn btn-danger btn-lg btn-block" id="delete-button">
Delete
</button>
</div>
</div>
</div>
</div>
<footer class="my-5 pt-5 text-muted text-center text-small">
<p class="mb-1">© 2017-2019 | Adnan Burak Ayaz - Berk Canlı</p>
<ul class="list-inline">
<li class="list-inline-item">
<a href="https://aburakayaz.github.io">Blog</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/aburakayaz">GitHub</a>
</li>
</ul>
</footer>
</div>
<script src="https://apis.google.com/js/api.js"></script>
<script src="./index.js"></script>
<script>
handleClientLoad();
</script>
</body>
</html>