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. --- module/html/view/calendar/month.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'module/html/view/calendar/month.scm') diff --git a/module/html/view/calendar/month.scm b/module/html/view/calendar/month.scm index 9288fd1a..99640a22 100644 --- a/module/html/view/calendar/month.scm +++ b/module/html/view/calendar/month.scm @@ -35,7 +35,8 @@ (events-between s e (list->stream long-events))))) (date-range pre-start post-end (date day: 7)))) - `((header (@ (class "table-head")) + `((script "const VIEW='month';") + (header (@ (class "table-head")) ,(string-titlecase (date->string start-date "~B ~Y"))) (div (@ (class "caltable") (style "grid-template-rows: 2em" @@ -74,7 +75,14 @@ ,@(map make-small-block (stream->list events))))) short-event-groups (repeating-naturals 1 7) - ))))) + ))) + + ;; These popups are relative the document root. Can thus be placed anywhere in the DOM. + ,@(for event in (stream->list + (events-between start-date end-date events)) + ((@ (html vcomponent) popup) event + (string-append "popup" ((@ (html util) html-id) event)))) + )) -- cgit v1.2.3