Gone live

This commit is contained in:
James Pattinson
2025-12-07 15:02:51 +00:00
parent 3780b3cf2f
commit 4d71d59d90
10 changed files with 542 additions and 401 deletions

View File

@@ -2308,20 +2308,9 @@
if (matches.length === 0) {
resultsDiv.innerHTML = '<div class="airport-no-match">No matches found - will use as entered</div>';
} else if (matches.length === 1) {
// Unique match found - auto-populate with ICAO code
const airport = matches[0];
resultsDiv.innerHTML = `
<div class="airport-match">
${airport.name} (${airport.icao})
</div>
`;
// Auto-populate with ICAO code
document.getElementById('in_from').value = airport.icao;
} else {
// Multiple matches - show clickable list
// Show matches as clickable options (single or multiple)
const matchText = matches.length === 1 ? 'Match found - click to select:' : 'Multiple matches found - select one:';
const listHtml = matches.map(airport => `
<div class="airport-option" onclick="selectArrivalAirport('${airport.icao}')">
<div>
@@ -2334,7 +2323,7 @@
resultsDiv.innerHTML = `
<div class="airport-no-match" style="margin-bottom: 0.5rem;">
Multiple matches found - select one:
${matchText}
</div>
<div class="airport-list">
${listHtml}
@@ -2348,20 +2337,9 @@
if (matches.length === 0) {
resultsDiv.innerHTML = '<div class="airport-no-match">No matches found - will use as entered</div>';
} else if (matches.length === 1) {
// Unique match found - auto-populate with ICAO code
const airport = matches[0];
resultsDiv.innerHTML = `
<div class="airport-match">
${airport.name} (${airport.icao})
</div>
`;
// Auto-populate with ICAO code
document.getElementById('out_to').value = airport.icao;
} else {
// Multiple matches - show clickable list
// Show matches as clickable options (single or multiple)
const matchText = matches.length === 1 ? 'Match found - click to select:' : 'Multiple matches found - select one:';
const listHtml = matches.map(airport => `
<div class="airport-option" onclick="selectDepartureAirport('${airport.icao}')">
<div>
@@ -2374,7 +2352,7 @@
resultsDiv.innerHTML = `
<div class="airport-no-match" style="margin-bottom: 0.5rem;">
Multiple matches found - select one:
${matchText}
</div>
<div class="airport-list">
${listHtml}