Editing Module:Aligned table
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 39: | Line 39: | ||
colstyle[1] = 'text-align:left;' | colstyle[1] = 'text-align:left;' | ||
colstyle[2] = 'text-align:right;' | colstyle[2] = 'text-align:right;' | ||
− | |||
− | |||
− | |||
− | |||
end | end | ||
for i = 1,cols do | for i = 1,cols do | ||
Line 112: | Line 108: | ||
-- start a new row | -- start a new row | ||
local row = root:tag('tr') | local row = root:tag('tr') | ||
− | + | row:css('vertical-align', 'top') | |
− | + | -- loop over the cells in each row | |
− | |||
− | |||
− | |||
− | -- loop over the cells in | ||
for i=1,cols do | for i=1,cols do | ||
local cell | local cell | ||
Line 134: | Line 126: | ||
elseif args['row' .. tostring(j) .. 'class'] then | elseif args['row' .. tostring(j) .. 'class'] then | ||
cell:addClass(args['row' .. tostring(j) .. 'class']) | cell:addClass(args['row' .. tostring(j) .. 'class']) | ||
− | |||
− | |||
− | |||
− | |||
end | end | ||
if colclass[i] ~= '' then | if colclass[i] ~= '' then | ||
Line 148: | Line 136: | ||
if args['rowstyle' .. tostring(j)] then | if args['rowstyle' .. tostring(j)] then | ||
cell:cssText(args['rowstyle' .. tostring(j)]) | cell:cssText(args['rowstyle' .. tostring(j)]) | ||
− | |||
− | |||
− | |||
− | |||
elseif args['row' .. tostring(j) .. 'style'] then | elseif args['row' .. tostring(j) .. 'style'] then | ||
cell:cssText(args['row' .. tostring(j) .. 'style']) | cell:cssText(args['row' .. tostring(j) .. 'style']) | ||
Line 159: | Line 143: | ||
end | end | ||
end | end | ||
− | cell:wikitext | + | cell:wikitext(args[cols*(j - 1) + i] or '') |
end | end | ||
end | end |