Solved bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-09 16:34:35 +01:00
parent 2a3491b98b
commit 3c240fc16b

View File

@ -74,8 +74,9 @@ function openDynamicPopup(subitem) {
<span> <span>
<i class="${alt.icon.class}"></i> ${alt.name} <i class="${alt.icon.class}"></i> ${alt.name}
</span> </span>
<button class="btn btn-outline-secondary btn-sm" onclick='openDynamicPopup(${JSON.stringify(alt)})'>Open</button> <button class="btn btn-outline-secondary btn-sm">Open</button>
`; `;
listItem.querySelector('button').addEventListener('click', () => openDynamicPopup(alt));
alternativesList.appendChild(listItem); alternativesList.appendChild(listItem);
}); });
} else { } else {
@ -83,12 +84,13 @@ function openDynamicPopup(subitem) {
} }
// Kopierfunktion für den Identifier // Kopierfunktion für den Identifier
document.getElementById('dynamicCopyButton').addEventListener('click', function () { const copyButton = document.getElementById('dynamicCopyButton');
copyButton.onclick = () => {
modalContent.select(); modalContent.select();
navigator.clipboard.writeText(modalContent.value).then(() => { navigator.clipboard.writeText(modalContent.value).then(() => {
alert('Identifier copied to clipboard!'); alert('Identifier copied to clipboard!');
}); });
}); };
// Modal anzeigen // Modal anzeigen
const modal = new bootstrap.Modal(document.getElementById('dynamicModal')); const modal = new bootstrap.Modal(document.getElementById('dynamicModal'));