Module:Navbox with collapsible groups: Difference between revisions

m
(problem found: Module:Navbox is not re-entry safe due to listnums not being reset)
 
(3 intermediate revisions by 2 users not shown)
Line 1:
-- This module implements {{Navbox with collapsible groups}}
require('Module:No globals')
local q = {}
local Navbox = require('Module:Navbox/sandbox')._navbox
 
-- helper functions
Line 70 ⟶ 69:
and 'uncollapsed' or pargs['state' .. n] or 'collapsed'
targs['list' .. n] = Navbox._navbox(
{'child', navbar = 'plain', state = state,
basestyle = pargs['basestyle'],
Line 83 ⟶ 82:
end
end
-- ordering of style and bodystyle
 
targs['style'] = concatstyles({targs['style'] or '', targs['bodystyle'] or ''})
targs['bodystyle'] = nil
-- child or subgroup
if targs['border'] == nil then targs['border'] = pargs[1] end
 
return Navbox._navbox(targs)
end