From 2e4b349b723531a3a2a42db11527ee3fc90b4b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Dec 2021 20:36:43 +0100 Subject: Correctly show recur indicator. --- module/calp/html/vcomponent.scm | 4 ++-- static/components/vevent-description.ts | 7 +++++++ static/style.scss | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index c4ecec70..3e7cc4dc 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -454,8 +454,8 @@ '(template (@ (id "vevent-description")) (div (@ (class " vevent eventtext summary-tab " ())) - (h3 ((span (@ (class "repeating")) ; "↺" - ) + (h3 ((span (@ (class "repeating")) + "↺") (span (@ (class "summary") (data-property "summary"))))) (div (div (time (@ (class "dtstart") diff --git a/static/components/vevent-description.ts b/static/components/vevent-description.ts index 09c836b0..98c9007e 100644 --- a/static/components/vevent-description.ts +++ b/static/components/vevent-description.ts @@ -39,6 +39,13 @@ class ComponentDescription extends ComponentVEvent { } } + let repeating = body.getElementsByClassName('repeating')[0] as HTMLElement + if (data.getProperty('rrule')) { + repeating.classList.remove('hidden'); + } else { + repeating.classList.add('hidden'); + } + this.replaceChildren(body); } } diff --git a/static/style.scss b/static/style.scss index 48de9bcc..efe8291d 100644 --- a/static/style.scss +++ b/static/style.scss @@ -101,6 +101,10 @@ html, body { text-decoration: none; } +.hidden { + display: none; +} + /* Change View ---------------------------------------- -- cgit v1.2.3