Module:MLB standings: Difference between revisions

Content deleted Content added
update comments
modify to use classes defined in Template:MLB standings/styles.css
 
(2 intermediate revisions by the same user not shown)
Line 23:
-- input format).
-- The parsers take the following parameters:
-- args: table holding the parmetersparameters (indexed by numeric position)
-- currentIdx: the current index from where the next set of data should be parsed
-- returnData: table that the parser will update to pass additional data back to the caller.
Line 76:
default = function(tableHeaderInfo)
return
'{| class="wikitable MLBStandingsTable" style="text-align:center;"\
|+ style="text-align:center;" |' .. tableHeaderInfo.navbarText .. '[[' .. tableHeaderInfo.divisionLink
.. '|' .. tableHeaderInfo.division .. ']]\
|- \
Line 92:
winLossOnly = function(tableHeaderInfo)
return
'{| class="wikitable MLBStandingsTable" style="text-align:center;"\
|+ style="text-align:center;" |' .. tableHeaderInfo.navbarText .. tableHeaderInfo.division .. '\
|- \
! width="66%" | Team\
Line 104:
wildCard2012 = function(tableHeaderInfo)
return
'{| class="wikitable MLBStandingsTable" style="text-align:center;"\
|+ style="text-align:center;" |' .. tableHeaderInfo.navbarText .. 'Wild Card teams<br><small>(Top 2 teams qualify for postseason)</small>\
|- \
! width="64%" | Team \
Line 123:
end
return
'{| class="wikitable MLBStandingsTable" style="text-align:center;"\
|+ style="text-align:center;" |' .. tableHeaderInfo.navbarText .. 'Wild Card ' .. teamText .. '<br><small>(Top ' .. numberOfTeamsText ..
' for postseason)</small>\
|- \
Line 265:
-- - winLossOnly: overall win-loss records displayed, no games behind column
-- - wildCard: wildcard standings table displayed
-- - wildCard2012: wildcard standings table displayed (effectively the same as wildcard for years from 2012-2021; kept for backwards compatibility)
--
-- frame.args.template_name: name of standings template
Line 446:
if (seedInfo[teamInfo.name] ~= nil) then
teamRowInfo.seedText = '<sup>(' .. seedInfo[teamInfo.name] .. ')</sup>&nbsp;'
teamRowInfo.rowStyle = ' styleclass="background:#CCFFCCMLBStandingsHighlightedRow"'
end
 
if (teamsToHighlight[teamInfo.name]) then
teamRowInfo.rowStyle = ' styleclass="background:#CCFFCCMLBStandingsHighlightedRow"'
end