-
-
-
+
{% for section in sections %}
{% cache 600 "schedule-table" section.schedule.section %}
{% for timetable in section.days %}
-
+
{{ section.schedule.section.name }} — {{ timetable.day.date|date:"l" }}, {{ timetable.day.date }}
{% include "symposion/schedule/_grid.html" %}
{% endfor %}
{% endcache %}
{% endfor %}
-
{% endblock %}
@@ -80,46 +83,31 @@
}
}
- document.addEventListener("DOMContentLoaded", function(event) {
+ document.addEventListener("hashchange", function(event) {
+ fragment = window.location.hash.toLowerCase().substring(1);
if (!fragment) {
return;
- }
+ };
- fragmentSwitch = "schedule_day_" + fragment;
-
- switches = document.getElementsByClassName("panel--tab-switch");
- tabs = document.getElementsByClassName("panel--tab-content");
-
- for (i = 0; i < switches.length; i++) {
-
- if (switches[i].id == fragmentSwitch) {
- switches[i].classList.add("is-active");
- tabs[i].classList.add("is-active");
- } else {
- switches[i].classList.remove("is-active");
- tabs[i].classList.remove("is-active");
- }
- }
+ fragmentid = "#schedule_day_" + fragment + "-tab";
+ $(fragmentid).tab('show');
});
- window.addEventListener("load", function(event) {
-
- $(".panel--tab-switch").click(function(event) {
+ $(".nav-item").click(function(event) {
// This updates the window location fragment so that
// the URL bar is updated, and so that when you go
// back, it loads the right page.
// len("schedule_day_") == 13
- day = event.target.id.substring(13);
+ day_tab = event.target.id.substring(13);
+ day = day_tab.substr(0, day_tab.length-4);
if(history.pushState) {
history.pushState(null, null, "#" + day);
}
});
- });
-
{{ block.super }}
{% endblock %}