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
......@@ -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>';
}
})
......
Supports Markdown
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