Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
track titlegroup; search doesn't think these exist meaningfully anymore
remove titlegroup
Line 98:
 
local titleRow = tbl:tag('tr')
 
if args[cfg.arg.titlegroup] then
titleRow
:tag('th')
:attr('scope', 'row')
:addClass(cfg.class.navbox_group)
:addClass(args[cfg.arg.titlegroupclass])
:cssText(args[cfg.arg.basestyle])
:cssText(args[cfg.arg.groupstyle])
:cssText(args[cfg.arg.titlegroupstyle])
:wikitext(args[cfg.arg.titlegroup])
end
 
local titleCell = titleRow:tag('th'):attr('scope', 'col')
 
if args[cfg.arg.titlegroup] then
titleCell
:css('border-left', '2px solid #fdfdfd')
:css('width', '100%')
end
 
local titleColspan = 2
if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end
if args[cfg.arg.image] then titleColspan = titleColspan + 1 end
if args[cfg.arg.titlegroup] then titleColspan = titleColspan - 1 end
 
titleCell
Line 287 ⟶ 268:
cfg.arg.bodyclass, cfg.arg.listclass, cfg.arg.aboveclass,
cfg.arg.belowclass, cfg.arg.titleclass, cfg.arg.navboxclass,
cfg.arg.groupclass, cfg.arg.titlegroupclass, cfg.arg.imageclass
}
local patterns = {
Line 319 ⟶ 300:
return true
end
end
return false
end
 
local function hasTitleGroup()
if args[cfg.arg.titlegroup] and args[cfg.arg.titlegroup] ~= '' then
return true
end
return false
Line 358 ⟶ 332:
if isIllegible() then table.insert(cats, cfg.category.illegible) end
if hasBorders() then table.insert(cats, cfg.category.borders) end
if hasTitleGroup() then table.insert(cats, cfg.category.titlegroup) end
return cats
end