1,201
עריכות
(Allow electorate and turnout to be entered when they are the only things known) |
(Fix error that meant total_sc did not display if none of the inputs were numbers) |
||
local electorate = {tonumber(args.electorate) or 0, tonumber(args.electorate2) or tonumber(args.electorate) or 0}
local turnout = {tonumber(args.turnout) or 0, tonumber(args.turnout2) or 0}
local seats
local row, secondrow
local tracking = ''
if tonumber(args['seats' .. i]) then showtotal.seats = 1 end
seats = seats + (tonumber(args['seats' .. i]) or 0)
end
end
local ovalid = {valid[1], valid[2]}
seats = ((args['total_seats'] or '') == 'TOTAL' and seats) or args['total_seats'] or seats
max_rows = max_rows + 1
local i = max_rows
args['sw' .. i] = '–'
args['seats' .. i] = showtotal.seats and seats or nil
args['sc' .. i] =
args['font-weight' .. i] = 'bold'
args['class' .. i] = 'sortbottom'
|