aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-11-20 22:07:40 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-11-20 22:07:40 +0100
commit0d5277dc2db381f60604c5df93984c1abcfba30f (patch)
treeb63d88cc50309fd42050db77cc18fca49b65fa77 /module
parentAdd preliminary component for input-plus-minus. (diff)
downloadcalp-0d5277dc2db381f60604c5df93984c1abcfba30f.tar.gz
calp-0d5277dc2db381f60604c5df93984c1abcfba30f.tar.xz
Start adding binding stuff too rrule edit form.
Diffstat (limited to 'module')
-rw-r--r--module/calp/html/vcomponent.scm24
1 files changed, 18 insertions, 6 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index 7d057b67..60f270f7 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -372,7 +372,8 @@
(td
,(case key
((freq)
- `(select (option "-")
+ `(select (@ (class "bind-rr") (name "freq"))
+ (option "-")
,@(map (lambda (x) `(option (@ (value ,x)
,@(awhen (prop event 'RRULE)
(awhen (rrule:freq it)
@@ -386,10 +387,13 @@
((until)
(if (date? (prop event 'DTSTART))
`(input (@ (type "date")
+ (name "until")
+ (class "bind-rr")
(value ,(awhen (prop event 'RRULE)
(awhen (rrule:until it)
(date->string it))))))
- `(span
+ `(span (@ (class "bind-rr date-time")
+ (name "until"))
(input (@ (type "date")
(value ,(awhen (prop event 'RRULE)
(awhen (rrule:until it)
@@ -404,13 +408,19 @@
`(input (@ (type number) (min 0) (size 4)
(value ,(awhen (prop event 'RRULE)
(or (rrule:count it) "")))
+ (name "count")
+ (class "bind-rr")
)))
((interval)
`(input (@ (type number) (min 0) (size 4)
(value ,(awhen (prop event 'RRULE)
- (or (rrule:interval it) ""))))))
+ (or (rrule:interval it) ""))))
+ (name "interval")
+ (class "bind-rr")
+ ))
((wkst)
- `(select (option "-")
+ `(select (@ (name "wkst") (class "bind-rr"))
+ (option "-")
,@(map (lambda (i)
`(option (@ (value ,i)
,@(awhen (prop event 'RRULE)
@@ -434,7 +444,8 @@
'((selected)) '()))
,(week-day-name i)))
(iota 7)))))))
- `(div (@ (class "input-list"))
+ ;; TODO how does this bind?
+ `(div (@ (class "bind-rr input-list"))
,@(cond ((and=> (prop event 'RRULE)
rrule:byday)
=> (lambda (it) (map input it)))
@@ -468,7 +479,8 @@
((byweekno) 53)
((bymonth) 12)
((bysetpos) 366))))))))
- `(div (@ (class "input-list"))
+ `(div (@ (name ,key)
+ (class "bind-rr input-list"))
,@(map input
(awhen (prop event 'RRULE)
(or ((case key