8,758
edits
mNo edit summary |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
end | end | ||
function p. | function p.triggeredEffects(frame) | ||
return p.main(frame, 'TriggeredEffects') | return p.main(frame, 'TriggeredEffects') | ||
end | end | ||
Line 41: | Line 41: | ||
frame=mw.getCurrentFrame() | frame=mw.getCurrentFrame() | ||
p.setcols(effecttype) | |||
local data = h.makeAndRunQuery(effecttype) | local data = h.makeAndRunQuery(effecttype) | ||
h.formatRows(data, effecttype) | h.formatRows(data, effecttype) | ||
Line 55: | Line 56: | ||
join = {'CE._ID=CEID._rowID'}, | join = {'CE._ID=CEID._rowID'}, | ||
fields = {'CEID._value=Type', 'CONCAT("[[", CE._pageName, "|", PlainName,"]]")=CookingDomain', 'PlainName'}, | fields = {'CEID._value=Type', 'CONCAT("[[", CE._pageName, "|", PlainName,"]]")=CookingDomain', 'PlainName'}, | ||
where = 'CE._pageNamespace="0"', | where = 'CE._pageNamespace="0" AND CEID._value <> ""', | ||
orderBy = 'PlainName ASC' | orderBy = 'PlainName ASC' | ||
} | } | ||
Line 74: | Line 75: | ||
local output = mw.html.create() | local output = mw.html.create() | ||
local tbl = output:tag('table') | local tbl = output:tag('table') | ||
:addClass(' | :addClass('cargoDynamicTable display dataTable') | ||
:addClass('sortable') | :addClass('sortable') | ||
util_html.printHeader(tbl, COLUMNS) | -- util_html.printHeader(tbl, COLUMNS) | ||
tbl:tag('tr') | |||
:tag('th'):css('width','470px'):wikitext(COLUMNS[1]) | |||
:tag('th'):css('width','130px'):wikitext(COLUMNS[2]) | |||
:tag('th'):wikitext(COLUMNS[3]) | |||
util_html.printRowsByList(tbl, data, COLUMNS) | util_html.printRowsByList(tbl, data, COLUMNS) | ||
return output | return output |