Made the schedule render.
This commit is contained in:
parent
2970d0386e
commit
9be6daa221
|
@ -1 +1,10 @@
|
||||||
include header
|
include header
|
||||||
|
|
||||||
|
div.schedule
|
||||||
|
each day in json
|
||||||
|
div.day
|
||||||
|
each hour in day
|
||||||
|
div.hour
|
||||||
|
span.teacher= hour.teacher
|
||||||
|
span.chamber= hour.chamber
|
||||||
|
span.course= hour.course
|
||||||
|
|
|
@ -44,3 +44,16 @@
|
||||||
background-color: #96aa48;
|
background-color: #96aa48;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.schedule {
|
||||||
|
display: table;
|
||||||
|
|
||||||
|
div.day {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
div.hour {
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ function to_json(page) {
|
||||||
var amount_of_special_hours = schedule.find('table').eq(0).children().length;
|
var amount_of_special_hours = schedule.find('table').eq(0).children().length;
|
||||||
for (special_hour = 0; special_hour < amount_of_special_hours; special_hour++) {
|
for (special_hour = 0; special_hour < amount_of_special_hours; special_hour++) {
|
||||||
schedule_data[day][hour] = {teacher: [], chamber: [], course: [], changed: []};
|
schedule_data[day][hour] = {teacher: [], chamber: [], course: [], changed: []};
|
||||||
var selected_hour = schedule.find('table').eq(0).find('tr').eq(special_hour).find('td');
|
var selected_hour = schedule.find('table').eq(day).find('tr').eq(special_hour).find('td');
|
||||||
|
|
||||||
schedule_data[day][hour].teacher[special_hour] = selected_hour.eq(0).html();
|
schedule_data[day][hour].teacher[special_hour] = selected_hour.eq(0).html();
|
||||||
schedule_data[day][hour].chamber[special_hour] = selected_hour.eq(2).html();
|
schedule_data[day][hour].chamber[special_hour] = selected_hour.eq(2).html();
|
||||||
|
|
Loading…
Reference in a new issue