aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-11 20:17:25 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-11 20:26:11 +0200
commit54c613f48caa01f05fac2774dc2d2253568b552e (patch)
treef5a621b52e576594707af58afc9fc864ed90a0e7
parentMercge CAL and CAL_bg css classes. (diff)
downloadcalp-54c613f48caa01f05fac2774dc2d2253568b552e.tar.gz
calp-54c613f48caa01f05fac2774dc2d2253568b552e.tar.xz
Add dropdown editing event.
-rw-r--r--module/html/view/calendar.scm9
-rw-r--r--static/script.js5
2 files changed, 13 insertions, 1 deletions
diff --git a/module/html/view/calendar.scm b/module/html/view/calendar.scm
index 4fad41c8..39f1092d 100644
--- a/module/html/view/calendar.scm
+++ b/module/html/view/calendar.scm
@@ -287,7 +287,14 @@
`(li (@ (class "CAL_"
,(html-attr (prop calendar 'NAME))))
,(prop calendar 'NAME)))
- calendars))))
+ calendars))
+ (div (@ (id "calendar-dropdown-template") (class "template"))
+ (select
+ ,@(map (lambda (calendar)
+ `(option (@ (value ,(prop calendar 'NAME)))
+ ,(prop calendar 'NAME)))
+ calendars))
+ )))
;; List of events
(div (@ (class "eventlist")
diff --git a/static/script.js b/static/script.js
index cc647b77..0385ac5a 100644
--- a/static/script.js
+++ b/static/script.js
@@ -501,6 +501,11 @@ function place_in_edit_mode (event) {
description.replaceWith(textarea);
}
+ /* ---------------------------------------- */
+
+ let evtext = popup.getElementsByClassName('eventtext')[0]
+ let calendar_dropdown = document.getElementById('calendar-dropdown-template').firstChild.cloneNode(true);
+ evtext.prepend(calendar_dropdown);
/* ---------------------------------------- */