Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Karwacik
website
Commits
7f4d8a8d
Commit
7f4d8a8d
authored
May 08, 2017
by
Andreas Valder
Browse files
fixes modal dialogs in player
parent
01de5dd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/macros.html
View file @
7f4d8a8d
...
...
@@ -59,6 +59,8 @@
$
(
'
#videoplayer
'
).
addClass
(
"
vjs-16-9
"
);
$
(
'
#videoplayer
'
).
css
(
"
width
"
);
$
(
function
()
{
videojs
(
"
videoplayer
"
).
ready
(
function
()
{
//resume
var
progress_key
=
"
progress_{{ lecture.id }}
"
;
var
seconds_played
;
...
...
@@ -92,11 +94,20 @@ $(function() {
if
(
document
.
hasFocus
())
{
playerplay
();
}
var
modals
=
[];
//display errors
{
%
for
msg
in
msgs
%
}
videojs
(
"
videoplayer
"
).
createModal
(
''
,{
"
uncloseable
"
:
true
}).
contentEl
().
innerHTML
=
'
<div class="hidden-print alert alert-danger" role="alert">{{ msg|safe }}</div>
'
;
var
m
=
videojs
(
"
videoplayer
"
).
createModal
(
''
,{
"
uncloseable
"
:
true
});
modals
.
push
(
m
);
m
.
contentEl
().
innerHTML
=
'
<div class="hidden-print alert alert-danger" role="alert">{{ msg|safe }}</div>
'
;
{
%
endfor
%
}
videojs
(
"
videoplayer
"
).
on
(
'
play
'
,
function
()
{
for
(
var
i
=
0
;
i
<
modals
.
length
;
i
++
)
{
modals
[
i
].
close
();
}
});
//markers
$
.
ajax
({
method
:
"
GET
"
,
url
:
"
{{url_for('chapters',lectureid=lecture.id, json=1)}}
"
,
dataType
:
"
json
"
,
...
...
@@ -116,6 +127,7 @@ $(function() {
markers
:
data
});
}});
});
});
</script>
{% endmacro %}
...
...
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