aboutsummaryrefslogtreecommitdiff
path: root/module/calp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-02 18:03:35 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-02 18:03:35 +0100
commited46cd4ab1ec2ef72b2c953bf0f00e6d637a23ba (patch)
tree85312bfec08d817efc3c7bcf75adedbe83f383a5 /module/calp
parentAdd basic changelog view (diff)
downloadcalp-ed46cd4ab1ec2ef72b2c953bf0f00e6d637a23ba.tar.gz
calp-ed46cd4ab1ec2ef72b2c953bf0f00e6d637a23ba.tar.xz
Formatting fixes in make-block.
Diffstat (limited to 'module/calp')
-rw-r--r--module/calp/html/vcomponent.scm73
1 files changed, 33 insertions, 40 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index c8b917d2..9309bcdb 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -407,46 +407,39 @@
`((a (@ (href "#" ,(html-id ev))
(class "hidelink"))
(vevent-block (@ ,@(assq-merge
- extra-attributes
- `((id ,(html-id ev))
- (data-calendar ,(base64encode (or (prop (parent ev) 'NAME) "unknown")))
- ;; (data-bindon "bind_view")
- (class "vevent event"
- ,(when (and (prop ev 'PARTSTAT)
- (eq? 'TENTATIVE (prop ev 'PARTSTAT)))
- " tentative")
- ,(when (and (prop ev 'TRANSP)
- (eq? 'TRANSPARENT (prop ev 'TRANSP)))
- " transparent")
- )
- (data-uid ,(prop ev 'UID))
- ;; TODO figure out stable way to get popup for element
- ;; (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
- ;; overflow (for the tabs?).
- (div (@ (class "event-body"))
- ,(when (prop ev 'RRULE)
- `(span (@ (class "repeating")) "↺"))
- (span (@ (class "bind summary")
- (data-property "summary"))
- ,(format-summary ev (prop ev 'SUMMARY)))
- ,(when (prop ev 'LOCATION)
- `(span (@ (class "bind location")
- (data-property "location"))
- ,(string-map (lambda (c) (if (char=? c #\,) #\newline c))
- (prop ev 'LOCATION))))
- ;; Document symbol when we have text
- ,(when (and=> (prop ev 'DESCRIPTION) (negate string-null?))
- `(span (@ (class "description"))
- "🗎")))
- #;
- (div (@ (style "display:none !important;"))
- ,((@ (vcomponent xcal output) ns-wrap)
- ((@ (vcomponent xcal output) vcomponent->sxcal)
- ev)))
- ))))
+ extra-attributes
+ `((id ,(html-id ev))
+ (data-calendar ,(base64encode (or (prop (parent ev) 'NAME) "unknown")))
+ (data-uid ,(prop ev 'UID))
+
+ (class "vevent event"
+ ,(when (and (prop ev 'PARTSTAT)
+ (eq? 'TENTATIVE (prop ev 'PARTSTAT)))
+ " tentative")
+ ,(when (and (prop ev 'TRANSP)
+ (eq? 'TRANSPARENT (prop ev 'TRANSP)))
+ " transparent")
+ ))))
+ ;; Inner div to prevent overflow. Previously "overflow: none"
+ ;; was set on the surounding div, but the popup /needs/ to
+ ;; overflow (for the tabs?).
+ ;; TODO the above comment is no longer valid. Popups are now stored
+ ;; separately from the block.
+ (div (@ (class "event-body"))
+ ,(when (prop ev 'RRULE)
+ `(span (@ (class "repeating")) "↺"))
+ (span (@ (class "bind summary")
+ (data-property "summary"))
+ ,(format-summary ev (prop ev 'SUMMARY)))
+ ,(when (prop ev 'LOCATION)
+ `(span (@ (class "bind location")
+ (data-property "location"))
+ ,(string-map (lambda (c) (if (char=? c #\,) #\newline c))
+ (prop ev 'LOCATION))))
+ ;; Document symbol when we have text
+ ,(when (and=> (prop ev 'DESCRIPTION) (negate string-null?))
+ `(span (@ (class "description"))
+ "🗎")))))))
(define (repeat-info event)