Large refactor
This commit is contained in:
@@ -159,7 +159,7 @@ $isAdmin = ($userRole === 'ADMIN');
|
||||
</div>
|
||||
|
||||
<!-- MODAL 1: Taak (Post-it / Opdracht) Toevoegen of Bewerken -->
|
||||
<div id="cardModal" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4 overflow-y-auto">
|
||||
<div id="cardModal" onclick="if(event.target === this) closeCardModal()" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4 overflow-y-auto">
|
||||
<div class="fociz-card p-6 w-full max-w-xl shadow-2xl space-y-5 my-8">
|
||||
|
||||
<div class="flex items-center justify-between pb-3 border-b border-slate-100 dark:border-slate-800/80">
|
||||
@@ -341,7 +341,7 @@ $isAdmin = ($userRole === 'ADMIN');
|
||||
</div>
|
||||
|
||||
<!-- MODAL 2: Bord Instellingen, Kolommen & Leden Autorisatie (Beheerder) -->
|
||||
<div id="manageBoardModal" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4 overflow-y-auto">
|
||||
<div id="manageBoardModal" onclick="if(event.target === this) closeManageBoardModal()" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4 overflow-y-auto">
|
||||
<div class="fociz-card p-6 w-full max-w-xl shadow-2xl space-y-5 my-8">
|
||||
|
||||
<div class="flex items-center justify-between pb-3 border-b border-slate-100 dark:border-slate-800/80">
|
||||
@@ -403,7 +403,7 @@ $isAdmin = ($userRole === 'ADMIN');
|
||||
</div>
|
||||
|
||||
<!-- MODAL 3: Nieuw Bord Aanmaken (Beheerder) -->
|
||||
<div id="createBoardModal" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4">
|
||||
<div id="createBoardModal" onclick="if(event.target === this) closeCreateBoardModal()" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4">
|
||||
<div class="fociz-card p-6 w-full max-w-md shadow-2xl space-y-4">
|
||||
<div class="flex items-center justify-between pb-3 border-b border-slate-100 dark:border-slate-800/80">
|
||||
<h3 class="text-base font-bold text-slate-900 dark:text-white">Nieuw Bord Toevoegen</h3>
|
||||
@@ -1275,11 +1275,25 @@ function toggleBoardMaximize() {
|
||||
// Pas bewaarde breedte-status direct toe bij het laden
|
||||
applyMaximizeState(isBoardMaximized);
|
||||
|
||||
// Sneltoets Escape om gemaximaliseerd bord te verkleinen (mits geen modal openstaat)
|
||||
// Sneltoets Escape om geopende modals te sluiten of gemaximaliseerd bord te verkleinen
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && isBoardMaximized) {
|
||||
const anyModalOpen = document.querySelector('#cardModal:not(.hidden), #manageBoardModal:not(.hidden), #createBoardModal:not(.hidden)');
|
||||
if (!anyModalOpen) {
|
||||
if (e.key === 'Escape') {
|
||||
const cardModal = document.getElementById('cardModal');
|
||||
if (cardModal && !cardModal.classList.contains('hidden')) {
|
||||
closeCardModal();
|
||||
return;
|
||||
}
|
||||
const manageModal = document.getElementById('manageBoardModal');
|
||||
if (manageModal && !manageModal.classList.contains('hidden')) {
|
||||
closeManageBoardModal();
|
||||
return;
|
||||
}
|
||||
const createModal = document.getElementById('createBoardModal');
|
||||
if (createModal && !createModal.classList.contains('hidden')) {
|
||||
closeCreateBoardModal();
|
||||
return;
|
||||
}
|
||||
if (isBoardMaximized) {
|
||||
toggleBoardMaximize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user