"ମଡ୍ୟୁଲ:Message box" ପୃଷ୍ଠାର ସଂସ୍କରଣଗୁଡ଼ିକ ମଧ୍ୟରେ ତଫାତ
Content deleted Content added
change the smalltext logic to work with collapsible text fields |
remove the presentButBlank function, fix bug with blank date values, and trim whitespace from all arguments |
||
୧୩ କ ଧାଡ଼ି:
local tinsert = table.insert
local tconcat = table.concat
local trim = mw.text.trim
local box = {}
Line ୨୪ ⟶ ୨୫:
return title
end
end▼
if type(s) ~= 'string' then return end▼
return true▼
end
end
Line ୨୧୯ ⟶ ୨୧୧:
self.issue = args.smalltext
else
local
if
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. sect
else▼
sect = nil▼
end
local issue = args.issue
Line ୨୪୦ ⟶ ୨୩୦:
-- Get the self.talk value.
local talk = args.talk
if
talk = '#'
end
Line ୨୬୭ ⟶ ୨୫୭:
-- Get other values.
self.fix = args.fix
self.date =
self.date = lang:formatDate('F Y')
end
Line ୫୩୬ ⟶ ୫୨୬:
-- assume args are being passed directly in from the debug console
-- or from another Lua module.
local
if frame == mw.getCurrentFrame() then
for k, v in pairs(frame.args) do
break
end
else
▲ end
-- Trim whitespace.
local args = {}
for k, v in pairs(origArgs) do
end
return makeBox(boxType, args)
|