Commit 0b433aa1 authored by Julian Rother's avatar Julian Rother
Browse files

Made chapter links work without javascript

parent ec92e4d7
......@@ -55,7 +55,7 @@
{% for c in chapters|sort(attribute='time') %}
<tr>
<td>
<a href="javascript:videojs('videoplayer').currentTime({{c['time']}})">{{ '%02d:%02d:%02d'|format( c['time']//3600, (c['time']//60)%60, c['time']%60) }}</a>
<a class="chapterlink" href="{{url_for('lecture', course=course.handle, id=lecture.id, t=c['time'])}}" data-seek-time="{{c['time']}}">{{ '%02d:%02d:%02d'|format( c['time']//3600, (c['time']//60)%60, c['time']%60) }}</a>
<br>
{% if ismod() %}
{{ moderator_editor(['chapters',c.id,'time'],c['time'],true) }}
......@@ -146,6 +146,10 @@ $(document).ready(function() {
}, 500);
return false;
});
$("a.chapterlink").click(function () {
videojs('videoplayer').currentTime($(this).data("seek-time"));
return false;
});
});
</script>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment