aboutsummaryrefslogtreecommitdiff
path: root/module/calp/html/view/calendar.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:09:30 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:12:14 +0100
commit720863f5e183fb78866041df36ee8bd4f9a42f72 (patch)
treee4ff1333d980b9ccc0561da3f8f6d53ad17c6a44 /module/calp/html/view/calendar.scm
parentBetter handle debug tab. (diff)
downloadcalp-720863f5e183fb78866041df36ee8bd4f9a42f72.tar.gz
calp-720863f5e183fb78866041df36ee8bd4f9a42f72.tar.xz
Calendar colors now handled through html datasets.
Previously css rules for each calendar (governing color) where handled through CSS classes. This however had the problem that all calendar names needed to be mapped unto valid classnames, and it brought some problems with updating it. This change places the calendar information in the dataset.calendar attribute. It's still base64 encoded, so special characters don't need escaping, and XML doesn't trip up.
Diffstat (limited to 'module/calp/html/view/calendar.scm')
-rw-r--r--module/calp/html/view/calendar.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm
index 82cccdf3..634f6a69 100644
--- a/module/calp/html/view/calendar.scm
+++ b/module/calp/html/view/calendar.scm
@@ -27,6 +27,7 @@
:use-module ((vcomponent group)
:select (group-stream get-groups-between))
+ :use-module ((base64) :select (base64encode))
)
@@ -260,8 +261,7 @@
(summary "Calendar list")
(ul ,@(map
(lambda (calendar)
- `(li (@ (class "CAL_"
- ,(html-attr (prop calendar 'NAME))))
+ `(li (@ (data-calendar ,(base64encode (prop calendar 'NAME))))
(a (@ (href "/search?"
,((@ (web uri-query) encode-query-parameters)
`((q . (and (date/-time<=?