Zum Inhalt springen

Modul:Protection banner: Unterschied zwischen den Versionen

use the config to set the padlock "right" propery, and remove the Padlock:setRight method
(simplify Protection:makeProtectionCategory and update the comments)
(use the config to set the padlock "right" propery, and remove the Padlock:setRight method)
Zeile 793: Zeile 793:
self._imageAlt = blurbObj:makeAltText()
self._imageAlt = blurbObj:makeAltText()
self._imageLink = blurbObj:makeLinkText()
self._imageLink = blurbObj:makeLinkText()
end
self._right = cfg.padlockPositions[action]
 
or cfg.padlockPositions.default
function Padlock:setRight(px)
or '55px'
self._right = px
end
end


Zeile 804: Zeile 803:
:addClass('metadata topicon nopopups')
:addClass('metadata topicon nopopups')
:attr('id', 'protected-icon')
:attr('id', 'protected-icon')
:css{display = 'none', right = self._right or '55px'}
:css{display = 'none', right = self._right}
:wikitext(self:renderImage())
:wikitext(self:renderImage())
return tostring(root)
return tostring(root)
Anonymer Benutzer