From 41ac219bbea39293aab220fe74f9fe200039a587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 13 Jan 2021 19:32:06 +0100 Subject: Add debug buttons in popup for dumping xcal and jcal. --- module/calp/html/vcomponent.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'module/calp') diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index ae8dd1e2..cd8c207e 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -550,10 +550,16 @@ ("⤓" title: "Nedladdning" (div (@ (class "eventtext") (style "font-family:sans")) (h2 "Ladda ner") - (ul (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".ics")) - "som iCal")) - (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".xcs")) - "som xCal"))))) + (div (@ (class "side-by-side")) + (ul (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".ics")) + "som iCal")) + (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".xcs")) + "som xCal"))) + ,@(when (debug) + `((ul + (li (button (@ (onclick "console.log(event_to_jcal(event_from_popup(this.closest('.popup-container'))));")) "js")) + (li (button (@ (onclick "console.log(jcal_to_xcal(event_to_jcal(event_from_popup(this.closest('.popup-container')))));")) "xml")))))) + )) ,@(when (prop ev 'RRULE) `(("↺" title: "Upprepningar" class: "repeating" -- cgit v1.2.3