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
629a61e7
Commit
629a61e7
authored
May 04, 2017
by
Andreas Valder
Browse files
made chapter editor better, closes
#196
parent
da15c877
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/lecture.html
View file @
629a61e7
...
...
@@ -27,7 +27,6 @@
<div
class=
"col-xs-12"
style=
"padding-bottom: 5px;"
>
<a
href=
"{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}"
class=
"btn btn-default"
>
Zur Veranstaltungsseite
</a>
<ul
class=
"list-inline pull-right"
>
<li><button
class=
"btn btn-default"
id=
"hintnewchapter"
>
Kapitelmarker vorschlagen
</button></li>
<li>
{{ video_embed_btn(lecture.id, course=course.handle) }}
</li>
<li
class=
"dropdown"
>
{{ video_download_btn(videos) }}
</li>
</ul>
...
...
@@ -42,7 +41,9 @@
</div>
{% if (chapters|length > 0) or ismod() %}
<div
class=
"col-xs-12 table-responsive"
style=
"padding-top: 10px;"
>
<p>
Kapitel:
</p>
<p>
Kapitel:
<button
class=
"btn btn-default"
id=
"hintnewchapter"
>
{% if ismod() %}Neues Kapitel{% else %}Kapitelmarker vorschlagen{% endif %}
</button>
</p>
<table
class=
"table table-hover"
>
<tr>
<th
style=
"width: 130px;"
>
Start
</th>
...
...
@@ -86,8 +87,12 @@ function hintchapterclick (src) {
data
:
$
(
src
).
serialize
(),
success
:
function
(
data
)
{
alert
(
"
Kapitelmarker vorgeschlagen. Danke!
"
);
$
(
'
#hintnewchapter
'
).
popover
(
'
hide
'
);
{
%
if
not
ismod
()
%
}
alert
(
"
Kapitelmarker vorgeschlagen. Danke!
"
);
{
%
else
%
}
window
.
location
.
reload
();
{
%
endif
%
}
$
(
'
#hintnewchapter
'
).
click
();
}
});
return
false
;
...
...
@@ -97,6 +102,8 @@ $(function() {
{
html
:
true
,
title
:
'
Kapitelmarkierung vorschlagen
'
,
placement
:
'
bottom
'
,
container
:
'
body
'
,
content
:
function
()
{
var
zeropad
=
function
(
num
,
places
)
{
var
zero
=
places
-
num
.
toString
().
length
+
1
;
...
...
@@ -107,7 +114,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 hintchapterclick(this);"><input class="form-control" placeholder="00:00.000" name="time" type="text" value="
'
+
timeasstring
+
'
"><br><input class="form-control" placeholder="Kapitel" name="text" type="text"><br><input type="submit" class="btn btn-default" value="
Vorschlagen
"></form>
'
;
return
'
<form method="post" data-url="{{ url_for(
'
suggest_chapter
'
, lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00.000" name="time" type="text" value="
'
+
timeasstring
+
'
"><br><input class="form-control" placeholder="Kapitel" name="text" type="text"><br><input type="submit" class="btn btn-default" value="
{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}
"></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