Used a better term for special_hour -> subhour
This commit is contained in:
parent
3ed79099f8
commit
74e5c6bcb9
12
schedule.js
12
schedule.js
|
@ -48,14 +48,14 @@ function to_json(page) {
|
|||
//Looping for (optional) specialhours
|
||||
var amount_of_special_hours = schedule.find('table').eq(day).children().length;
|
||||
schedule_data[day][hour] = {teacher: [], chamber: [], course: [], changed: []};
|
||||
for (special_hour = 0; special_hour < amount_of_special_hours; special_hour++) {
|
||||
var selected_hour = schedule.find('table').eq(day).find('tr').eq(special_hour).find('td');
|
||||
for (subhour = 0; subhour < amount_of_special_hours; subhour++) {
|
||||
var selected_hour = schedule.find('table').eq(day).find('tr').eq(subhour).find('td');
|
||||
//Give the value of the schedule hour to the fitting array.
|
||||
schedule_data[day][hour].teacher[special_hour] = selected_hour.eq(0).text();
|
||||
schedule_data[day][hour].chamber[special_hour] = selected_hour.eq(2).text();
|
||||
schedule_data[day][hour].course[special_hour] = selected_hour.eq(4).text();
|
||||
schedule_data[day][hour].teacher[subhour] = selected_hour.eq(0).text();
|
||||
schedule_data[day][hour].chamber[subhour] = selected_hour.eq(2).text();
|
||||
schedule_data[day][hour].course[subhour] = selected_hour.eq(4).text();
|
||||
//Check if the hour is 'changed' by the schedule authors, if so set to true.
|
||||
schedule_data[day][hour].changed[special_hour] = selected_hour.eq(0).attr().class == 'tableCellNew' ? true : false;
|
||||
schedule_data[day][hour].changed[subhour] = selected_hour.eq(0).attr().class == 'tableCellNew' ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue