Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +0 -21
templates/menu.html
CHANGED
@@ -581,28 +581,7 @@ form.text-center.mb-4 {
|
|
581 |
document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
|
582 |
});
|
583 |
}
|
584 |
-
// Generalized function to handle single/multi-select logic for all modals
|
585 |
-
document.addEventListener('click', function(event) {
|
586 |
-
if (event.target.classList.contains('addon-option')) {
|
587 |
-
handleAddonClick(event.target);
|
588 |
-
}
|
589 |
-
});
|
590 |
|
591 |
-
// Handle single-select/deselect logic for checkbox groups in all modals
|
592 |
-
function handleAddonClick(checkbox) {
|
593 |
-
const groupName = checkbox.getAttribute('data-group');
|
594 |
-
const isMultiSelectGroup = ["Extra Toppings", "Choose Raita/Sides"].includes(groupName);
|
595 |
-
|
596 |
-
// If it's not multi-select, uncheck all other checkboxes in the same group
|
597 |
-
if (!isMultiSelectGroup) {
|
598 |
-
const checkboxes = document.querySelectorAll(.addon-option[data-group="${groupName}"]);
|
599 |
-
checkboxes.forEach(otherCheckbox => {
|
600 |
-
if (otherCheckbox !== checkbox) {
|
601 |
-
otherCheckbox.checked = false;
|
602 |
-
}
|
603 |
-
});
|
604 |
-
}
|
605 |
-
}
|
606 |
|
607 |
function filterMenu() {
|
608 |
let input = document.getElementById('searchBar').value.toLowerCase(); // Get the value from search bar
|
|
|
581 |
document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
|
582 |
});
|
583 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
|
586 |
function filterMenu() {
|
587 |
let input = document.getElementById('searchBar').value.toLowerCase(); // Get the value from search bar
|