forked from catmanjan/anutimetable
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
169 lines (153 loc) · 6.51 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
<!DOCTYPE html>
<html lang="en" manifest="manifest.appcache">
<head>
<title>uOttawa Science timetable planner</title>
<meta charset="utf-8">
<meta name="description" content="Intuitive timetable builder for the Australian National University.">
<script src="js/underscore.js"></script>
<script src="js/jquery.js"></script>
<script src="js/typeahead.bundle.min.js"></script>
<script src="js/download.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/importDate.js"></script>
<script src="js/timetable.js" defer></script>
<script src="js/timetable_analyser.js"></script>
<script src="js/html2canvas.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container_">
<div class="row noprint">
<div class="col-sm-12 col-md-12">
<div class="">
<h1 class="title">uOttawa Science Timetable Planner (<a href="editor" target="_new">edit config test</a>)</h1>
<h2 class="title">2019 v1.0</h2>
</div>
<p class="course-list-date">Course list updated on <span id="jsonUpdatedTime"></span><br />
<span class="special-note"></span></p>
<p><i>Courses chosen: <span id="chosenCourses">Loading data from data/timetable.json...</span> <span id="courses" style="display: inline;"></span></i></p>
</div>
<div class="col-xs-12">
<div class="well form-inline">
<input type="text" id="course-name" class="form-control" style="width:325px" placeholder="Enter a course code here (for example BIO2133)" autofocus>
<div class="btn-group">
<button id="add-course" class="btn btn-default">Add</button>
<button id="clear-courses" class="btn btn-default">Clear</button>
</div>
<select id="course-ddl" class="form-control" style="width:325px" placeholder="Choose a course"> </select>
<button id="loadFall" class="btn btn-primary ">Upload new fall data .xlsx</button>
<button id="loadWinter" class="btn btn-primary ">Upload new winter data .xlsx</button>
<div class="btn-group pull-right">
<button id="screenshot" class="btn btn-info">Export .png</button>
<button id="download" class="btn btn-info pull-right">Export .ics</button>
</div>
<div class="hiddenfile">
<input type="file" id="fileFall">
<input type="file" id="fileWinter">
<input name="upload" type="file" id="fileinput"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="loader" style="display:none;"></div>
<div id="cal-container"></div>
</div>
</div>
</div>
<script type="text/template" id="cal-header">BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:ANU Semester 1
X-WR-TIMEZONE:/Australia/Sydney
X-WR-CALDESC:ANU Semester 1.
</script>
<script type="text/template" id="event-template">
BEGIN:VEVENT
DTSTART;TZID=/Australia/Sydney:201902<%= first_day %>T<%= padded_hour %>00
DTEND;TZID=/Australia/Sydney:201902<%= first_day %>T<%= padded_end_hour %>00
RRULE:FREQ=WEEKLY;COUNT=15;BYDAY=<%= day.slice(0,2).toUpperCase() %>
EXDATE;TZID=/Australia/Sydney:201906<%= holiday2 %>T<%= padded_hour %>00
EXDATE;TZID=/Australia/Sydney:201906<%= holiday1 %>T<%= padded_hour %>00
DTSTAMP:20180918T000000Z
CREATED:20180918T000000Z
DESCRIPTION:<%= description %>
LAST-MODIFIED:20180718T000000Z
LOCATION:<%= location %>
SEQUENCE:1
UID:anu2019s1_<%= course %>
STATUS:CONFIRMED
SUMMARY:<%= course %>
TRANSP:OPAQUE
END:VEVENT
</script>
<script type="text/template" id="compulsory-event-template">
<div class='lesson' data-eventtype='compulsory'
data-name='<%= item.name %>'>
<span class="glyphicon glyphicon-pushpin"></span>
<strong><%= item.name %></strong>.
<em><%= item.location %></em>.
<%= item.info %>.
<% if (item.note) { %>
<span class="glyphicon glyphicon-info-sign" title="<%= item.note %>"></span>
<% } %>
<i><%= Tools.pad(Math.floor(item.start), 2) + ':' + (item.start == Math.floor(item.start) ? '0' : '3') + '0-' +
Math.floor(item.start + item.dur) + ':' + (item.start + item.dur == Math.floor(item.start + item.dur) ? '0' : '3') + '0' %></i>
</div>
</script>
<script type="text/template" id="group-event-template">
<div class='lesson' data-eventtype='group'
data-group='<%= item.name + filterNumbers(item.info) %>'
data-name='<%= item.name %>'
data-id='<%= item.id %>'>
<strong><%= item.name %></strong>.
<%= item.info %>. <br> <br>
<em><%= item.location %></em>.
<% if (item.note) { %>
<span class="glyphicon glyphicon-info-sign noprint" title="<%= item.note %>"></span>
<% } %>
<br>
<br>
<i><%= Tools.pad(Math.floor(item.start), 2) + ':' + (item.start == Math.floor(item.start) ? '0' : '3') + '0-' +
Math.floor(item.start + item.dur) + ':'
+ ( ((item.start + item.dur)%1) == 0 ? '00' : (Math.round((60 * ((item.start + item.dur)%1) )) | 0).toString())
%></i>
<!--Math.floor(item.start + item.dur) + ':' + (item.start + item.dur == Math.floor(item.start + item.dur) ? '0' : '3') + '0' %></i><br>-->
<a class="choose" data-html2canvas-ignore="true" href>(choose) </a> <a class="hide_temp noprint" data-html2canvas-ignore="true" href>(hide)</a>
</div>
</script>
<script type="text/template" id="calendar-template">
<table class="table table-striped table-condensed" >
<tbody>
<tr>
<th class="col-sm-1 hours" >
<!--<span class="glyphicon glyphicon-chevron-left cursor" onclick="Calendar.shiftWeek(-1)"></span><span id="week-num"></span><span class="glyphicon glyphicon-chevron-right cursor" onclick="Calendar.shiftWeek(1)"></span>-->
</th>
<% for (var i = 0; i < 5; i++) { %>
<th class="col-sm-2"><%= Calendar.weekdaysFull[i] %></th>
<% } %>
</tr>
<% for (var hour = start_hour; hour < end_hour; hour += 0.5) { %>
<tr class="timetable-row" data-hour="<%= hour %>"
<% if (hour < normal_start_hour || hour >= normal_end_hour) { %>
style='display:none'
<% } %>
>
<th>
<%= Tools.pad(Math.floor(hour), 2) %>:<%= hour == Math.floor(hour) ? '0' : '3' %>0
</th>
<% for (var i = 0; i < 5; i++) { %>
<td class="timeslot" data-hour="<%= hour %>" data-day="<%= Calendar.weekdays[i] %>" data-index="-1">
</td>
<% } %>
</tr>
<% } %>
</tbody>
</table>
</script>
</body>
</html>