Module:Infobox: Difference between revisions
Content added Content deleted
(fixed) |
(simplify (tested in sandbox)) |
||
Line 113: | Line 113: | ||
end |
end |
||
elseif rowArgs.data then |
elseif rowArgs.data then |
||
⚫ | |||
⚫ | |||
⚫ | |||
local row = root:tag('tr') |
local row = root:tag('tr') |
||
row:addClass(rowArgs.rowclass) |
row:addClass(rowArgs.rowclass) |
||
Line 231: | Line 234: | ||
local rownums = union(getArgNums('header'), getArgNums('data')) |
local rownums = union(getArgNums('header'), getArgNums('data')) |
||
table.sort(rownums) |
table.sort(rownums) |
||
local row_style |
|||
for k, num in ipairs(rownums) do |
for k, num in ipairs(rownums) do |
||
local dval = args['data' .. tostring(num)] |
|||
row_style = args['rowstyle' .. tostring(num)] |
|||
if args['header' .. tostring(num)] then |
|||
row_style = args['rowstyle' .. tostring(num)] |
|||
elseif dval and |
|||
⚫ | |||
then |
|||
row_style = args['rowstyle' .. tostring(num)] |
|||
else |
|||
⚫ | |||
⚫ | |||
addRow({ |
addRow({ |
||
header = args['header' .. tostring(num)], |
header = args['header' .. tostring(num)], |
||
Line 251: | Line 242: | ||
class = args['class' .. tostring(num)], |
class = args['class' .. tostring(num)], |
||
rowclass = args['rowclass' .. tostring(num)], |
rowclass = args['rowclass' .. tostring(num)], |
||
rowstyle = |
rowstyle = args['rowstyle' .. tostring(num)], |
||
rowcellstyle = args['rowcellstyle' .. tostring(num)], |
rowcellstyle = args['rowcellstyle' .. tostring(num)], |
||
dataid = args['dataid' .. tostring(num)], |
dataid = args['dataid' .. tostring(num)], |