17,273
edits
(remove old classes) |
(implement default content and tabs) |
||
Line 74: | Line 74: | ||
return setmetatable( { | return setmetatable( { | ||
selection = getRequiredArg( args, 1, 'Tab.new' ), | selection = getRequiredArg( args, 1, 'Tab.new' ), | ||
label = args[2] or args[1] | label = args[2] or args[1], | ||
args = args | |||
}, Tab ) | }, Tab ) | ||
end | end | ||
Line 83: | Line 84: | ||
:attr( 'data-tab-selection', self.selection:gsub( "%s", "" ) ) | :attr( 'data-tab-selection', self.selection:gsub( "%s", "" ) ) | ||
:wikitext( self.label ) | :wikitext( self.label ) | ||
if self.args.default then | |||
tab:attr( 'data-tab-default', true ) | |||
end | |||
return tostring( tab ) | return tostring( tab ) | ||
Line 103: | Line 108: | ||
:attr( 'data-tab-content', self.contentId ) | :attr( 'data-tab-content', self.contentId ) | ||
:wikitext( self.content ) | :wikitext( self.content ) | ||
if self.args.default then | |||
content:addClass( 'default' ) | |||
end | |||
if self.args.width then | if self.args.width then |