webmcp
diff framework/env/ui/link.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 | d76a8857ba62 |
line diff
1.1 --- a/framework/env/ui/link.lua Thu Dec 10 12:00:00 2009 +0100 1.2 +++ b/framework/env/ui/link.lua Fri Dec 25 12:00:00 2009 +0100 1.3 @@ -9,7 +9,7 @@ 1.4 params = params, -- optional parameters to be passed to the view or action 1.5 routing = routing, -- optional routing information for action links, as described for ui.form{...} 1.6 text = text, -- link text 1.7 - content = content -- alternative name for 'text' option, preferred for functions 1.8 + content = content -- link content (overrides link text, except for submit buttons for action calls without JavaScript) 1.9 } 1.10 1.11 This function inserts a link into the active slot. It may be either an internal application link ('module' given and 'view' or 'action' given), or a link to an external web page ('external' given), or a link to a file in the static file directory of the application ('static' given). 1.12 @@ -18,7 +18,7 @@ 1.13 1.14 function ui.link(args) 1.15 local args = args or {} 1.16 - local content = args.text or args.content -- TODO: decide which argument name to use 1.17 + local content = args.content or args.text 1.18 assert(content, "ui.link{...} needs a text.") 1.19 local function wrapped_content() 1.20 -- TODO: icon/image