From 373b95167bb9f92bc525732bc4c6294e17e3e80c Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Fri, 1 May 2020 17:05:57 +0200 Subject: [PATCH] Made reloadonclose available on embed page --- templates/base.html | 12 ++++++++++++ templates/lecture.html | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/base.html b/templates/base.html index 468d62e..ca79418 100644 --- a/templates/base.html +++ b/templates/base.html @@ -221,6 +221,18 @@ html: true }); }); + $(document).on("click","a.reloadonclose",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> </body> </html> diff --git a/templates/lecture.html b/templates/lecture.html index ec88c3e..df6e477 100644 --- a/templates/lecture.html +++ b/templates/lecture.html @@ -131,18 +131,6 @@ $(function() { }) }); -$(document).on("click","a.reloadonclose",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; -}); $(document).ready(function() { $("a.chapterlink").click(function () { -- GitLab