lokesh341 commited on
Commit
461857a
·
verified ·
1 Parent(s): 0682d20

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +16 -3
templates/menu.html CHANGED
@@ -863,7 +863,9 @@
863
  }
864
  .mic-popup-icon {
865
  font-size: 36px;
866
- margin-bottom: 15px;
 
 
867
  }
868
  .mic-popup-text {
869
  font-size: 16px;
@@ -1592,6 +1594,14 @@
1592
  const searchBar = document.getElementById('searchBar');
1593
  const suggestionsContainer = document.getElementById('autocompleteSuggestions');
1594
  const debouncedFilterMenu = debounce(filterMenu, 300);
 
 
 
 
 
 
 
 
1595
  searchBar.addEventListener('input', function () {
1596
  const input = sanitizeInput(this.value.trim().toLowerCase());
1597
  suggestionsContainer.innerHTML = '';
@@ -1617,6 +1627,8 @@
1617
  }
1618
  debouncedFilterMenu();
1619
  });
 
 
1620
  document.addEventListener('click', function (event) {
1621
  if (!searchBar.contains(event.target) && !suggestionsContainer.contains(event.target)) {
1622
  suggestionsContainer.style.display = 'none';
@@ -1949,10 +1961,11 @@
1949
  optionsContainer.appendChild(listItem);
1950
  });
1951
  sectionDiv.appendChild(optionsContainer);
1952
- addonsList.appendChild(sectionDiv);
1953
  });
1954
  })
1955
- .catch(err => {
 
1956
  console.error('Error fetching add-ons:', err);
1957
  document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
1958
  });
 
863
  }
864
  .mic-popup-icon {
865
  font-size: 36px;
866
+ margin-bottom: 15
867
+  
868
+ px;
869
  }
870
  .mic-popup-text {
871
  font-size: 16px;
 
1594
  const searchBar = document.getElementById('searchBar');
1595
  const suggestionsContainer = document.getElementById('autocompleteSuggestions');
1596
  const debouncedFilterMenu = debounce(filterMenu, 300);
1597
+
1598
+ // Add click event to redirect to search page
1599
+ searchBar.addEventListener('click', function (event) {
1600
+ event.stopPropagation();
1601
+ window.location.href = '/search';
1602
+ });
1603
+
1604
+ // Existing input event listener for autocomplete and filtering
1605
  searchBar.addEventListener('input', function () {
1606
  const input = sanitizeInput(this.value.trim().toLowerCase());
1607
  suggestionsContainer.innerHTML = '';
 
1627
  }
1628
  debouncedFilterMenu();
1629
  });
1630
+
1631
+ // Close suggestions when clicking outside
1632
  document.addEventListener('click', function (event) {
1633
  if (!searchBar.contains(event.target) && !suggestionsContainer.contains(event.target)) {
1634
  suggestionsContainer.style.display = 'none';
 
1961
  optionsContainer.appendChild(listItem);
1962
  });
1963
  sectionDiv.appendChild(optionsContainer);
1964
+ addonsList.appendChild(sectionDiv);
1965
  });
1966
  })
1967
+
1968
+ .catch(err => {
1969
  console.error('Error fetching add-ons:', err);
1970
  document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
1971
  });