webmcp
annotate framework/env/ui/partial.lua @ 11:d76a8857ba62
Added ui.partial and other functions, which allow partial content replacement using XMLHttpRequests; Image support for ui.link
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
author | jbe/bsw |
---|---|
date | Fri Feb 12 18:40:22 2010 +0100 (2010-02-12) |
parents | |
children | f3d3203cd2e4 |
rev | line source |
---|---|
jbe/bsw@11 | 1 --[[-- |
jbe/bsw@11 | 2 ui.partial{ |
jbe/bsw@11 | 3 module = |
jbe/bsw@11 | 4 view = |
jbe/bsw@11 | 5 id = |
jbe/bsw@11 | 6 params = |
jbe/bsw@11 | 7 target = |
jbe/bsw@11 | 8 content = function() |
jbe/bsw@11 | 9 ... -- |
jbe/bsw@11 | 10 end |
jbe/bsw@11 | 11 } |
jbe/bsw@11 | 12 |
jbe/bsw@11 | 13 TODO: documentation |
jbe/bsw@11 | 14 |
jbe/bsw@11 | 15 --]]-- |
jbe/bsw@11 | 16 |
jbe/bsw@11 | 17 function ui.partial(args) |
jbe/bsw@11 | 18 local old_state = ui._partial_state |
jbe/bsw@11 | 19 ui._partial_state = table.new(args) |
jbe/bsw@11 | 20 ui._partial_state.param_name_hash = {} |
jbe/bsw@11 | 21 if args.param_names then |
jbe/bsw@11 | 22 ui.add_partial_param_names(args.param_names) |
jbe/bsw@11 | 23 end |
jbe/bsw@11 | 24 args.content() |
jbe/bsw@11 | 25 ui._partial_state = old_state |
jbe/bsw@11 | 26 end |