Module:Message box: Difference between revisions

Jump to navigation Jump to search
add back in local pmbox logic
m (1 revision imported)
enws>Xover
(add back in local pmbox logic)
Line 87: Line 87:
elseif ns == 14 then
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.cfg = cfg.cmbox -- category namespace
elseif ns == 104 then
obj.cfg = cfg.pmbox -- page namespace
else
else
local nsTable = mw.site.namespaces[ns]
local nsTable = mw.site.namespaces[ns]
Line 188: Line 190:
-- Set text style.
-- Set text style.
self.textstyle = args.textstyle
self.textstyle = args.textstyle
-- Set image classes.
self.imageRightClass = args.imagerightclass or args.imageclass
self.imageLeftClass = args.imageleftclass or args.imageclass


-- Find if we are on the template page or not. This functionality is only
-- Find if we are on the template page or not. This functionality is only
Line 519: Line 525:
imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div')
imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div')
end
end
imageLeftCell:wikitext(self.imageLeft or nil)
imageLeftCell
:addClass(self.imageLeftClass)
:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- Some message boxes define an empty cell if no image is specified, and
Line 574: Line 582:
end
end
imageRightCell
imageRightCell
:addClass(self.imageRightClass)
:wikitext(self.imageRight or nil)
:wikitext(self.imageRight or nil)
end
end
Anonymous user

Navigation menu