# HG changeset patch # User Daniel Poelzleithner # Date 1286404127 -7200 # Node ID 81dfcfd960ed3dd9d874d84cff54c9c3b120b6bb # Parent e19b0b5c46ba9960e89aed0d5cb9615b2c8b2f99 fix cases where container html attrs could not be set diff -r e19b0b5c46ba -r 81dfcfd960ed framework/env/ui/multiselect.lua --- a/framework/env/ui/multiselect.lua Wed Oct 06 16:14:33 2010 +0200 +++ b/framework/env/ui/multiselect.lua Thu Oct 07 00:28:47 2010 +0200 @@ -2,6 +2,7 @@ ui.multiselect{ name = name, -- HTML name ('html_name' is NOT a valid argument for this function) container_attr = container_attr, -- extra HTML attributes for the container (div) enclosing field and label + container2_attr = container2_attr, -- extra HTML attributes for the container (div) of the real element (in checkbox case only) attr = attr, -- extra HTML attributes for the field label = label, -- text to be used as label for the input field label_attr = label_attr, -- extra HTML attributes for the label @@ -122,9 +123,9 @@ record[args.foreign_name], args.format_options ), - attr = { class = "ui_checkbox_div" }, + attr = args.container2_attr or { class = "ui_checkbox_div" }, label_for = attr.id, - label_attr = { class = "ui_checkbox_label" }, + label_attr = args.label_attr or { class = "ui_checkbox_label" }, content_first = true, content = function() ui.tag{ tag = "input", attr = attr } diff -r e19b0b5c46ba -r 81dfcfd960ed framework/env/ui/paginate.lua --- a/framework/env/ui/paginate.lua Wed Oct 06 16:14:33 2010 +0200 +++ b/framework/env/ui/paginate.lua Thu Oct 07 00:28:47 2010 +0200 @@ -1,10 +1,11 @@ --[[-- ui.paginate{ - selector = selector, -- a selector for items from the database - per_page = per_page, -- items per page, defaults to 10 - name = name, -- name of the CGI get variable, defaults to "page" - page = page, -- directly specify a page, and ignore 'name' parameter - content = function() + selector = selector, -- a selector for items from the database + per_page = per_page, -- items per page, defaults to 10 + container_attr = container_attr -- html attr for the container element + name = name, -- name of the CGI get variable, defaults to "page" + page = page, -- directly specify a page, and ignore 'name' parameter + content = function() ... -- code block which should be encapsulated with page selection links end } @@ -67,7 +68,7 @@ end end ui.container{ - attr = { class = 'ui_paginate' }, + attr = args.container_attr or { class = 'ui_paginate' }, content = function() ui.container{ attr = { class = 'ui_paginate_head ui_paginate_select' },