Editing Module:Infobox
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 448: | Line 448: | ||
-- Create all the buttons |
-- Create all the buttons |
||
for version=1, self.versions do |
for version=1, self.versions do |
||
buttons:tag('span') |
|||
:attr('data-switch-index', version) |
:attr('data-switch-index', version) |
||
:attr('data-switch-anchor', '#'..self.version_names[version]) |
:attr('data-switch-anchor', '#'..self.version_names[version]) |
||
Line 455: | Line 455: | ||
-- 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 |
-- 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 |
if self.versions > self.max_buttons then |
||
buttons:addClass('hidden') |
|||
end |
end |
||
end |
end |