From 29f1d2f0f2a3fafcf9ee8a1bd85f9009c62b7e78 Mon Sep 17 00:00:00 2001 From: moanos Date: Thu, 9 Jan 2025 06:41:54 +0100 Subject: [PATCH] feat: Fill search query with detailed information to make sure photon will get the same location --- src/fellchensammlung/templates/fellchensammlung/search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/search.html b/src/fellchensammlung/templates/fellchensammlung/search.html index a730cf2..22be51b 100644 --- a/src/fellchensammlung/templates/fellchensammlung/search.html +++ b/src/fellchensammlung/templates/fellchensammlung/search.html @@ -60,12 +60,12 @@ locations.forEach(location => { const listItem = document.createElement('li'); listItem.classList.add('result-item'); - listItem.textContent = location.properties.name; + listItem.textContent = location.properties.name + " (" + location.properties.city+")"; // Add event when user clicks on a result location listItem.addEventListener('click', () => { - locationInput.value = location.properties.name; // Set input field to selected location + locationInput.value = location.properties.name + ", " + location.properties.city + ", " + location.properties.country; // Set input field to selected location resultsList.innerHTML = ''; // Clear the results after selecting a location });