Mercurial > urweb
comparison src/monoize.sml @ 901:f17638dd3080
dlist row add working with Konqueror
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Aug 2009 14:24:40 -0400 |
parents | 25a038a9194b |
children | 63114a2e5075 |
comparison
equal
deleted
inserted
replaced
900:ed381288ce9a | 901:f17638dd3080 |
---|---|
2642 loc), | 2642 loc), |
2643 SOME (L.EFfiApp ("Basis", "get_script", [(L.ERecord [], loc)]), loc)) | 2643 SOME (L.EFfiApp ("Basis", "get_script", [(L.ERecord [], loc)]), loc)) |
2644 end | 2644 end |
2645 | 2645 |
2646 | "dyn" => | 2646 | "dyn" => |
2647 (case attrs of | 2647 let |
2648 [("Signal", e, _)] => | 2648 val inTable = case targs of |
2649 ((L'.EStrcat | 2649 (L.CRecord (_, ctx), _) :: _ => |
2650 ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">dyn(")), loc), | 2650 List.exists (fn ((L.CName "Table", _), _) => true |
2651 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), | 2651 | _ => false) ctx |
2652 (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc), | 2652 | _ => false |
2653 fm) | 2653 |
2654 | _ => raise Fail "Monoize: Bad dyn attributes") | 2654 val tag = if inTable then |
2655 "table" | |
2656 else | |
2657 "span" | |
2658 in | |
2659 case attrs of | |
2660 [("Signal", e, _)] => | |
2661 ((L'.EStrcat | |
2662 ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">dyn(\"" | |
2663 ^ tag ^ "\", ")), loc), | |
2664 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), | |
2665 (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc), | |
2666 fm) | |
2667 | _ => raise Fail "Monoize: Bad dyn attributes" | |
2668 end | |
2655 | 2669 |
2656 | "submit" => normal ("input type=\"submit\"", NONE, NONE) | 2670 | "submit" => normal ("input type=\"submit\"", NONE, NONE) |
2657 | "button" => normal ("input type=\"submit\"", NONE, NONE) | 2671 | "button" => normal ("input type=\"submit\"", NONE, NONE) |
2658 | "hidden" => input "hidden" | 2672 | "hidden" => input "hidden" |
2659 | 2673 |