Editing Module:Navboxdl
From Guild of Archivists
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
-- | -- | ||
-- - Things to implement - || - Done (✗/✓) - | -- - Things to implement - || - Done (✗/✓) - | ||
-- * name | -- * name ✗ | ||
-- * state [autocollapse, collapsed, expanded, plain, off] ✓ | -- * state [autocollapse, collapsed, expanded, plain, off] ✓ | ||
-- * navbar [plain, off] | -- * navbar [plain, off] ✗ | ||
-- * border [child, subgroup, none(?)] ✓ | -- * border [child, subgroup, none(?)] ✓ | ||
-- * title ✓ | -- * title ✓ | ||
Line 33: | Line 33: | ||
-- * aboveclass ✗ | -- * aboveclass ✗ | ||
-- * groupclass ✗ | -- * groupclass ✗ | ||
-- * listclass | -- * listclass ✗ | ||
-- * belowclass ✗ | -- * belowclass ✗ | ||
-- * titlegroup ✗ | -- * titlegroup ✗ | ||
Line 42: | Line 42: | ||
local p = {} | local p = {} | ||
-- set default expand/collapse messages | -- set default expand/collapse messages | ||
Line 110: | Line 108: | ||
:tag('dd') | :tag('dd') | ||
:addClass('nav-desc') | :addClass('nav-desc') | ||
-- add a class for CSS to hook off for full width | -- add a class for CSS to hook off for full width | ||
Line 117: | Line 114: | ||
end | end | ||
-- only support url and ol at the moment | -- only support url and ol at the moment | ||
-- add ; and : when CSS supports it | -- add ; and : when CSS supports it | ||
if string.find(list, '^[%*#]') then | |||
desc:newline() | desc:newline() | ||
end | end | ||
Line 131: | Line 124: | ||
end | end | ||
desc:wikitext(list) | body = desc | ||
:wikitext(list) | |||
:done() | |||
end | end | ||
Line 144: | Line 133: | ||
:attr('data-rows', tostring(j)) | :attr('data-rows', tostring(j)) | ||
:done() | :done() | ||
end | end | ||
Line 174: | Line 151: | ||
-- | -- | ||
function p.main(frame) | function p.main(frame) | ||
args = frame:getParent().args | local args = frame:getParent().args | ||
local child_borders = { | local child_borders = { | ||
child = true, | child = true, | ||
Line 226: | Line 203: | ||
:addClass('nav-header-wrap') | :addClass('nav-header-wrap') | ||
:done() | :done() | ||
header | header |