Modulo:Grafico epidemia: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m Commenti |
dalla sandbox: 1) Usa classe per padding, 2) Non costruire elementi vuoti |
||
Riga 340:
output[2] =
'<td ' .. (args.note1 and '' or 'colspan="2" ') ..
'
'⋮'..
'</td>\n'
Riga 346:
output[2] =
'<td ' .. (args.note1 and '' or 'colspan="2" ') ..
'
mw.text.trim(lang:formatDate("d-m-Y", args[1]) or '') ..
'</td>\n'
Riga 353:
if args.note1 and args.note1 ~= '' then
output[3] =
'<td
args.note1 ..
'</td>\n'
Riga 362:
output[4] = '<td style="border-left:1px solid silver; border-right:1px solid silver">\n'
for i=1,5,1 do
width = mw.text.trim(args[(2*i) + 2] or '0');
output[i+4] = ▼
if width ~= '0' then
output[i+4] = '<div' .. (args['title' .. i] and (' title=' .. args['title' .. i]) or '') .. ' style="background:' .. (args[(2*i) + 1] or 'gray') ..
'; float:left; overflow:hidden; width:' ..
'​' ..
'</div>\n'
else
▲ output[i+4] = '';
end
end
Line 375 ⟶ 380:
output[11] =
'<td ' .. (args.note2 and '' or 'colspan="2" ') ..
'
mw.text.trim(args[2] or '') ..
'</td>\n'
Line 381 ⟶ 386:
if args.note2 and args.note2 ~= '' then
output[12] =
'<td
args.note2 ..
'</td>\n'
|