Editing Module:Aligned table
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish 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 116: | Line 112: | ||
else | else | ||
row:css('vertical-align', 'top') | row:css('vertical-align', 'top') | ||
end | end | ||
-- loop over the cells in the row | -- loop over the cells in the row | ||
if showrow then | |||
for i=1,cols do | for i=1,cols do | ||
local cell | local cell | ||
Line 137: | Line 131: | ||
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 151: | Line 141: | ||
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 163: | Line 149: | ||
end | end | ||
cell:wikitext(mw.ustring.gsub(args[cols*(j - 1) + i] or '', '^(.-)%s*$', '%1') or '') | cell:wikitext(mw.ustring.gsub(args[cols*(j - 1) + i] or '', '^(.-)%s*$', '%1') or '') | ||
end | |||
end | end | ||
end | end |