Module:Tt/Draft: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
local args = require('Module:Arguments').getArgs(frame, { | local args = require('Module:Arguments').getArgs(frame, { | ||
parentFirst = true, | parentFirst = true, | ||
wrappers = { 'Template:Tt' } | wrappers = { 'Template:Tt', 'Template:Tt/Draft' } | ||
}) | }) | ||
args[1] = args[1] or '<i>Missing text</i>' | args[1] = args[1] or '<i>Missing text</i>' | ||
| Line 46: | Line 46: | ||
-- Optional toggleable text but plain text must be there for gadget | -- Optional toggleable text but plain text must be there for gadget | ||
if not options or not options.notoggle then | if not options or not options.notoggle then | ||
toggle:addClass(' mw-collapsible mw-made-collapsible mw-collapsed | toggle:addClass(' mw-collapsible mw-made-collapsible mw-collapsed hnaw-collapsible') | ||
-- move tooltip to detached icon when text is clickable | -- move tooltip to detached icon when text is clickable | ||
if lib.isNotEmpty(args.link) or (text:find('%[%[') and text:find('%]%]')) then | if lib.isNotEmpty(args.link) or (text:find('%[%[') and text:find('%]%]')) then | ||