Module:Side box/sandbox: Difference between revisions

Content deleted Content added
add plainlist= param (default yes) to allow turning off "plainlist" class for text cell
+textclass parameter
Line 40:
if args.image and args.image ~= 'none' then
data.image = args.image
end
-- Classes for "text" cell
data.text_classes = {}
if yesno(args.plainlist) ~= false then
table.insert(data.text_classes, 'plainlist')
end
 
-- Copy over data that doesn'tdoes not need adjusting
local argsToCopy = {
-- Classes
'textclass',
 
-- Styles
'style',
Line 113 ⟶ 110:
end
local textCell = bodyRow:newline():tag('td')
textCell:addClass('mbox-text plainlist')
for i, class in ipairs(data.text_classes or {}) do
textCell:addClass(classdata.textclass or 'plainlist')
end
textCell:addClass('mbox-text')
if data.textstyle then
textCell:cssText(data.textstyle)