Content deleted Content added
listnums to local Tag: Reverted |
oy oy oy take a minute for things Tag: Reverted |
||
Line 1:
local p = {}
local navbar = require('Module:Navbar')._navbar
local cfg = mw.loadData('Module:Navbox/configuration')
local getArgs -- lazily initialized
local args
local function striped(wikitext, border)
Line 18 ⟶ 10:
-- by parent navboxes. The result is that the category shows all pages
-- where a child navbox is not contained in a parent navbox.
if border == cfg.keyword.border_subgroup and
-- No change; striping occurs in outermost navbox.
return wikitext ..
end
local first, second = 'odd', 'even'
Line 50 ⟶ 42:
end
end
local regex =
return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer))
end
Line 78 ⟶ 71:
local function renderNavBar(titleCell)
if args.navbar ~= cfg.keyword.navbar_off and
titleCell:wikitext(navbar{
args.name,
Line 91 ⟶ 84:
end
local function renderTitleRow(tbl)
if not args.title then return end
Line 141 ⟶ 131:
:wikitext(processItem(args.title))
end
local function getAboveBelowColspan()
Line 183 ⟶ 169:
end
local function renderListRow(tbl, index, listnum, listnums)
local row = tbl:tag('tr')
Line 196 ⟶ 179:
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '
:cssText(args.imageleftstyle)
:attr('rowspan', #listnums)
Line 217 ⟶ 200:
:addClass(args.groupclass)
:cssText(args.basestyle)
:css('width', args.groupwidth or '1%')
groupCell
Line 248 ⟶ 232:
local listText = args['list' .. listnum]
local oddEven =
if listText:sub(1, 12) == '</div><table' then
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find('<th[^>]*"navbox%-title"') and
end
listCell
:css('padding', '
:cssText(args.liststyle)
:cssText(rowstyle)
Line 263 ⟶ 247:
:addClass(args['list' .. listnum .. 'class'])
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '
:wikitext(processItem(listText, args.nowrapitems))
Line 272 ⟶ 256:
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px')
:css('padding', '
:cssText(args.imagestyle)
:attr('rowspan', #listnums)
Line 280 ⟶ 264:
end
end
local function needsHorizontalLists(border)
if border ==
args.tracking == cfg.keyword.tracking_no then
return false
end
return not (
▲ return not (listClasses[args.listclass] or listClasses[args.bodyclass])
end
Line 347 ⟶ 322:
end
local function renderMainTable(border, listnums)
local tbl = mw.html.create('table')
|