webmcp

diff framework/env/ui/paginate.lua @ 35:81dfcfd960ed

fix cases where container html attrs could not be set
author Daniel Poelzleithner <poelzi@poelzi.org>
date Thu Oct 07 00:28:47 2010 +0200 (2010-10-07)
parents d76a8857ba62
children 17435a7d252b
line diff
     1.1 --- a/framework/env/ui/paginate.lua	Wed Oct 06 16:14:33 2010 +0200
     1.2 +++ b/framework/env/ui/paginate.lua	Thu Oct 07 00:28:47 2010 +0200
     1.3 @@ -1,10 +1,11 @@
     1.4  --[[--
     1.5  ui.paginate{
     1.6 -  selector = selector,  -- a selector for items from the database
     1.7 -  per_page = per_page,  -- items per page, defaults to 10
     1.8 -  name     = name,      -- name of the CGI get variable, defaults to "page"
     1.9 -  page     = page,      -- directly specify a page, and ignore 'name' parameter
    1.10 -  content = function()
    1.11 +  selector            = selector,        -- a selector for items from the database
    1.12 +  per_page            = per_page,        -- items per page, defaults to 10
    1.13 +  container_attr      = container_attr   -- html attr for the container element
    1.14 +  name                = name,            -- name of the CGI get variable, defaults to "page"
    1.15 +  page                = page,            -- directly specify a page, and ignore 'name' parameter
    1.16 +  content             = function()
    1.17      ...                 -- code block which should be encapsulated with page selection links
    1.18    end
    1.19  }
    1.20 @@ -67,7 +68,7 @@
    1.21      end
    1.22    end
    1.23    ui.container{
    1.24 -    attr = { class = 'ui_paginate' },
    1.25 +    attr = args.container_attr or { class = 'ui_paginate' },
    1.26      content = function()
    1.27        ui.container{
    1.28          attr = { class = 'ui_paginate_head ui_paginate_select' },

Impressum / About Us