🔧 Fix: Schnellreservierungs-Modal Funktionalität repariert
- CSS Animation von TailwindCSS auf Mercedes-Modal umgestellt - Modal verwendet jetzt korrekte .show Klasse für Animation - Startzeit wird automatisch auf "jetzt" gesetzt beim Öffnen - Animation-Timing angepasst für bessere UX - Alle JavaScript-Funktionen debuggen-bereit Modal sollte jetzt unter /jobs korrekt funktionieren. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -952,7 +952,7 @@
|
||||
<!-- Quick Reservation Modal -->
|
||||
<div id="quickReservationModal" class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden z-50">
|
||||
<div class="flex items-center justify-center min-h-screen p-4">
|
||||
<div class="mercedes-modal max-w-md w-full p-8 transform transition-all duration-300 scale-95 opacity-0">
|
||||
<div class="mercedes-modal max-w-md w-full p-8">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div>
|
||||
<h3 class="text-xl font-bold text-mercedes-black dark:text-white mb-2">Schnell-Reservierung</h3>
|
||||
@ -2210,7 +2210,6 @@ window.testModalFunction = testModal;
|
||||
function openQuickModal() {
|
||||
console.log('🚀 openQuickModal() aufgerufen');
|
||||
|
||||
// Direkte Modal-Öffnung ohne komplizierte Funktionen
|
||||
const modal = document.getElementById('quickReservationModal');
|
||||
const content = modal.querySelector('.mercedes-modal');
|
||||
|
||||
@ -2218,16 +2217,25 @@ function openQuickModal() {
|
||||
console.log('Content Element:', content);
|
||||
|
||||
if (modal && content) {
|
||||
// Schritt 1: Modal sichtbar machen
|
||||
// Startzeit auf "jetzt" setzen
|
||||
const now = new Date();
|
||||
const startTimeInput = document.getElementById('quick-start-time');
|
||||
if (startTimeInput) {
|
||||
const localDateTime = new Date(now.getTime() - now.getTimezoneOffset() * 60000)
|
||||
.toISOString()
|
||||
.slice(0, 16);
|
||||
startTimeInput.value = localDateTime;
|
||||
}
|
||||
|
||||
// Modal sichtbar machen
|
||||
modal.classList.remove('hidden');
|
||||
modal.style.display = 'block';
|
||||
|
||||
// Schritt 2: Animation starten (mit setTimeout für Browser-Repaint)
|
||||
// Mercedes-Modal CSS Animation verwenden
|
||||
setTimeout(() => {
|
||||
content.classList.remove('scale-95', 'opacity-0');
|
||||
content.classList.add('scale-100', 'opacity-100');
|
||||
content.classList.add('show');
|
||||
console.log('✅ Modal Animation gestartet');
|
||||
}, 100);
|
||||
}, 10);
|
||||
|
||||
console.log('✅ Modal sollte jetzt sichtbar sein');
|
||||
} else {
|
||||
@ -2242,16 +2250,15 @@ function closeQuickModal() {
|
||||
const content = modal.querySelector('.mercedes-modal');
|
||||
|
||||
if (modal && content) {
|
||||
// Animation rückwärts
|
||||
content.classList.remove('scale-100', 'opacity-100');
|
||||
content.classList.add('scale-95', 'opacity-0');
|
||||
// Mercedes-Modal Animation rückwärts
|
||||
content.classList.remove('show');
|
||||
|
||||
// Nach Animation verstecken
|
||||
setTimeout(() => {
|
||||
modal.classList.add('hidden');
|
||||
modal.style.display = 'none';
|
||||
console.log('✅ Modal geschlossen');
|
||||
}, 200);
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user