Modulo:Discendenza/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
Nessun oggetto della modifica
Riga 194:
local function mostraX(pid,allinea,largo,dida)
local xy = massimoXY(pid, {0, 0})
local p1,posx p2,= p3{}
local n1
local s1,riga s2,= s3{}
local xx, xp
if (allinea == 'destra') then
Riga 207:
if (lg == 0) then lg = 1 end
for n=1,xy[2] do
p1riga[1] = 0{}; p2riga[2] = 0{}; p3riga[3] = 0{}
posx[1] = 0; posx[2] = 0; posx[3] = 0
n1 = 0
if table.insert(n==riga[1) then s1 = ],string.format('<tr%s>',n>1 else s1 =and '<tr style="line-height:8px">' endor ''))
s2 = table.insert(riga[2],'<tr>')
if table.insert(riga[3],string.format('<tr%s>',n<xy[2]) then s3 =and '<tr style="line-height:8px">' else s3 =or '' end))
for _, v in pairs(tabella[n]) do
xx = pers[v].x
xp = pers[v].padre
if (n>==1) then
 
xstr = format.string('<td width=%d%%></td>',lg)
if (n>1) then
else
s1 = s1..'<td style="border-right:1px solid #000'
if (n1xstr == xp) then s1format.string('<td style= s1 ..';"border-topright:1px solid #000%s%s">&nbsp;</td>' end,
s1 n1==xp s1..'<tdand style="';border-righttop:1px solid #000' or '',
if ( xx-p1posx[1]>0) thenand s1 = s1..'" colspan="'..(xx+1-p1posx[1]) or end''
)
n1 = xp
p1posx[1] = xx + 1
if (xx-p1>0) then s1 = s1..'" colspan="'..(xx+1-p1) end
p1 = xx + 1
s1 = s1 .. '">&nbsp;</td>'
else
for m=1,(xy[1]+2) do s1 = s1..'<td width='..lg..'%></td>' end
end
table.insert(riga[1],xstr)
 
if (xx-p2posx[2]>0) then
table.insert(riga[2],format.string('<td%s>&nbsp;</td>',xx-posx[2]>1 and 'colspan="'..(xx-posx[2])..'"' or ''))
s2 = s2..'<td'
if (xx-p2>1) then s2 = s2..' colspan="'..(xx-p2)..'"' end
s2 = s2..'>&nbsp;</td>'
end
s2 = s2.table.insert(riga[2],'<td colspan=2>'..pers[v].testo..'<br/>')
if (pers[v].nota == '-') then else s2 = s2.table.insert(riga[2],'<br/><span style="font-size:90%"><i>'..pers[v].nota..'</i></span>') end
s2 = s2.table.insert(riga[2],'</td>')
p2posx[2] = xx + 2
 
if (n<xy[2]) then
if (#pers[v].figli > 0) then
s3 = s3.table.insert(riga[3],'<td style="border-right: 1px solid #000%s">&nbsp;</td>',
if ( xx-p3posx[3]>0) thenand s3 = s3..'" colspan="'..(xx+1-p3posx[3]) end
p3 = xx + 1)
s3posx[3] = s3xx .. '">&nbsp;</td>'+ 1
end
end
end
 
s1 = s1.table.insert(riga[1],'</tr>')
s2 = s2.table.insert(riga[2],'</tr>')
if (n<xy[2]) then s3 = s3.table.insert(riga[3],'</tr>') end
 
agg(s1);aggtable.concat(s2riga[1]);agg(s3)
agg(table.concat(riga[2]))
agg(table.concat(riga[3]))
end