aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 14:24:40 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 14:24:40 -0400
commite5346fa5af27c6546bdbb3d9de6180b07aa0195e (patch)
tree8539a9b6f15a96a49a991341b0a0265d02f64e78 /src
parent5f026ccb992d9737e1af05362849ff72faa2172c (diff)
dlist row add working with Konqueror
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index f0491198..bd666edf 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -2644,14 +2644,28 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
end
| "dyn" =>
- (case attrs of
- [("Signal", e, _)] =>
- ((L'.EStrcat
- ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">dyn(")), loc),
- (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc),
- (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc),
- fm)
- | _ => raise Fail "Monoize: Bad dyn attributes")
+ let
+ val inTable = case targs of
+ (L.CRecord (_, ctx), _) :: _ =>
+ List.exists (fn ((L.CName "Table", _), _) => true
+ | _ => false) ctx
+ | _ => false
+
+ val tag = if inTable then
+ "table"
+ else
+ "span"
+ in
+ case attrs of
+ [("Signal", e, _)] =>
+ ((L'.EStrcat
+ ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">dyn(\""
+ ^ tag ^ "\", ")), loc),
+ (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc),
+ (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc),
+ fm)
+ | _ => raise Fail "Monoize: Bad dyn attributes"
+ end
| "submit" => normal ("input type=\"submit\"", NONE, NONE)
| "button" => normal ("input type=\"submit\"", NONE, NONE)