http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&feed=atom&action=history
Module:Navbox - Revision history
2024-03-28T20:30:44Z
Revision history for this page on the wiki
MediaWiki 1.39.6
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=4012&oldid=prev
FantasyTeddy at 19:50, 1 August 2015
2015-08-01T19:50:40Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:50, 1 August 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l300">Line 300:</td>
<td colspan="2" class="diff-lineno">Line 300:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('mw-collapsible')</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('mw-collapsible')</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> :addClass('mw-' .. args.state or 'autocollapse')</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> :addClass(<ins style="font-weight: bold; text-decoration: none;">args.state and </ins>'mw-' .. args.state or 'autocollapse')</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>
FantasyTeddy
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=4004&oldid=prev
FantasyTeddy at 18:58, 1 August 2015
2015-08-01T18:58:17Z
<p></p>
<a href="http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=4004&oldid=2661">Show changes</a>
FantasyTeddy
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=2661&oldid=prev
Inari: #2
2015-06-02T07:29:24Z
<p>#2</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 07:29, 2 June 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l307">Line 307:</td>
<td colspan="2" class="diff-lineno">Line 307:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> .addClass('mw-collapsible')</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> .addClass('mw-collapsible')</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> .addClass('mw-' <del style="font-weight: bold; text-decoration: none;">+ </del>args.state or 'autocollapse')</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> .addClass('mw-' <ins style="font-weight: bold; text-decoration: none;">.. </ins>args.state or 'autocollapse')</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
</table>
Inari
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=2660&oldid=prev
Inari: fix collapsible class names
2015-06-02T07:28:50Z
<p>fix collapsible class names</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 07:28, 2 June 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l306">Line 306:</td>
<td colspan="2" class="diff-lineno">Line 306:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if args.title and (args.state ~= 'plain' and args.state ~= 'off') then</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if args.title and (args.state ~= 'plain' and args.state ~= 'off') then</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> tbl</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> .addClass('collapsible')</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> .addClass('<ins style="font-weight: bold; text-decoration: none;">mw-</ins>collapsible')</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> .addClass(args.state or 'autocollapse')</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> .addClass(<ins style="font-weight: bold; text-decoration: none;">'mw-' + </ins>args.state or 'autocollapse')</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
</table>
Inari
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=197&oldid=prev
Mastergalen: 1 revision
2014-01-25T22:21:55Z
<p>1 revision</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en-GB">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 22:21, 25 January 2014</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en-GB"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Mastergalen
http://wiki.aidancbrady.com/w/index.php?title=Module:Navbox&diff=196&oldid=prev
Mastergalen: 1 revision
2013-07-15T12:06:01Z
<p>1 revision</p>
<p><b>New page</b></p><div>--<br />
-- This module will implement {{Navbox}}<br />
--<br />
<br />
local p = {}<br />
<br />
local HtmlBuilder = require('Module:HtmlBuilder')<br />
local Navbar = require('Module:Navbar')<br />
<br />
local args<br />
local frame<br />
local tableRowAdded = false<br />
local border<br />
local listnums = {}<br />
<br />
function trim(s)<br />
return (mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1"))<br />
end<br />
<br />
function addTableRow(tbl)<br />
-- If any other rows have already been added, then we add a 2px gutter row.<br />
if tableRowAdded then<br />
tbl<br />
.tag('tr')<br />
.css('height', '2px')<br />
.tag('td')<br />
end<br />
<br />
tableRowAdded = true<br />
<br />
return tbl.tag('tr')<br />
end<br />
<br />
<br />
--<br />
-- Title row<br />
--<br />
function renderTitleRow(tbl)<br />
if not args.title then return end<br />
<br />
local titleRow = addTableRow(tbl)<br />
<br />
if args.titlegroup then<br />
titleRow<br />
.tag('th')<br />
.attr('scope', 'row')<br />
.addClass('navbox-group')<br />
.addClass(args.titlegroupclass)<br />
.cssText(args.basestyle)<br />
.cssText(args.groupstyle)<br />
.cssText(args.titlegroupstyle)<br />
.wikitext(args.titlegroup)<br />
end<br />
<br />
local titleCell = titleRow.tag('th').attr('scope', 'col')<br />
<br />
if args.titlegroup then<br />
titleCell<br />
.css('border-left', '2px solid #fdfdfd')<br />
.css('width', '100%')<br />
end<br />
<br />
local titleColspan = 2<br />
if args.imageleft then titleColspan = titleColspan + 1 end<br />
if args.image then titleColspan = titleColspan + 1 end<br />
if args.titlegroup then titleColspan = titleColspan - 1 end<br />
<br />
titleCell<br />
.cssText(args.basestyle)<br />
.cssText(args.titlestyle)<br />
.addClass('navbox-title')<br />
.attr('colspan', titleColspan)<br />
<br />
renderNavBar(titleCell)<br />
<br />
titleCell<br />
.tag('div')<br />
.addClass(args.titleclass)<br />
.css('font-size', '110%')<br />
.newline()<br />
.wikitext(args.title)<br />
end<br />
<br />
function renderNavBar(titleCell)<br />
-- Depending on the presence of the navbar and/or show/hide link, we may need to add a spacer div on the left<br />
-- or right to keep the title centered.<br />
local spacerSide = nil<br />
<br />
if args.navbar == 'off' then<br />
-- No navbar, and client wants no spacer, i.e. wants the title to be shifted to the left. If there's<br />
-- also no show/hide link, then we need a spacer on the right to achieve the left shift.<br />
if args.state == 'plain' then spacerSide = 'right' end<br />
elseif args.navbar == 'plain' or args.navbar == 'off' or (not args.name and (border == 'subgroup' or border == 'child' or border == 'none')) then<br />
-- No navbar. Need a spacer on the left to balance out the width of the show/hide link.<br />
if args.state ~= 'plain' then spacerSide = 'left' end<br />
else<br />
-- Will render navbar (or error message). If there's no show/hide link, need a spacer on the right<br />
-- to balance out the width of the navbar.<br />
if args.state == 'plain' then spacerSide = 'right' end<br />
<br />
titleCell.wikitext(Navbar.navbar({ <br />
args.name, <br />
mini = 1, <br />
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;'<br />
}))<br />
end<br />
<br />
-- Render the spacer div.<br />
if spacerSide then<br />
titleCell<br />
.tag('span')<br />
.css('float', spacerSide)<br />
.css('width', '6em')<br />
.wikitext('&nbsp;')<br />
end<br />
end<br />
<br />
<br />
--<br />
-- Above/Below rows<br />
--<br />
function renderAboveRow(tbl)<br />
if not args.above then return end<br />
<br />
addTableRow(tbl)<br />
.tag('td')<br />
.addClass('navbox-abovebelow')<br />
.addClass(args.aboveclass)<br />
.cssText(args.basestyle)<br />
.cssText(args.abovestyle)<br />
.attr('colspan', getAboveBelowColspan())<br />
.tag('div')<br />
.newline()<br />
.wikitext(args.above)<br />
end<br />
<br />
function renderBelowRow(tbl)<br />
if not args.below then return end<br />
<br />
addTableRow(tbl)<br />
.tag('td')<br />
.addClass('navbox-abovebelow')<br />
.addClass(args.belowclass)<br />
.cssText(args.basestyle)<br />
.cssText(args.belowstyle)<br />
.attr('colspan', getAboveBelowColspan())<br />
.tag('div')<br />
.newline()<br />
.wikitext(args.below)<br />
end<br />
<br />
function getAboveBelowColspan()<br />
local ret = 2<br />
if args.imageleft then ret = ret + 1 end<br />
if args.image then ret = ret + 1 end<br />
return ret<br />
end<br />
<br />
<br />
--<br />
-- List rows<br />
--<br />
function renderListRow(tbl, listnum)<br />
local row = addTableRow(tbl)<br />
<br />
if listnum == 1 and args.imageleft then<br />
row<br />
.tag('td')<br />
.addClass('navbox-image')<br />
.addClass(args.imageclass)<br />
.css('width', '0%')<br />
.css('padding', '0px 2px 0px 0px')<br />
.cssText(args.imageleftstyle)<br />
.attr('rowspan', 2 * #listnums - 1)<br />
.tag('div')<br />
.newline()<br />
.wikitext(args.imageleft)<br />
end<br />
<br />
if args['group' .. listnum] then<br />
local groupCell = row.tag('th')<br />
<br />
groupCell<br />
.attr('scope', 'row')<br />
.addClass('navbox-group')<br />
.addClass(args.groupclass)<br />
.cssText(args.basestyle)<br />
<br />
if args.groupwidth then<br />
groupCell.css('width', args.groupwidth)<br />
end<br />
<br />
groupCell<br />
.cssText(args.groupstyle)<br />
.cssText(args['group' .. listnum .. 'style'])<br />
.wikitext(args['group' .. listnum])<br />
end<br />
<br />
local listCell = row.tag('td')<br />
<br />
if args['group' .. listnum] then<br />
listCell<br />
.css('text-align', 'left')<br />
.css('border-left-width', '2px')<br />
.css('border-left-style', 'solid')<br />
else<br />
listCell.attr('colspan', 2)<br />
end<br />
<br />
if not args.groupwidth then <br />
listCell.css('width', '100%')<br />
end<br />
<br />
local isOdd = (listnum % 2) == 1<br />
local rowstyle = args.evenstyle<br />
if isOdd then rowstyle = args.oddstyle end<br />
<br />
local evenOdd<br />
if args.evenodd == 'swap' then<br />
if isOdd then evenOdd = 'even' else evenOdd = 'odd' end<br />
else<br />
if isOdd then evenOdd = args.evenodd or 'odd' else evenOdd = args.evenodd or 'even' end<br />
end<br />
<br />
listCell<br />
.css('padding', '0px')<br />
.cssText(args.liststyle)<br />
.cssText(rowstyle)<br />
.cssText(args['list' .. listnum .. 'style'])<br />
.addClass('navbox-list')<br />
.addClass('navbox-' .. evenOdd)<br />
.addClass(args.listclass)<br />
.tag('div')<br />
.css('padding', (listnum == 1 and args.list1padding) or args.listpadding or '0em 0.25em')<br />
.newline()<br />
.wikitext(args['list' .. listnum])<br />
<br />
if listnum == 1 and args.image then<br />
row<br />
.tag('td')<br />
.addClass('navbox-image')<br />
.addClass(args.imageclass)<br />
.css('width', '0%')<br />
.css('padding', '0px 0px 0px 2px')<br />
.cssText(args.imagestyle)<br />
.attr('rowspan', 2 * #listnums - 1)<br />
.tag('div')<br />
.newline()<br />
.wikitext(args.image)<br />
end<br />
end<br />
<br />
<br />
--<br />
-- Tracking categories<br />
--<br />
function renderTrackingCategories(builder)<br />
local frame = mw.getCurrentFrame()<br />
<br />
if not frame then return end<br />
<br />
local s = frame:preprocess('{{#ifeq:{{NAMESPACE}}|{{ns:10}}|1|0}}{{SUBPAGENAME}}')<br />
if mw.ustring.sub(s, 1, 1) == '0' then return end -- not in template space<br />
local subpage = mw.ustring.lower(mw.ustring.sub(s, 2))<br />
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end<br />
<br />
for i, cat in ipairs(getTrackingCategories()) do<br />
builder.wikitext('[[Category:' .. cat .. ']]') <br />
end<br />
end<br />
<br />
function getTrackingCategories()<br />
local cats = {}<br />
if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end<br />
if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end<br />
return cats<br />
end<br />
<br />
function needsHorizontalLists()<br />
if border == 'child' or border == 'subgroup' or args.tracking == 'no' then return false end<br />
<br />
local listClasses = {'plainlist', 'hlist', 'hlist hnum', 'hlist vcard', 'vcard hlist'}<br />
for i, cls in ipairs(listClasses) do<br />
if args.listclass == cls or args.bodyclass == cls then<br />
return false<br />
end<br />
end<br />
<br />
return true<br />
end<br />
<br />
function hasBackgroundColors()<br />
return args.titlestyle or args.groupstyle<br />
end<br />
<br />
<br />
--<br />
-- Main navbox tables<br />
--<br />
function renderMainTable()<br />
local tbl = HtmlBuilder.create('table')<br />
.attr('cellspacing', 0)<br />
.addClass('nowraplinks')<br />
.addClass(args.bodyclass)<br />
<br />
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then<br />
tbl<br />
.addClass('collapsible')<br />
.addClass(args.state or 'autocollapse')<br />
end<br />
<br />
tbl.css('border-spacing', 0)<br />
if border == 'subgroup' or border == 'child' or border == 'none' then<br />
tbl<br />
.addClass('navbox-subgroup')<br />
.cssText(args.bodystyle)<br />
.cssText(args.style)<br />
else -- regular navobx - bodystyle and style will be applied to the wrapper table<br />
tbl<br />
.addClass('navbox-inner')<br />
.css('background', 'transparent')<br />
.css('color', 'inherit')<br />
end<br />
tbl.cssText(args.innerstyle)<br />
<br />
renderTitleRow(tbl)<br />
renderAboveRow(tbl)<br />
for i, listnum in ipairs(listnums) do<br />
renderListRow(tbl, listnum) <br />
end<br />
renderBelowRow(tbl)<br />
<br />
return tbl<br />
end<br />
<br />
function p._navbox(navboxArgs)<br />
args = navboxArgs<br />
<br />
for k, v in pairs(args) do<br />
local listnum = ('' .. k):match('^list(%d+)$')<br />
if listnum then table.insert(listnums, tonumber(listnum)) end<br />
end<br />
table.sort(listnums)<br />
<br />
border = trim(args.border or args[1] or '')<br />
<br />
-- render the main body of the navbox<br />
local tbl = renderMainTable()<br />
<br />
-- render the appropriate wrapper around the navbox, depending on the border param<br />
local res = HtmlBuilder.create()<br />
if border == 'none' then<br />
res.node(tbl)<br />
elseif border == 'subgroup' or border == 'child' then<br />
-- We assume that this navbox is being rendered in a list cell of a parent navbox, and is<br />
-- therefore inside a div with padding:0em 0.25em. We start with a </div> to avoid the<br />
-- padding being applied, and at the end add a <div> to balance out the parent's </div><br />
res<br />
.tag('/div', {unclosed = true})<br />
.done()<br />
.node(tbl)<br />
.tag('div', {unclosed = true})<br />
else<br />
res<br />
.tag('table')<br />
.attr('cellspacing', 0)<br />
.addClass('navbox')<br />
.css('border-spacing', 0)<br />
.cssText(args.bodystyle)<br />
.cssText(args.style)<br />
.tag('tr')<br />
.tag('td')<br />
.css('padding', '2px')<br />
.node(tbl)<br />
end<br />
<br />
renderTrackingCategories(res)<br />
<br />
return tostring(res)<br />
end<br />
<br />
function p.navbox(frame)<br />
-- ParserFunctions considers the empty string to be false, so to preserve the previous <br />
-- behavior of {{navbox}}, change any empty arguments to nil, so Lua will consider<br />
-- them false too.<br />
local args = {}<br />
local parent_args = frame:getParent().args;<br />
<br />
-- Out of order parsing bug.<br />
local temp;<br />
temp = parent_args.title;<br />
temp = parent_args.above;<br />
for i = 1, 20 do<br />
temp = parent_args["group" .. tostring(i)];<br />
temp = parent_args["list" .. tostring(i)];<br />
end <br />
temp = parent_args.below;<br />
<br />
for k, v in pairs(parent_args) do<br />
if v ~= '' then<br />
args[k] = v<br />
end<br />
end<br />
return p._navbox(args)<br />
end<br />
<br />
return p</div>
Mastergalen