「モジュール:List」の版間の差分

1版 をインポートしました
en>Wugapodes
(Changed protection settings for "Module:List": High-risk Lua module: Used in MediaWiki interface ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)))
 
(1版 をインポートしました)
 
(2人の利用者による、間の2版が非表示)
69行目: 69行目:
-- Start number for ordered lists
-- Start number for ordered lists
data.start = args.start
data.start = args.start
if listType == 'horizontal_ordered' then
if listType == 'ordered' or listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
local startNum = tonumber(data.start)
if startNum then
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
data.counterReset = 'listitem ' .. tostring(startNum)
data.counterIncrement = 'listitem -1'
end
end
end
end
94行目: 95行目:
item.value = args['item' .. tostring(num) .. '_value']
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
or args['item_value' .. tostring(num)]
if item.value ~= nil then
item.style = 'counter-reset: listitem ' .. item.value .. ';counter-increment: none;' .. ((item.style) or '')
end
table.insert(data.items, item)
table.insert(data.items, item)
end
end
124行目: 128行目:
:css{
:css{
['counter-reset'] = data.counterReset,
['counter-reset'] = data.counterReset,
['counter-increment'] = data.counterIncrement,
['list-style-type'] = data.listStyleType
['list-style-type'] = data.listStyleType
}
}
管理者、translator
2,311

回編集