Spaces:
Build error
Build error
Update app.py
Browse files162 unmodified lines1631641651661671681691 unmodified line171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205162 unmodified lines"Veg Manchurian": 12};let finalized = false;function openModal(name, image, description, price, event) {if (finalized) {alert("You cannot add more items after finalizing your order.");return;1 unmodified lineconst modal = document.getElementById('modal');modal.style.display = 'block';modal.style.position = 'fixed';if (window.innerWidth <= 768) {// Mobile: Use touch Y positionmodal.style.width = '90%';modal.style.top = `${event.touches ? event.touches[0].screenY : event.clientY}px`;} else {// Laptop: Use mouse Y position + 7% of the screen heightmodal.style.width = '30%';const adjustedY = event.clientY + (window.innerHeight * 0.01);modal.style.top = `${adjustedY}px`;}modal.style.left = '50%';modal.style.transform = 'translate(-50%, -50%)';// Set modal contentdocument.getElementById('modal-image').src = image;document.getElementById('modal-name').innerText = name;document.getElementById('modal-description').innerText = description;document.getElementById('modal-price').innerText = price;// Reset inputsconst extrasInputs = document.querySelectorAll('input[name="biryani-extra"]');extrasInputs.forEach(input => input.checked = false);document.getElementById('quantity').value = 1;document.getElementById('special-instructions').value = '';}function closeModal() {document.getElementById('modal').style.display = 'none';}162 unmodified lines1631641651661671681691 unmodified line171172173174175176177178179180181182183184185186187188189190191192193194162 unmodified lines"Veg Manchurian": 12};let finalized = false;function openModal(name, image, description, price) {if (finalized) {alert("You cannot add more items after finalizing your order.");return;1 unmodified lineconst modal = document.getElementById('modal');modal.style.display = 'block';modal.style.position = 'fixed';if (window.innerWidth <= 768) {modal.style.width = '90%';modal.style.top = `${event.touches ? event.touches[0].screenY : event.clientY}px`;} else {modal.style.width = '30%';modal.style.top = `${event.clientY}px`;// Use mouse Y position for laptop}modal.style.left = '50%';modal.style.transform = 'translate(-50%, -50%)';document.getElementById('modal-image').src = image;document.getElementById('modal-name').innerText = name;document.getElementById('modal-description').innerText = description;document.getElementById('modal-price').innerText = price;const extrasInputs = document.querySelectorAll('input[name="biryani-extra"]');extrasInputs.forEach(input => input.checked = false);document.getElementById('quantity').value = 1;document.getElementById('special-instructions').value = '';}function closeModal() {document.getElementById('modal').style.display = 'none';}
app.py+3-14