webmcp
diff framework/env/ui/script.lua @ 4:5e32ef998acf
Version 1.0.4
ui.link{...} with POST target can now be parameterized with BOTH content and text to allow HTML content for JavaScript browsers and a text-only version for accessiblity
Changes related to database selectors:
- Support for row-based locking
- New method :count(), caching and returning the number of rows, which WOULD have been returned by :exec()
- Bugfix: WHERE and HAVING expressions are now enclosed in parenthesis to avoid problems with operator precedence
ui.script{...} now supports external .js files
Changes in langtool.lua to cope with escaped new-line chars (\n)
ui.link{...} with POST target can now be parameterized with BOTH content and text to allow HTML content for JavaScript browsers and a text-only version for accessiblity
Changes related to database selectors:
- Support for row-based locking
- New method :count(), caching and returning the number of rows, which WOULD have been returned by :exec()
- Bugfix: WHERE and HAVING expressions are now enclosed in parenthesis to avoid problems with operator precedence
ui.script{...} now supports external .js files
Changes in langtool.lua to cope with escaped new-line chars (\n)
author | jbe/bsw |
---|---|
date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) |
parents | 9fdfb27f8e67 |
children | 64f4540ce88c |
line diff
1.1 --- a/framework/env/ui/script.lua Thu Dec 10 12:00:00 2009 +0100 1.2 +++ b/framework/env/ui/script.lua Fri Dec 25 12:00:00 2009 +0100 1.3 @@ -26,10 +26,17 @@ 1.4 slot.put(args.script) 1.5 end 1.6 end 1.7 + if args.external then 1.8 + attr.src = encode.url{ external = args.external } 1.9 + elseif args.static then 1.10 + attr.src = encode.url{ static = args.static } 1.11 + end 1.12 if noscript then 1.13 ui.tag{ tag = "noscript", attr = attr, content = noscript } 1.14 end 1.15 - if script then 1.16 + if attr.src then 1.17 + ui.tag{ tag = "script", attr = attr, content = "" } 1.18 + elseif script then 1.19 ui.tag{ tag = "script", attr = attr, content = script } 1.20 end 1.21 end