Jump to content

Module:Aligned table: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 49: Line 49:
i = math.fmod(k-1,cols) + 1
i = math.fmod(k-1,cols) + 1
local j = (k - i) / cols + 1
local j = (k - i) / cols + 1
local tdstyle = ''
if args['class' .. tostring(j) .. '.' .. tostring(i)] then
if args['class' .. tostring(j) .. '.' .. tostring(i)] then
entries[ k ] = '<td class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>'
tdstyle = tdstyle .. ' class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '"'
else
elseif colclass[i] ~= '' then
entries[ k ] = '<td class="' .. colclass[i] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>'
tdstyle = tdstyle .. ' class="' .. colclass[i] .. '"'
end
end
if args['style' .. tostring(j) .. '.' .. tostring(i)] then
tdstyle = tdstyle .. ' style="' .. args['style' .. tostring(j) .. '.' .. tostring(i)] .. '"'
elseif colstyle[i] ~= '' then
tdstyle = tdstyle .. ' style="' .. colstyle[i] .. '"'
end
entries[ k ] = '<td' .. tdstyle .. '>' .. v .. '</td>'
if i == 1 then
if i == 1 then
entries[ k ] = '<tr style="vertical-align:top">' .. entries[ k ]
entries[ k ] = '<tr style="vertical-align:top">' .. entries[ k ]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.