liquid_feedback_frontend

annotate env/ui/box_row.lua @ 211:4993b71b383f

First checkin of lf2 (frontend second generation) prototype
author bsw
date Wed Mar 02 20:06:26 2011 +0100 (2011-03-02)
parents
children 1dab81353eb1
rev   line source
bsw@211 1 function ui.box_row(args)
bsw@211 2 app.ui_box_col = 1
bsw@211 3 local class = "row"
bsw@211 4 if args.class then class = class .. " " .. args.class end
bsw@211 5 if app.ui_box_row == 1 then class = class .. " first" end
bsw@211 6 if app.ui_box_row == app.ui_box_row_count then class = class .. " last" end
bsw@211 7 if args.toggle_content then class = class .. " toggled" end
bsw@211 8 ui.container{ attr = { class = class }, content = function()
bsw@211 9 if args.toggle_content then
bsw@211 10 ui.container{ attr = { class = "col toggle"}, content = function()
bsw@211 11 if type(args.toggle_content) == "function" then
bsw@211 12 args.toggle_content()
bsw@211 13 else
bsw@211 14 slot.put(encode.html(args.toggle_content))
bsw@211 15 end
bsw@211 16 end }
bsw@211 17 end
bsw@211 18 if type(args.content) == "function" then
bsw@211 19 args.content()
bsw@211 20 else
bsw@211 21 slot.put(encode.html(args.content))
bsw@211 22 end
bsw@211 23 end }
bsw@211 24 app.ui_box_row = app.ui_box_row + 1
bsw@211 25 end

Impressum / About Us