Add link to FlightAware flight tracking page
This commit is contained in:
parent
2215a98a08
commit
c99375d51c
|
@ -183,5 +183,13 @@ function format_data_source(source) {
|
||||||
return "Mode A/C";
|
return "Mode A/C";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_ident(ident) {
|
||||||
|
if (ident !== null && ident !== "") {
|
||||||
|
return "<a href=\"https://flightaware.com/live/flight/" + ident.trim() + "\">" + ident + "</a>";
|
||||||
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
|
@ -91,11 +91,22 @@ function processReceiverUpdate(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
plane.tr.addEventListener('click', function(h, evt) {
|
plane.tr.addEventListener('click', function(h, evt) {
|
||||||
|
if (evt.srcElement instanceof HTMLAnchorElement) {
|
||||||
|
evt.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$("#map_container").is(":visible")) {
|
||||||
|
showMap();
|
||||||
|
}
|
||||||
selectPlaneByHex(h, false);
|
selectPlaneByHex(h, false);
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}.bind(undefined, hex));
|
}.bind(undefined, hex));
|
||||||
|
|
||||||
plane.tr.addEventListener('dblclick', function(h, evt) {
|
plane.tr.addEventListener('dblclick', function(h, evt) {
|
||||||
|
if (!$("#map_container").is(":visible")) {
|
||||||
|
showMap();
|
||||||
|
}
|
||||||
selectPlaneByHex(h, true);
|
selectPlaneByHex(h, true);
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}.bind(undefined, hex));
|
}.bind(undefined, hex));
|
||||||
|
@ -215,7 +226,7 @@ function initialize() {
|
||||||
var mapResizeTimeout;
|
var mapResizeTimeout;
|
||||||
$("#sidebar_container").on("resize", function() {
|
$("#sidebar_container").on("resize", function() {
|
||||||
clearTimeout(mapResizeTimeout);
|
clearTimeout(mapResizeTimeout);
|
||||||
mapResizeTimeout = setTimeout(updateMapSize, 50);
|
mapResizeTimeout = setTimeout(updateMapSize, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get receiver metadata, reconfigure using it, then continue
|
// Get receiver metadata, reconfigure using it, then continue
|
||||||
|
@ -789,7 +800,7 @@ function refreshTableInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ICAO doesn't change
|
// ICAO doesn't change
|
||||||
tableplane.tr.cells[2].textContent = (tableplane.flight !== null ? tableplane.flight : "");
|
tableplane.tr.cells[2].innerHTML = format_ident(tableplane.flight);
|
||||||
tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : "");
|
tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : "");
|
||||||
tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : "");
|
tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : "");
|
||||||
tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");
|
tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");
|
||||||
|
|
Loading…
Reference in a new issue