Difference between revisions of "Module:Message box"

Jump to navigation Jump to search
341 bytes added ,  16:41, 29 September 2021
>Majavah
>Mainframe98
 
Line 67: Line 67:
args = args or {}
args = args or {}
local obj = {}
local obj = {}
 
obj.boxType = boxType
obj.boxType = boxType


Line 488: Line 488:
))
))
end
end
 
-- Add TemplateStyles
-- Add TemplateStyles
root:wikitext(mw.getCurrentFrame():extensionTag{
root:wikitext(mw.getCurrentFrame():extensionTag{
Line 496: Line 496:


-- Create the box table.
-- Create the box table.
local boxTable = root:tag('table')
local boxTable
-- Check for fmbox because not all interface messages have mw-parser-output
-- which is necessary for TemplateStyles. Add the wrapper class if it is and
-- then start the actual mbox, else start the mbox.
if self.boxType == 'fmbox' then
boxTable = root:tag('div')
:addClass('mw-parser-output')
:tag('table')
else
boxTable = root:tag('table')
end
 
boxTable:attr('id', self.id or nil)
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
for i, class in ipairs(self.classes or {}) do
Anonymous user

Navigation menu