Mercurial > urweb
comparison src/cjr_print.sml @ 1111:e1d738870086
JavaScript urlification; more lenient export pattern in Corify; only include scripts in pages that use JavaScript
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 Jan 2010 14:54:15 -0500 |
parents | 7fc4e0087e50 |
children | 7a31e0cf25e9 |
comparison
equal
deleted
inserted
replaced
1110:7fc4e0087e50 | 1111:e1d738870086 |
---|---|
2589 string "uw_set_script_header(ctx, \"", | 2589 string "uw_set_script_header(ctx, \"", |
2590 let | 2590 let |
2591 val scripts = | 2591 val scripts = |
2592 case side of | 2592 case side of |
2593 ServerOnly => "" | 2593 ServerOnly => "" |
2594 | _ => "<script src=\\\"" | 2594 | _ => |
2595 ^ OS.Path.joinDirFile {dir = Settings.getUrlPrefix (), | 2595 let |
2596 file = "app.js"} | 2596 val scripts = |
2597 ^ "\\\"></script>\\n" | 2597 "<script src=\\\"" |
2598 | 2598 ^ OS.Path.joinDirFile {dir = Settings.getUrlPrefix (), |
2599 val scripts = foldl (fn (x, scripts) => | 2599 file = "app.js"} |
2600 scripts | 2600 ^ "\\\"></script>\\n" |
2601 ^ "<script src=\\\"" ^ x ^ "\\\"></script>\\n") | 2601 in |
2602 scripts (Settings.getScripts ()) | 2602 foldl (fn (x, scripts) => |
2603 scripts | |
2604 ^ "<script src=\\\"" ^ x ^ "\\\"></script>\\n") | |
2605 scripts (Settings.getScripts ()) | |
2606 end | |
2603 in | 2607 in |
2604 string scripts | 2608 string scripts |
2605 end, | 2609 end, |
2606 string "\");", | 2610 string "\");", |
2607 newline]), | 2611 newline]), |