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
68caec6e
Commit
68caec6e
authored
Apr 10, 2017
by
Julian Rother
Browse files
Auto-reload player page when SSO page is closed
parent
e42d6a70
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
68caec6e
...
...
@@ -421,9 +421,9 @@ def lecture(id):
if
not
checkperm
(
perms
):
mode
,
text
=
permdescr
(
perms
)
if
mode
==
'rwth'
:
flash
(
text
+
'. <a target="_blank" href="'
+
url_for
(
'start_rwthauth'
)
+
'">Hier authorisieren</a>.'
)
flash
(
text
+
'. <a target="_blank"
class="reloadonclose"
href="'
+
url_for
(
'start_rwthauth'
)
+
'">Hier authorisieren</a>.'
)
elif
mode
==
'l2p'
:
flash
(
text
+
'. <a target="_blank" href="'
+
url_for
(
'start_l2pauth'
)
+
'">Hier authorisieren</a>.'
)
flash
(
text
+
'. <a target="_blank"
class="reloadonclose"
href="'
+
url_for
(
'start_l2pauth'
)
+
'">Hier authorisieren</a>.'
)
else
:
flash
(
text
+
'.'
)
return
render_template
(
'embed.html'
if
request
.
endpoint
==
'embed'
else
'lecture.html'
,
course
=
courses
[
0
],
lecture
=
lecture
,
videos
=
videos
,
chapters
=
chapters
)
...
...
templates/lecture.html
View file @
68caec6e
...
...
@@ -98,5 +98,19 @@ $(function() {
})
});
$
(
document
).
ready
(
function
()
{
$
(
"
a.reloadonclose
"
).
click
(
function
()
{
var
popup
=
window
.
open
(
this
.
href
,
this
.
target
);
if
(
!
popup
)
return
true
;
var
popup_check
=
setInterval
(
function
()
{
if
(
popup
.
closed
)
{
clearInterval
(
popup_check
);
location
.
reload
();
};
},
500
);
return
false
;
});
});
</script>
{% endblock %}
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