From be893d0c3c6b91eea2351f782daaf593812df93d Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Fri, 30 May 2025 13:02:19 +0200 Subject: [PATCH] f --- admin-dashboard.html | 54 +------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/admin-dashboard.html b/admin-dashboard.html index d05fa2f..b1720c0 100644 --- a/admin-dashboard.html +++ b/admin-dashboard.html @@ -2190,60 +2190,8 @@ function openAddAppModal() { // Update title document.getElementById('appModalTitle').textContent = 'Přidat aplikaci'; + - // Select an icon -function selectIcon(iconClass) { - const iconInput = document.getElementById('appIcon'); - const iconPreview = document.getElementById('iconPreview'); - const iconClassInput = document.getElementById('appIconClass'); - const iconPickerModal = document.getElementById('iconPickerModal'); - - // Hide any custom icon preview - const customIconPreview = document.getElementById('customIconPreview'); - if (customIconPreview) { - customIconPreview.classList.add('hidden'); - customIconPreview.src = ''; - } - - // Show the Font Awesome icon - const selectedIcon = document.getElementById('selectedIcon'); - if (selectedIcon) { - selectedIcon.className = `fas ${iconClass} text-2xl text-blue-600`; - selectedIcon.classList.remove('hidden'); - } - - if (iconInput && selectedIcon && iconClassInput) { - // Update the hidden input with the icon class - iconClassInput.value = iconClass; - - // Update the visible input with a friendly name - const iconName = iconClass.replace('fa-', '').replace(/-/g, ' '); - iconInput.value = iconName.split(' ') - .map(word => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - - // Highlight the selected icon - const selectedOption = document.querySelector(`.icon-option[data-icon="${iconClass}"]`); - if (selectedOption) { - // Remove active class from all icons - document.querySelectorAll('.icon-option').forEach(option => { - option.classList.remove('active'); - }); - // Add active class to selected icon - selectedOption.classList.add('active'); - } - - // Close the modal - isModalOpen = false; - document.body.style.overflow = ''; - iconPickerModal.style.display = 'none'; - - // Update the preview - if (iconPreview) { - iconPreview.className = 'w-12 h-12 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3'; - } - } -} // Reset icon selection const appIcon = document.getElementById('appIcon'); const customIconInput = document.getElementById('customIconInput');