Module:ColPollTable: Difference between revisions

Content deleted Content added
may be null
wrap in scrollbox
Line 105:
 
function p._main(args)
local ret = mw.html.create('div'):css('overflow', 'auto')
-- return table
local retroot = mw.html.createret:tag('table')
:addClass('wikitable')
:css({ ['font-size'] = '90%',
Line 113 ⟶ 114:
-- header
local header_row = retroot:tag('tr'):tag('th'):done()
for _, v in ipairs(args.weeks) do
Line 124 ⟶ 125:
for i=1,args.max_sub do
local cur_row = retroot:tag('tr')
cur_row:tag('th'):wikitext(i..'.'):done()
for _, v in ipairs(args.weeks) do
Line 135 ⟶ 136:
-- footer
local footer_row = retroot:tag('tr'):tag('th'):done()
for _, v in ipairs(args.weeks) do
Line 146 ⟶ 147:
-- drop outs
local dropped_row = retroot:tag('tr')
dropped_row:tag('td'):attr('colspan','2'):css({ background = 'transparent', ['border-bottom-style'] = 'hidden', ['border-left-style'] = 'hidden' }):done()