webmcp

diff framework/env/ui/paginate.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.
author jbe/bsw
date Fri Feb 12 18:40:22 2010 +0100 (2010-02-12)
parents f02e14d1e69e
children 81dfcfd960ed
line diff
     1.1 --- a/framework/env/ui/paginate.lua	Wed Feb 03 00:57:18 2010 +0100
     1.2 +++ b/framework/env/ui/paginate.lua	Fri Feb 12 18:40:22 2010 +0100
     1.3 @@ -46,13 +46,22 @@
     1.4          if current_page == page then
     1.5            attr.class = "active"
     1.6          end
     1.7 +        local partial
     1.8 +        if ui.is_partial_loading_enabled() then
     1.9 +          partial = {
    1.10 +            params = {
    1.11 +              [name] = tostring(page)
    1.12 +            }
    1.13 +          }
    1.14 +        end
    1.15          ui.link{
    1.16 -          attr = attr,
    1.17 +          attr   = attr,
    1.18            module = request.get_module(),
    1.19            view   = request.get_view(),
    1.20            id     = id,
    1.21            params = params,
    1.22 -          text   = tostring(page)
    1.23 +          text   = tostring(page),
    1.24 +          partial = partial
    1.25          }
    1.26        end
    1.27      end

Impressum / About Us