Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
e489bb16
Commit
e489bb16
authored
Oct 16, 2016
by
Andreas Valder
Browse files
hinting chapter marks now works without beeing logged in. closes
#166
parent
503fd0d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
static/moderator.js
View file @
e489bb16
...
...
@@ -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
:
{
...
...
templates/lecture.html
View file @
e489bb16
...
...
@@ -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>
'
;
}
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment