Module:Tt/Draft: Difference between revisions

Kuhlau (talk | contribs)
No edit summary
Kuhlau (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
end
end
     return p._main(args)
     return p._main(args, frame)
end
end


function p._main(args, options)
function p._main(args, options, frame)
local text = args[1]
local text = args[1]
local tooltip = mw.text.decode(args[2], true)
local tooltip = mw.text.decode(args[2], true)
Line 30: Line 30:
local base = tostring(p._main(args, {notoggle = true})) -- tt on label for hover as otherwise the <a> default title takes priority
local base = tostring(p._main(args, {notoggle = true})) -- tt on label for hover as otherwise the <a> default title takes priority
local linkTo = '[[' .. lib.ternary(link == '1', text, link) .. '|' .. base .. ']]'
local linkTo = '[[' .. lib.ternary(link == '1', text, link) .. '|' .. base .. ']]'
return p._main({ linkTo, args[2], header = args.header }, {nohover = true}) -- external tt for collapsible for the separated clickable
return p._main({ linkTo, args[2], header = args.header, class = args.class }, {nohover = true}, frame) -- external tt for collapsible for the separated clickable
end
-- preprocess tooltip text
if lib.isNotEmpty(tooltip) then
tooltip = frame:preprocess(tooltip)
end
end