Module:Infobox: Difference between revisions

m
Fix hidden bug
(Hide dropdown buttons)
m (Fix hidden bug)
Line 427:
-- Create all the buttons
for version=1, self.versions do
local button = buttons:tag('span')
:attr('data-switch-index', version)
:attr('data-switch-anchor', '#'..self.version_names[version])
Line 434:
-- In case of dropdown list, hide the buttons as the switch gadget will convert them to a dropdown list - we can't directly create the dropdown list here as the select/option tags are rejected by wikitext
if self.versions > self.max_buttons then
buttonsbutton:addClass('hidden')
end
end