diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-07 19:23:26 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-07 19:23:26 +0200 |
commit | 3d0d9d910bb828e95fce1d7786d6de671b406e21 (patch) | |
tree | 37ae3a2e4fc1dfa5f4042a1660910e335b0fd196 /module | |
parent | Slightly better search page. (diff) | |
download | calp-3d0d9d910bb828e95fce1d7786d6de671b406e21.tar.gz calp-3d0d9d910bb828e95fce1d7786d6de671b406e21.tar.xz |
Dynamicaly created popups now work.
Diffstat (limited to '')
-rw-r--r-- | module/output/html.scm | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/module/output/html.scm b/module/output/html.scm index 1bc0d74f..e3668f08 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -137,13 +137,11 @@ "unknown")))) ,(btn "×" title: "Stäng" - onclick: (format #f "close_popup(document.getElementById('~a'))" - id) + onclick: "close_popup(document.getElementById(this.closest('.popup-container').id))" class: '("close-tooltip")) ,(btn "🗑" title: "Ta bort" - onclick: (format #f "remove_event(document.getElementById('~a'))" - (html-id ev)))) + onclick: "remove_event(document.getElementById(this.closest('.popup-container').id.substr(5)))")) ,(tabset (append @@ -153,11 +151,7 @@ (ul (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".ics")) "som iCal")) (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".xcs")) - "som xCal")))))))) - (div (@ (style "display:none !important;")) - ,((@ (output xcal) ns-wrap) - ((@ (output xcal) vcomponent->sxcal) - ev)))))) + "som xCal"))))))))))) @@ -201,8 +195,7 @@ ,(when (and (prop ev 'PARTSTAT) (eq? 'TENTATIVE (prop ev 'PARTSTAT))) " tentative")) - (onclick ,(format #f "toggle_popup('~a')" - (string-append "popup" (html-id ev)))) + (onclick "toggle_popup('popup' + this.id)") ))) ;; Inner div to prevent overflow. Previously "overflow: none" ;; was set on the surounding div, but the popup /needs/ to |