From 64cd4f554ad4e72568edbdbdd838451a684acf6e Mon Sep 17 00:00:00 2001 From: Mike Mason Date: Thu, 29 Nov 2007 19:22:43 +0000 Subject: html.lua contains the cfe to specific html modules. Took out the table function. html.lua being updated git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@388 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/format.lua | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'lib/format.lua') diff --git a/lib/format.lua b/lib/format.lua index b650ca6..74408ff 100644 --- a/lib/format.lua +++ b/lib/format.lua @@ -82,38 +82,9 @@ end function cfe_unpack ( a ) if type(a) == "table" then value = session.serialize("cfe", a) + value = "
" .. value .. "
" return value end end --- going to build more cfe to html functions below is just seeing what needed to be --- done for a test - ---give a lua table and unpack as html table ---t = { {row1}, {row2} ,options= {border = 2,align="left" } } --- row one could technically be a title for the table ??? or t.title -function table_unpack_html ( t ) - --first need the options - if t.options ~= nil then - for a,b in pairs(t.options) do - if opt == nil then opt = a .. "=" .. "\"" .. b .. "\"" else - opt = opt .. " " .. a .. "=" .. "\"" .. b .. "\"" end - - end - html_table = "" - else - html_table = "
" - end - - for i = 1,table.maxn(t) do - html_table = html_table .. "" - for a,b in ipairs(t[i]) do - html_table = html_table .. "" - end - html_table = html_table .. "" - - end - html_table = html_table .. "
" .. b .. "
" - return html_table -end -- cgit v1.2.3