diff --git a/public_html/index.html b/public_html/index.html index b50e730..8656229 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -230,7 +230,7 @@ ICAO - Ident + Ident Registration Aircraft type Squawk diff --git a/public_html/script.js b/public_html/script.js index 28b6172..6d30b30 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1259,7 +1259,8 @@ function refreshTableInfo() { if (tableplane.flight) { tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight, tableplane.flight); } else { - tableplane.tr.cells[2].innerHTML = ""; + // Show _registration if ident is not present + tableplane.tr.cells[2].innerHTML = (tableplane.registration !== null ? getFlightAwareIdentLink(tableplane.registration, '_' + tableplane.registration) : ""); } tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : ""); tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : ""); @@ -1311,7 +1312,7 @@ function compareNumeric(xf,yf) { } function sortByICAO() { sortBy('icao', compareAlpha, function(x) { return x.icao; }); } -function sortByFlight() { sortBy('flight', compareAlpha, function(x) { return x.flight; }); } +function sortByFlight() { sortBy('flight', compareAlpha, function(x) { return x.flight ? x.flight : x.registration; }); } function sortByRegistration() { sortBy('registration', compareAlpha, function(x) { return x.registration; }); } function sortByAircraftType() { sortBy('icaotype', compareAlpha, function(x) { return x.icaotype; }); } function sortBySquawk() { sortBy('squawk', compareAlpha, function(x) { return x.squawk; }); }