Modul:Message box: Unterschied zwischen den Versionen
StadtbahnBI>Majavah per request Special:Permalink/4730320 |
Tt (Diskussion | Beiträge) K 1 Version importiert |
||
| (3 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 67: | Zeile 67: | ||
args = args or {} | args = args or {} | ||
local obj = {} | local obj = {} | ||
obj.boxType = boxType | obj.boxType = boxType | ||
| Zeile 488: | Zeile 488: | ||
)) | )) | ||
end | end | ||
-- Add TemplateStyles | -- Add TemplateStyles | ||
root:wikitext(mw.getCurrentFrame():extensionTag{ | root:wikitext(mw.getCurrentFrame():extensionTag{ | ||
| Zeile 496: | Zeile 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 | ||