Module:Tabs: Difference between revisions

Want an adless experience? Log in or Create an account.
No change in size ,  June 25, 2020
I knew those names would throw me off xD need to think of better ones
(rename a couple functions and add shortcut functions for adding tab+content in 1D scenario)
(I knew those names would throw me off xD need to think of better ones)
Line 48: Line 48:
   -- normalize args so they can just be passed to everything. definitely a bad idea but...
   -- normalize args so they can just be passed to everything. definitely a bad idea but...
   args.selector = getRequiredArg( args, 'contentId', 'TabContainer:addTabLeft' )
   args.selector = getRequiredArg( args, 'contentId', 'TabContainer:addTabLeft' )
   self:tabsLeft( args ):addTab( args )
   self:leftTabs( args ):addTab( args )
   self:addContent( args )
   self:addContent( args )
end
end
Line 55: Line 55:
   -- normalize args so they can just be passed to everything. definitely a bad idea but...
   -- normalize args so they can just be passed to everything. definitely a bad idea but...
   args.selector = getRequiredArg( args, 'contentId', 'TabContainer:addTabTop' )
   args.selector = getRequiredArg( args, 'contentId', 'TabContainer:addTabTop' )
   self:tabsTop( args ):addTab( args )
   self:topTabs( args ):addTab( args )
   self:addContent( args )
   self:addContent( args )
end
end