LSdefault / copyable helper: add copyable-no-btn helper class

This commit is contained in:
Benjamin Renard 2023-03-21 10:31:21 +01:00
parent d387052068
commit 140b000877
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -76,6 +76,12 @@ var LSdefault = new Class({
this.initializeLang();
document.getElements('.copyable').each(function(el) {
if (el.hasClass('copyable-no-btn')) {
el.addEvent('click', this.onCopyBtnClick.bind(this, {btn: null, element: el}));
el.setStyle('cursor', 'copy');
this.addHelpInfo(el, 'LSdefault', 'copy_to_clipboard');
return;
}
var btn = new Element('img');
btn.setProperties({
src: this.imagePath('copy')