aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-13 10:11:14 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-13 10:11:14 +0200
commit973708409481ea5e0d614c3ac6b6f1c96413caad (patch)
tree1c60089a04a55e904b9f243549b6750d81f997c3 /static
parentcleanup. (diff)
downloadcalp-973708409481ea5e0d614c3ac6b6f1c96413caad.tar.gz
calp-973708409481ea5e0d614c3ac6b6f1c96413caad.tar.xz
Popups are now correcetly rooted.
Diffstat (limited to 'static')
-rw-r--r--static/script.js12
1 files changed, 11 insertions, 1 deletions
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 <X, Y> sets offset between top left corner
of event in calendar and popup. 10, 10 soo old
event is still visible */