From 973708409481ea5e0d614c3ac6b6f1c96413caad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 13 Aug 2020 10:11:14 +0200 Subject: Popups are now correcetly rooted. --- static/script.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'static') diff --git a/static/script.js b/static/script.js index 32bc3b4b..6e82dd27 100644 --- a/static/script.js +++ b/static/script.js @@ -607,7 +607,17 @@ function close_popup(popup) { function open_popup(popup) { popup.classList.add("visible"); let element = document.getElementById(popup.id.substr(5)) - let root = document.body; + // let root = document.body; + let root; + switch (VIEW) { + case 'week': + root = document.getElementsByClassName("days")[0]; + break; + case 'month': + default: + root = document.body; + break; + } /* start sets offset between top left corner of event in calendar and popup. 10, 10 soo old event is still visible */ -- cgit v1.2.3