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 | ||
tdstyle = tdstyle .. ' class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '"' | |||
elseif colclass[i] ~= '' then | |||
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 ] |