Module:CareerList: Difference between revisions
Content deleted Content added
PeaceDeadC (talk | contribs) No edit summary |
PeaceDeadC (talk | contribs) No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
Line 4:
function p.makeTableTop()
local headerRow = mw.html.create('tr')
:node(mw.html.create('th'):wikitext('
:node(mw.html.create('th'):wikitext('
:node(mw.html.create('th'):wikitext('
:node(mw.html.create('th'):wikitext('
:done()
Line 19:
function p.makeCell(cellType, args)
local function getColor(index)
return ((index or 0) % 2 == 0) and '#F3F3F3' or '#FFFFFF'
end
Line 29:
local function getAlias(alias, title)
end▼
end
end
local function getNotes(notes)
end
end
if not args.site then
return mw.html.create('tr')
:css('background-color', getColor(args.rowIndex))
:node(mw.html.create('td'):attr('colspan', '4'):wikitext('Invalid arguments. Please see documentation for correct usage.'))
:done()
Line 53:
local site = args.site or mw.title.getCurrentTitle().text
local id = args.id or ''
local alias = getAlias(args.alias,
local notes = getNotes(args.notes
local background = getBackground(site)
Line 72:
:css('background-color', background)
:css('padding', '8px')
:wikitext(
:done()
Line 78:
:css('background-color', background)
:css('padding', '8px')
:wikitext(
:done()
return mw.html.create('tr')
:css('background-color', getColor(args.rowIndex))
:node(cell)
:node(idCell)
Line 114:
if site == '' then
return '<strong class="error">Error: </strong>Site parameter is required'
elseif not mw.loadData('Module:CareerList/config')[site:lower()] then▼
return '<strong class="error">Error: </strong>Invalid site specified'▼
else
▲ return '<strong class="error">Error: </strong>Invalid site specified'
else
return p.makeCell(site, id, alias, notes)
end
end
| |||