« Module:Liste déroulante » : différence entre les versions
mAucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 7 : | Ligne 7 : | ||
local title = outils.trim(params[1]) or 'Titre ?' | local title = outils.trim(params[1]) or 'Titre ?' | ||
local | local hiddenList = mw.html.create('ul') | ||
for index, item in pairs(params) do | for index, item in pairs(params) do | ||
if(index ~= 1) then | if(index ~= 1) then | ||
hiddenList | |||
:tag('li'):wikitext(item):done() | :tag('li'):wikitext(item):done() | ||
end | end | ||
end | end | ||
hiddenList:done() | |||
local res = mw.html.create('div') | |||
res | |||
:addClass('dropdown') | |||
:tag('span'):wikitext(title):done() | |||
:node(hiddenList) | |||
res:allDone() | res:allDone() |