mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°5809 Update Symfony artifacts from 6.4.0 to 6.4.2
symfony/console symfony/dotenv symfony/framework-bundle symfony/http-foundation symfony/http-kernel symfony/var-dumper symfony/web-profiler-bundle
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
constructor() {
|
||||
this.#createTabs();
|
||||
this.#createToggles();
|
||||
this.#createCopyToClipboard();
|
||||
this.#convertDateTimesToUserTimezone();
|
||||
}
|
||||
|
||||
@@ -161,18 +162,39 @@
|
||||
});
|
||||
});
|
||||
|
||||
/* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */
|
||||
const copyToClipboardElements = toggle.querySelectorAll('span[data-clipboard-text]');
|
||||
copyToClipboardElements.forEach((copyToClipboardElement) => {
|
||||
copyToClipboardElement.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
|
||||
toggle.setAttribute('data-processed', 'true');
|
||||
});
|
||||
}
|
||||
|
||||
#createCopyToClipboard() {
|
||||
if (!navigator.clipboard) {
|
||||
return;
|
||||
}
|
||||
|
||||
const copyToClipboardElements = document.querySelectorAll('[data-clipboard-text]');
|
||||
|
||||
copyToClipboardElements.forEach((copyToClipboardElement) => {
|
||||
copyToClipboardElement.classList.remove('hidden');
|
||||
|
||||
copyToClipboardElement.addEventListener('click', (e) => {
|
||||
/* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */
|
||||
e.stopPropagation();
|
||||
|
||||
navigator.clipboard.writeText(copyToClipboardElement.getAttribute('data-clipboard-text'));
|
||||
|
||||
let oldContent = copyToClipboardElement.textContent;
|
||||
|
||||
copyToClipboardElement.textContent = `✅ Copied!`;
|
||||
copyToClipboardElement.disabled = true;
|
||||
|
||||
setTimeout(() => {
|
||||
copyToClipboardElement.textContent = oldContent;
|
||||
copyToClipboardElement.disabled = false;
|
||||
}, 7000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#convertDateTimesToUserTimezone() {
|
||||
const userTimezoneName = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user