summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-11-28 16:56:45 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-11-28 16:56:45 -0500
commit01c379cbff1dd59486da18916a49530ea0dd4f87 (patch)
treebd2859407b849d931b71002f26d94e4340f0d5f7 /demo
parent4c85cc245d53261ccbd1b67140024fd54bdedb74 (diff)
Allow any FFI module to declare new HTML tags
Diffstat (limited to 'demo')
-rw-r--r--demo/more/grid.ur26
-rw-r--r--demo/more/grid.urs8
-rw-r--r--demo/more/out/grid.css8
-rw-r--r--demo/subforms.ur6
4 files changed, 24 insertions, 24 deletions
diff --git a/demo/more/grid.ur b/demo/more/grid.ur
index 9691442c..041115e9 100644
--- a/demo/more/grid.ur
+++ b/demo/more/grid.ur
@@ -40,10 +40,10 @@ functor Make(M : sig
val pageLength : option int
end) = struct
- style tabl
- style tr
- style th
- style td
+ style tab
+ style row
+ style header
+ style data
style agg
fun make (row : M.row) [input] [filter] (m : colMeta' M.row input filter) : transaction input = m.Project row
@@ -122,13 +122,13 @@ functor Make(M : sig
M.folder M.cols grid.Cols grid.Filters row
fun render (grid : grid) = <xml>
- <table class={tabl}>
- <tr class={tr}>
+ <table class={tab}>
+ <tr class={row}>
<th/> <th/> <th><button value="No sort" onclick={fn _ => set grid.Sort None}/></th>
{@mapX2 [fst3] [colMeta M.row] [tr]
(fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest]
data (meta : colMeta M.row p) =>
- <xml><th class={th}>
+ <xml><th class={header}>
{case (meta.Handlers data).Sort of
None => txt (meta.Handlers data).Header
| sort => <xml><button value={(meta.Handlers data).Header}
@@ -185,7 +185,7 @@ functor Make(M : sig
cols <- makeAll grid.Cols row';
set colsS cols
in
- <xml><tr class={tr}>
+ <xml><tr class={row}>
<td>
<dyn signal={b <- signal grid.Selection;
return (if b then
@@ -213,18 +213,18 @@ functor Make(M : sig
return (@mapX3 [fst3] [colMeta M.row] [snd3] [_]
(fn [nm :: Name] [t :: (Type * Type * Type)]
[rest :: {(Type * Type * Type)}]
- [[nm] ~ rest] data meta v =>
- <xml><td class={td}>
+ [[nm] ~ rest] dat meta v =>
+ <xml><td class={data}>
<dyn signal={b <- signal ud;
return (if b then
- (meta.Handlers data).Edit v
+ (meta.Handlers dat).Edit v
else
- (meta.Handlers data).Display
+ (meta.Handlers dat).Display
v)}/>
<dyn signal={b <- signal ud;
if b then
valid <-
- (meta.Handlers data).Validate v;
+ (meta.Handlers dat).Validate v;
return (if valid then
<xml/>
else
diff --git a/demo/more/grid.urs b/demo/more/grid.urs
index e47e4139..32f6af15 100644
--- a/demo/more/grid.urs
+++ b/demo/more/grid.urs
@@ -49,9 +49,9 @@ functor Make(M : sig
val showSelection : grid -> source bool
val selection : grid -> signal (list M.row)
- style tabl
- style tr
- style th
- style td
+ style tab
+ style row
+ style header
+ style data
style agg
end
diff --git a/demo/more/out/grid.css b/demo/more/out/grid.css
index 7903b673..3563123b 100644
--- a/demo/more/out/grid.css
+++ b/demo/more/out/grid.css
@@ -1,16 +1,16 @@
-.Grid1_tabl {
+.Grid1_tab {
border-style: solid
}
-.Grid1_th {
+.Grid1_header {
border-style: solid
}
-.Grid1_tr {
+.Grid1_row {
border-style: solid
}
-.Grid1_td {
+.Grid1_data {
border-style: solid
}
diff --git a/demo/subforms.ur b/demo/subforms.ur
index 71bd1e82..62e3cc87 100644
--- a/demo/subforms.ur
+++ b/demo/subforms.ur
@@ -13,7 +13,7 @@ fun sub r =
</body></xml>
end
-fun subforms n =
+fun subfrms n =
if n <= 0 then
<xml/>
else
@@ -22,13 +22,13 @@ fun subforms n =
<hidden{#Num} value={show n}/>
<li>{[n]}: <textbox{#Text}/></li>
</entry>
- {subforms (n - 1)}
+ {subfrms (n - 1)}
</xml>
fun form n = return <xml><body>
<form>
<subforms{#Lines}>
- {subforms n}
+ {subfrms n}
</subforms>
<submit action={sub}/>
</form>