Skip to content
Snippets Groups Projects
Commit e489bb16 authored by Andreas Valder's avatar Andreas Valder
Browse files

hinting chapter marks now works without beeing logged in. closes #166

parent 503fd0d2
Branches
No related tags found
No related merge requests found
......@@ -105,18 +105,6 @@ var moderator = {
if (confirm('Really delete this?')) {
moderator.api.set($(src).data('path'),1,true);
}
},
hintchapterclick: function(src) {
$.ajax({
method: "GET",
url: $(src).data('url'),
data: $(src).serialize(),
success: function(data)
{
alert("Kapitelmarker vorgeschlagen. Danke!");
}
});
return false;
}
},
permissioneditor: {
......
......@@ -65,6 +65,19 @@
</div>
</div>
<script>
function hintchapterclick (src) {
$.ajax({
method: "GET",
url: $(src).data('url'),
data: $(src).serialize(),
success: function(data)
{
alert("Kapitelmarker vorgeschlagen. Danke!");
$('#hintnewchapter').popover('hide');
}
});
return false;
}
$(function() {
$( "#hintnewchapter" ).popover(
{
......@@ -80,7 +93,7 @@ $(function() {
var m = zeropad( Math.trunc((timestamp%3600)/60),2);
var s = zeropad( Math.trunc(timestamp%60),2);
var timeasstring = h+':'+m+':'+s;
return '<form method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return moderator.editor.hintchapterclick(this);"><input placeholder="00:00.000" name="time" type="text" value="'+timeasstring+'"><br><input placeholder="Kapitel" name="text" type="texz"><br><input type="submit" value="Vorschlagen"></form>';
return '<form method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input placeholder="00:00.000" name="time" type="text" value="'+timeasstring+'"><br><input placeholder="Kapitel" name="text" type="texz"><br><input type="submit" value="Vorschlagen"></form>';
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment