Jump to content

Module:Navbox with collapsible groups: Difference between revisions

m
ce / test?
No edit summary
m (ce / test?)
Line 29: Line 29:
-- process args
-- process args
local passthrough = {
local passthrough = {
['name']=1,['navbar']=1,['state']=1,['border']=1,
['name']=true,['navbar']=true,['state']=true,['border']=true,
['bodyclass']=1,['groupclass']=1,['listclass']=1,
['bodyclass']=true,['groupclass']=true,['listclass']=true,
['style']=1,['bodystyle']=1,['basestyle']=1,
['style']=true,['bodystyle']=true,['basestyle']=true,
['title']=1,['titleclass']=1,['titlestyle']=1,
['title']=true,['titleclass']=true,['titlestyle']=true,
['above']=1,['aboveclass']=1,['abovestyle']=1,
['above']=true,['aboveclass']=true,['abovestyle']=true,
['below']=1,['belowclass']=1,['belowstyle']=1,
['below']=true,['belowclass']=true,['belowstyle']=true,
['image']=1,['imageclass']=1,['imagestyle']=1,
['image']=true,['imageclass']=true,['imagestyle']=true,
['imageleft']=1,['imageleftstyle']=1
['imageleft']=true,['imageleftstyle']=true
}
}
for k,v in pairs(args) do
for k,v in pairs(args) do
Line 52: Line 52:
or k:match('^sect[0-9][0-9]*$')  
or k:match('^sect[0-9][0-9]*$')  
or k:match('^section[0-9][0-9]*$') ) then
or k:match('^section[0-9][0-9]*$') ) then
local n = mw.ustring.gsub(k, '^[a-z]*([0-9]*)$', '%1')
local n = mw.ustring.gsub(k, '^[a-z]*([0-9]*)$', '%1') or 1
if targs['list' .. n] == nil then
if targs['list' .. n] == nil then
local titlestyle = concatstyles(
local titlestyle = concatstyles(
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.