diff options
author | Mike Mason <ms13sp@gmail.com> | 2007-11-29 19:22:43 +0000 |
---|---|---|
committer | Mike Mason <ms13sp@gmail.com> | 2007-11-29 19:22:43 +0000 |
commit | 64cd4f554ad4e72568edbdbdd838451a684acf6e (patch) | |
tree | 93e06f60e47f9dc6fe95106e27c336ec87962ad9 /lib/format.lua | |
parent | a156a6951d673883333d19d5bd73df260451e58a (diff) | |
download | acf-core-64cd4f554ad4e72568edbdbdd838451a684acf6e.tar.bz2 acf-core-64cd4f554ad4e72568edbdbdd838451a684acf6e.tar.xz |
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
Diffstat (limited to 'lib/format.lua')
-rw-r--r-- | lib/format.lua | 31 |
1 files changed, 1 insertions, 30 deletions
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 = "<pre>" .. value .. "</pre>" 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 = "<table " .. opt .. ">" - else - html_table = "<table>" - end - - for i = 1,table.maxn(t) do - html_table = html_table .. "<tr>" - for a,b in ipairs(t[i]) do - html_table = html_table .. "<td>" .. b .. "</td>" - end - html_table = html_table .. "</tr>" - - end - html_table = html_table .. "</table>" - return html_table -end |