Modulo:TeamBracket: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
non aggiungo righe che rimangono vuote a causa di bye
Moroboshi (discussione | contributi)
fix uso getWidth
Riga 100:
style.header_cell = self.args.style_header or style.header_cell
style.header_third_place = self.args.style_header_third_place or style.header_third_place
style.seed_width = self:getWidth('seed', style.seed_width)
style.team_width = self:getWidth('team', style.team_width)
style.score_width = self:getWidth('score', style.score_width)
-- set default seeds for round 1
if not(self.hideSeeds) then
Line 175 ⟶ 178:
function TeamBracket:getWidth(param, default)
local arg = self.args[param .. '-width']
if not arg or arg == '' then arg =return default end
ifarg = arg .. ((tonumber(arg) ~=and nil'px') thenor '')
arg = arg .. 'px'
end
return arg
end
Line 398 ⟶ 399:
local seedArg2 = self:getTeamArg(self.current_round, 'seed', team_number2)
local showSeed = self.showSeeds
or (seedArg1 and seedArg1 =~= '-')
or (seedArg2 and seedArg2 =~= '-')
if self.bold_winner then
winner, score_results = self:getWinner(team_number1)
Line 409 ⟶ 410:
 
--[[ ===============================================================================
TracciaDisegna la finale prper il terzo posto
--row: riga in cui iniziare a disegnare la finale
===============================================================================]]
Line 519 ⟶ 520:
end
 
--[[ ===============================================================================
Disegna le righe di testata del template
===============================================================================]]
function TeamBracket:renderHeading()
local titleRow = self.tbl:tag('tr')
Line 538 ⟶ 542:
:newline()
if not self.hideSeeds then
widthRow:tag('td'):css('width', self:getWidth('seed', style.score_width)seed_width):wikitext(debug and row_count or blank_text)
row_count = row_count + 1
end
teamCell = widthRow:tag('td'):css('width', self:getWidth('team', style.team_width)):wikitext(debug and row_count or blank_text)
row_count = row_count + 1
for i = 1, self.scores[round] do
widthRow:tag('td'):css('width', self:getWidth('score', style.score_width)):wikitext(debug and row_count or blank_text)
row_count = row_count + 1
end