Modulo:Navbox/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
ultimi ritocchi
Omega Bot (discussione | contributi)
m Bot: rimuovo no globals obsoleto
 
(5 versioni intermedie di un altro utente non mostrate)
Riga 3:
]]--
 
require('Modulo:No globalsstrict')
 
local getArgs = require('Modulo:Arguments').getArgs
Riga 218:
trNode:tag('td')
:attr('colspan', self.args['group' .. id] and '1' or '2')
:addClass('navbox_list')
:addClass(not self.args['group' .. id] and 'navbox_center' or nil)
:addClass(altBackground)
Line 266 ⟶ 267:
-- Configura gli stili CSS della tabella.
function NavboxSubgroup:_setupTableNode()
local tableStyle = {
background = 'transparent',
['font-size'] = '100%',
padding = '0',
border = '0',
margin = '-3px',
width = '100%'
}
self.tableNode
:addClass('subnavbox nowraplinks')
:css(tableStyle)
:cssText(self.args.bodystyle)
end
Line 283 ⟶ 275:
function NavboxSubgroup:_addLists()
local listIds, altStyle
local thStyle = {
background = '#ddf',
padding = '0 10px',
}
-- crea una row per ogni listN
listIds = getIds(self.args)
Line 295 ⟶ 283:
if self.args['group' .. id] then
trNode:tag('th')
:cssaddClass(thStyle'subnavbox_group')
:cssText(self.args.groupstyle)
:wikitext(self.args['group' .. id])
Line 306 ⟶ 294:
trNode:tag('td')
:attr('colspan', self.args['group' .. id] and '1' or '2')
:cssaddClass('text-align',not self.args['group' .. id] and 'leftnavbox_center' or 'center'nil)
:cssText(self.args.liststyle)
:cssText(altStyle)
Line 326 ⟶ 314:
-- Funzione per l'utilizzo da un altro modulo.
function p._navbox_subgroup(args)
return loadCSS(args.name) .. NavboxSubgroup:new(args):getHTML()
end