Modified look and feel for the dl0xk installation

This commit is contained in:
LongHairedHacker 2019-11-03 17:00:53 +01:00
parent 089684e20f
commit de29e82327
4 changed files with 77 additions and 104 deletions

View file

@ -11,11 +11,11 @@ PlaneCountInTitle = true;
MessageRateInTitle = false; MessageRateInTitle = false;
// -- Output Settings ------------------------------------- // -- Output Settings -------------------------------------
// The DisplayUnits setting controls whether nautical (ft, NM, knots), // The DisplayUnits setting controls whether nautical (ft, NM, knots),
// metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the // metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the
// plane table and in the detailed plane info. Valid values are // plane table and in the detailed plane info. Valid values are
// "nautical", "metric", or "imperial". // "nautical", "metric", or "imperial".
DisplayUnits = "nautical"; DisplayUnits = "metric";
// -- Map settings ---------------------------------------- // -- Map settings ----------------------------------------
// These settings are overridden by any position information // These settings are overridden by any position information
@ -23,17 +23,17 @@ DisplayUnits = "nautical";
// degrees. // degrees.
// Default center of the map. // Default center of the map.
DefaultCenterLat = 45.0; DefaultCenterLat = 49.425626;
DefaultCenterLon = 9.0; DefaultCenterLon = 7.756527;
// The google maps zoom level, 0 - 16, lower is further out // The google maps zoom level, 0 - 16, lower is further out
DefaultZoomLvl = 7; DefaultZoomLvl = 8;
// Center marker. If dump1090 provides a receiver location, // Center marker. If dump1090 provides a receiver location,
// that location is used and these settings are ignored. // that location is used and these settings are ignored.
SiteShow = false; // true to show a center marker SiteShow = true; // true to show a center marker
SiteLat = 45.0; // position of the marker SiteLat = 49.425626; // position of the marker
SiteLon = 9.0; SiteLon = 7.756527;
SiteName = "My Radar Site"; // tooltip of the marker SiteName = "My Radar Site"; // tooltip of the marker
// -- Marker settings ------------------------------------- // -- Marker settings -------------------------------------
@ -96,7 +96,7 @@ OutlineMlatColor = '#4040FF';
SiteCircles = true; // true to show circles (only shown if the center marker is shown) SiteCircles = true; // true to show circles (only shown if the center marker is shown)
// In miles, nautical miles, or km (depending settings value 'DisplayUnits') // In miles, nautical miles, or km (depending settings value 'DisplayUnits')
SiteCirclesDistances = new Array(100,150,200); SiteCirclesDistances = new Array(25,50,75,100);
// Controls page title, righthand pane when nothing is selected // Controls page title, righthand pane when nothing is selected
PageName = "PiAware SkyAware"; PageName = "PiAware SkyAware";

View file

@ -23,7 +23,7 @@
<script type="text/javascript" src="flags.js?v=3.7.2"></script> <script type="text/javascript" src="flags.js?v=3.7.2"></script>
<script type="text/javascript" src="layers.js?v=3.7.2"></script> <script type="text/javascript" src="layers.js?v=3.7.2"></script>
<script type="text/javascript" src="script.js?v=3.7.2"></script> <script type="text/javascript" src="script.js?v=3.7.2"></script>
<title>PiAware SkyAware</title> <title>DL0XK Aeorspectator</title>
</head> </head>
<body onload="initialize()"> <body onload="initialize()">
@ -46,25 +46,8 @@
<input type="hidden" name="submit" value="submit"> <input type="hidden" name="submit" value="submit">
</form> </form>
<div id="header" class="infoHeading">
<div class="logoContainer">
<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/fa_logo_color@2x.png 2x, images/fa_logo_color@3x.png 3x"></a>
<img src="images/pa-sa-logo.png" alt="PiAware SkyAware" class="adsbLogo piAwareLogo" srcset="images/pa-sa-logo.png 1x, images/pa-sa-logo@2x.png 2x, images/pa-sa-logo@3x.png 3x">
<img src="images/ff-sa-logo.png" alt="FlightFeeder SkyAware" class="adsbLogo flightfeederLogo" srcset="images/ff-sa-logo.png 1x, images/ff-sa-logo@2x.png 2x, images/ff-sa-logo@3x.png 3x" style="display: none;">
</div>
<div class="buttonContainer">
<div class="dateTime" id="clock_div"></div>
<div class="button buttonHeader" onclick="resetMap();"><span class="buttonText">Reset Map</span></div>
<div class="button buttonHeader" onclick="selectAllPlanes();"><span class="buttonText">Show All Tracks</span></div>
<div class="button buttonHeader" onclick="deselectAllPlanes();"><span class="buttonText">Hide All Tracks</span></div>
</div>
<div class="settingsContainer"><img src="images/settings-icon.png" id="settingsCog" srcset="images/settings-icon.png 1x, images/settings-icon@2x.png 2x, images/settings-icon@3x.png 3x"></div>
</div>
<div id="layout_container"> <div id="layout_container">
<div id="highlighted_infoblock"> <div id="highlighted_infoblock">
<div class="highlightedTitle"> <div class="highlightedTitle">
<span class="identLarge"><span id="highlighted_callsign">n/a</span></span> <span class="identLarge"><span id="highlighted_callsign">n/a</span></span>
@ -167,8 +150,8 @@
<div id="sidebar_container"> <div id="sidebar_container">
<div id="splitter" class="ui-resizable-handle ui-resizable-w"></div> <div id="splitter" class="ui-resizable-handle ui-resizable-w"></div>
<div id="sidebar_canvas"> <div id="sidebar_canvas">
<div id="sidebar-table"> <div id="sidebar-table">
<div id="dump1090_infoblock"> <div id="dump1090_infoblock">
<table style="width: 100%"> <table style="width: 100%">
@ -180,30 +163,19 @@
<a href="https://github.com/flightaware/dump1090" id="dump1090_version" target="_blank"></a> <a href="https://github.com/flightaware/dump1090" id="dump1090_version" target="_blank"></a>
</td> </td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td><span class="infoBlockTitleText">Total Aircraft:</span> <span id="dump1090_total_ac">n/a</span></td> <td><span class="infoBlockTitleText">Total Aircraft:</span> <span id="dump1090_total_ac">n/a</span></td>
<td><span class="infoBlockTitleText">Messages:</span> <span id="dump1090_message_rate">n/a</span>/sec</td> <td><span class="infoBlockTitleText">Messages:</span> <span id="dump1090_message_rate">n/a</span>/sec</td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td><span class="infoBlockTitleText">With Positions:</span> <span id="dump1090_total_ac_positions">n/a</span></td> <td><span class="infoBlockTitleText">With Positions:</span> <span id="dump1090_total_ac_positions">n/a</span></td>
<td><span class="infoBlockTitleText">History:</span> <span id="dump1090_total_history">n/a</span> positions</td> <td><span class="infoBlockTitleText">History:</span> <span id="dump1090_total_history">n/a</span> positions</td>
</tr> </tr>
</table> </table>
</div> <!-- dump1090_infoblock --> </div> <!-- dump1090_infoblock -->
<form id="altitude_filter_form">
<label><span class="infoBlockTitleText">Filter by Altitude:</span></label>
<input id="altitude_filter_min" name="minAltitude" type="text" class="altitudeFilterInput" maxlength="5">
<label for="minAltitude" class="altitudeUnit"></label>
<span> to </span>
<input id="altitude_filter_max" name="maxAltitude" type="text" class="altitudeFilterInput" maxlength="5">
<label for="maxAltitude" class="altitudeUnit"></label>
<button type="submit">Filter</button>
<button id="altitude_filter_reset_button">Reset</button>
</form>
<div id="planes_table"> <div id="planes_table">
<table id="tableinfo" style="width: 100%"> <table id="tableinfo" style="width: 100%">
<thead class="aircraft_table_header"> <thead class="aircraft_table_header">
@ -268,13 +240,13 @@
</div> <!-- planes_table --> </div> <!-- planes_table -->
</div> </div>
</div> <!-- sidebar_canvas --> </div> <!-- sidebar_canvas -->
<div id="selected_infoblock" class="hidden"> <div id="selected_infoblock" class="hidden">
<div id="splitter-infoblock" class="ui-resizable-handle ui-resizable-n"></div> <div id="splitter-infoblock" class="ui-resizable-handle ui-resizable-n"></div>
<div id="close-button">Close</div> <div id="close-button">Close</div>
<div class="infoblock-container"> <div class="infoblock-container">
@ -283,7 +255,7 @@
<span class="identLarge" title="Typically the air traffic control callsign or the aircraft's registration, as entered into the transponder by the pilot."><span id="selected_callsign">n/a</span></span> <span class="identLarge" title="Typically the air traffic control callsign or the aircraft's registration, as entered into the transponder by the pilot."><span id="selected_callsign">n/a</span></span>
<span class="identSmall" title="The aircraft's unique ICAO identification number shown in hexadecimal format."><span id="selected_icao">n/a</span></span> <span class="identSmall" title="The aircraft's unique ICAO identification number shown in hexadecimal format."><span id="selected_icao">n/a</span></span>
</div> </div>
<div class="infoBlockTopSection"> <div class="infoBlockTopSection">
<span id="selected_flightaware_link" class=""></span> <span id="selected_flightaware_link" class=""></span>
<div class="infoRow removePadding"> <div class="infoRow removePadding">
@ -612,7 +584,7 @@
<span id="selected_rc">n/a</span> <span id="selected_rc">n/a</span>
</div> </div>
</div> </div>
</div> </div>
@ -622,18 +594,18 @@
<div class="bottom-container"> <div class="bottom-container">
<div class="selected_airframe"> <div class="selected_airframe">
<a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;"> <a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;">
airframes.org airframes.org
</a> </a>
</div> </div>
</div> </div>
</div> </div>
</div> <!-- selected_infoblock --> </div> <!-- selected_infoblock -->
</div> <!-- sidebar_container --> </div> <!-- sidebar_container -->
</div> <!-- layout_container --> </div> <!-- layout_container -->

View file

@ -154,12 +154,12 @@ function fetchData() {
var plane = PlanesOrdered[i]; var plane = PlanesOrdered[i];
plane.updateTick(now, LastReceiverTimestamp); plane.updateTick(now, LastReceiverTimestamp);
} }
selectNewPlanes(); selectNewPlanes();
refreshTableInfo(); refreshTableInfo();
refreshSelected(); refreshSelected();
refreshHighlighted(); refreshHighlighted();
if (ReceiverClock) { if (ReceiverClock) {
var rcv = new Date(now * 1000); var rcv = new Date(now * 1000);
ReceiverClock.render(rcv.getUTCHours(),rcv.getUTCMinutes(),rcv.getUTCSeconds()); ReceiverClock.render(rcv.getUTCHours(),rcv.getUTCMinutes(),rcv.getUTCSeconds());
@ -172,7 +172,7 @@ function fetchData() {
$("#update_error_detail").text("The data from dump1090 hasn't been updated in a while. Maybe dump1090 is no longer running?"); $("#update_error_detail").text("The data from dump1090 hasn't been updated in a while. Maybe dump1090 is no longer running?");
$("#update_error").css('display','block'); $("#update_error").css('display','block');
} }
} else { } else {
StaleReceiverCount = 0; StaleReceiverCount = 0;
LastReceiverTimestamp = now; LastReceiverTimestamp = now;
$("#update_error").css('display','none'); $("#update_error").css('display','none');
@ -225,7 +225,7 @@ function initialize() {
SelectedPlane = null; SelectedPlane = null;
selectedPlane.selected = null; selectedPlane.selected = null;
selectedPlane.clearLines(); selectedPlane.clearLines();
selectedPlane.updateMarker(); selectedPlane.updateMarker();
refreshSelected(); refreshSelected();
refreshHighlighted(); refreshHighlighted();
$('#selected_infoblock').hide(); $('#selected_infoblock').hide();
@ -239,7 +239,7 @@ function initialize() {
// look at the window resize to resize the pop-up infoblock so it doesn't float off the bottom or go off the top // look at the window resize to resize the pop-up infoblock so it doesn't float off the bottom or go off the top
$(window).on('resize', function() { $(window).on('resize', function() {
var topCalc = ($(window).height() - $('#selected_infoblock').height() - 60); var topCalc = ($(window).height() - $('#selected_infoblock').height() - 60);
// check if the top will be less than zero, which will be overlapping/off the screen, and set the top correctly. // check if the top will be less than zero, which will be overlapping/off the screen, and set the top correctly.
if (topCalc < 0) { if (topCalc < 0) {
topCalc = 0; topCalc = 0;
$('#selected_infoblock').css('height', ($(window).height() - 60) +'px'); $('#selected_infoblock').css('height', ($(window).height() - 60) +'px');
@ -247,7 +247,7 @@ function initialize() {
$('#selected_infoblock').css('top', topCalc + 'px'); $('#selected_infoblock').css('top', topCalc + 'px');
}); });
// to make the infoblock responsive // to make the infoblock responsive
$('#sidebar_container').on('resize', function() { $('#sidebar_container').on('resize', function() {
if ($('#sidebar_container').width() < 500) { if ($('#sidebar_container').width() < 500) {
$('#selected_infoblock').addClass('infoblock-container-small'); $('#selected_infoblock').addClass('infoblock-container-small');
@ -255,7 +255,7 @@ function initialize() {
$('#selected_infoblock').removeClass('infoblock-container-small'); $('#selected_infoblock').removeClass('infoblock-container-small');
} }
}); });
// Set up event handlers for buttons // Set up event handlers for buttons
$("#toggle_sidebar_button").click(toggleSidebarVisibility); $("#toggle_sidebar_button").click(toggleSidebarVisibility);
$("#expand_sidebar_button").click(expandSidebar); $("#expand_sidebar_button").click(expandSidebar);
@ -274,7 +274,7 @@ function initialize() {
errorPlacement: function(error, element) { errorPlacement: function(error, element) {
return true; return true;
}, },
rules: { rules: {
minAltitude: { minAltitude: {
number: true, number: true,
@ -325,7 +325,7 @@ function initialize() {
} else { } else {
sortByDataSource(); sortByDataSource();
} }
}); });
$('#altitude_checkbox').on('click', function() { $('#altitude_checkbox').on('click', function() {
@ -366,7 +366,7 @@ function initialize() {
DefaultCenterLat = data.lat; DefaultCenterLat = data.lat;
DefaultCenterLon = data.lon; DefaultCenterLon = data.lon;
} }
Dump1090Version = data.version; Dump1090Version = data.version;
RefreshInterval = data.refresh; RefreshInterval = data.refresh;
PositionHistorySize = data.history; PositionHistorySize = data.history;
@ -505,9 +505,9 @@ function make_geodesic_circle(center, radius, points) {
// Initalizes the map and starts up our timers to call various functions // Initalizes the map and starts up our timers to call various functions
function initialize_map() { function initialize_map() {
// Load stored map settings if present // Load stored map settings if present
CenterLat = Number(localStorage['CenterLat']) || DefaultCenterLat; CenterLat = DefaultCenterLat;
CenterLon = Number(localStorage['CenterLon']) || DefaultCenterLon; CenterLon = DefaultCenterLon;
ZoomLvl = Number(localStorage['ZoomLvl']) || DefaultZoomLvl; ZoomLvl = DefaultZoomLvl;
MapType = localStorage['MapType']; MapType = localStorage['MapType'];
// Set SitePosition, initialize sorting // Set SitePosition, initialize sorting
@ -648,7 +648,7 @@ function initialize_map() {
} }
} }
}); });
OLMap.getView().on('change:resolution', function(event) { OLMap.getView().on('change:resolution', function(event) {
ZoomLvl = localStorage['ZoomLvl'] = OLMap.getView().getZoom(); ZoomLvl = localStorage['ZoomLvl'] = OLMap.getView().getZoom();
for (var plane in Planes) { for (var plane in Planes) {
@ -722,7 +722,7 @@ function initialize_map() {
var feature = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat(SitePosition))); var feature = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat(SitePosition)));
feature.setStyle(markerStyle); feature.setStyle(markerStyle);
StaticFeatures.push(feature); StaticFeatures.push(feature);
if (SiteCircles) { if (SiteCircles) {
createSiteCircleFeatures(); createSiteCircleFeatures();
} }
@ -781,7 +781,7 @@ function initialize_map() {
function createSiteCircleFeatures() { function createSiteCircleFeatures() {
// Clear existing circles first // Clear existing circles first
SiteCircleFeatures.forEach(function(circleFeature) { SiteCircleFeatures.forEach(function(circleFeature) {
StaticFeatures.remove(circleFeature); StaticFeatures.remove(circleFeature);
}); });
SiteCircleFeatures.clear(); SiteCircleFeatures.clear();
@ -829,7 +829,7 @@ function reaper() {
for (var i = 0; i < PlanesOrdered.length; ++i) { for (var i = 0; i < PlanesOrdered.length; ++i) {
var plane = PlanesOrdered[i]; var plane = PlanesOrdered[i];
if (plane.seen > 300) { if (plane.seen > 300) {
// Reap it. // Reap it.
plane.tr.parentNode.removeChild(plane.tr); plane.tr.parentNode.removeChild(plane.tr);
plane.tr = null; plane.tr = null;
delete Planes[plane.icao]; delete Planes[plane.icao];
@ -879,12 +879,12 @@ function refreshSelected() {
} }
refreshPageTitle(); refreshPageTitle();
var selected = false; var selected = false;
if (typeof SelectedPlane !== 'undefined' && SelectedPlane != "ICAO" && SelectedPlane != null) { if (typeof SelectedPlane !== 'undefined' && SelectedPlane != "ICAO" && SelectedPlane != null) {
selected = Planes[SelectedPlane]; selected = Planes[SelectedPlane];
} }
$('#dump1090_infoblock').css('display','block'); $('#dump1090_infoblock').css('display','block');
$('#dump1090_version').text(Dump1090Version); $('#dump1090_version').text(Dump1090Version);
$('#dump1090_total_ac').text(TrackedAircraft); $('#dump1090_total_ac').text(TrackedAircraft);
@ -902,7 +902,7 @@ function refreshSelected() {
if (!selected) { if (!selected) {
return; return;
} }
if (selected.flight !== null && selected.flight !== "") { if (selected.flight !== null && selected.flight !== "") {
$('#selected_callsign').text(selected.flight); $('#selected_callsign').text(selected.flight);
} else { } else {
@ -940,7 +940,7 @@ function refreshSelected() {
} else { } else {
$('#selected_squawk').text(selected.squawk); $('#selected_squawk').text(selected.squawk);
} }
$('#selected_speed').text(format_speed_long(selected.gs, DisplayUnits)); $('#selected_speed').text(format_speed_long(selected.gs, DisplayUnits));
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits)); $('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
$('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits)); $('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits));
@ -969,13 +969,13 @@ function refreshSelected() {
$('#selected_position').text('n/a'); $('#selected_position').text('n/a');
$('#selected_follow').addClass('hidden'); $('#selected_follow').addClass('hidden');
} else { } else {
if (selected.seen_pos > 1) { if (selected.seen_pos > 1) {
$('#selected_position').text(format_latlng(selected.position)); $('#selected_position').text(format_latlng(selected.position));
} else { } else {
$('#selected_position').text(format_latlng(selected.position)); $('#selected_position').text(format_latlng(selected.position));
} }
$('#selected_follow').removeClass('hidden'); $('#selected_follow').removeClass('hidden');
if (FollowSelected) { if (FollowSelected) {
$('#selected_follow').css('font-weight', 'bold'); $('#selected_follow').css('font-weight', 'bold');
@ -998,7 +998,7 @@ function refreshSelected() {
$('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS'); $('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS');
$('#selected_message_count').text(selected.messages); $('#selected_message_count').text(selected.messages);
$('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration)); $('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration));
$('#selected_altitude_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits)); $('#selected_altitude_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits));
$('#selected_mag_heading').text(format_track_long(selected.mag_heading)); $('#selected_mag_heading').text(format_track_long(selected.mag_heading));
$('#selected_true_heading').text(format_track_long(selected.true_heading)); $('#selected_true_heading').text(format_track_long(selected.true_heading));
@ -1062,7 +1062,7 @@ function refreshSelected() {
} else if (selected.sil_type == "persample") { } else if (selected.sil_type == "persample") {
sampleRate = " per sample"; sampleRate = " per sample";
} }
switch (selected.sil) { switch (selected.sil) {
case 0: case 0:
silDesc = "&gt; 1×10<sup>-3</sup>"; silDesc = "&gt; 1×10<sup>-3</sup>";
@ -1240,11 +1240,11 @@ function refreshTableInfo() {
if (tableplane.icao == SelectedPlane) if (tableplane.icao == SelectedPlane)
classes += " selected"; classes += " selected";
if (tableplane.squawk in SpecialSquawks) { if (tableplane.squawk in SpecialSquawks) {
classes = classes + " " + SpecialSquawks[tableplane.squawk].cssClass; classes = classes + " " + SpecialSquawks[tableplane.squawk].cssClass;
show_squawk_warning = true; show_squawk_warning = true;
} }
// ICAO doesn't change // ICAO doesn't change
if (tableplane.flight) { if (tableplane.flight) {
@ -1350,7 +1350,7 @@ function resortTable() {
} }
PlanesOrdered.sort(sortFunction); PlanesOrdered.sort(sortFunction);
var tbody = document.getElementById('tableinfo').tBodies[0]; var tbody = document.getElementById('tableinfo').tBodies[0];
for (var i = 0; i < PlanesOrdered.length; ++i) { for (var i = 0; i < PlanesOrdered.length; ++i) {
tbody.appendChild(PlanesOrdered[i].tr); tbody.appendChild(PlanesOrdered[i].tr);
@ -1406,7 +1406,7 @@ function selectPlaneByHex(hex,autofollow) {
Planes[SelectedPlane].updateLines(); Planes[SelectedPlane].updateLines();
Planes[SelectedPlane].updateMarker(); Planes[SelectedPlane].updateMarker();
$(Planes[SelectedPlane].tr).addClass("selected"); $(Planes[SelectedPlane].tr).addClass("selected");
} else { } else {
SelectedPlane = null; SelectedPlane = null;
} }
@ -1416,7 +1416,7 @@ function selectPlaneByHex(hex,autofollow) {
OLMap.getView().setZoom(8); OLMap.getView().setZoom(8);
} else { } else {
FollowSelected = false; FollowSelected = false;
} }
refreshSelected(); refreshSelected();
refreshHighlighted(); refreshHighlighted();
@ -1512,7 +1512,7 @@ function resetMap() {
// Set and refresh // Set and refresh
OLMap.getView().setZoom(ZoomLvl); OLMap.getView().setZoom(ZoomLvl);
OLMap.getView().setCenter(ol.proj.fromLonLat([CenterLon, CenterLat])); OLMap.getView().setCenter(ol.proj.fromLonLat([CenterLon, CenterLat]));
selectPlaneByHex(null,false); selectPlaneByHex(null,false);
} }
@ -1551,7 +1551,7 @@ function showMap() {
$("#sidebar_container").width("470px"); $("#sidebar_container").width("470px");
setColumnVisibility(); setColumnVisibility();
setSelectedInfoBlockVisibility(); setSelectedInfoBlockVisibility();
updateMapSize(); updateMapSize();
} }
function showColumn(table, columnId, visible) { function showColumn(table, columnId, visible) {
@ -1571,7 +1571,7 @@ function setColumnVisibility() {
var infoTable = $("#tableinfo"); var infoTable = $("#tableinfo");
showColumn(infoTable, "#registration", !mapIsVisible); showColumn(infoTable, "#registration", !mapIsVisible);
showColumn(infoTable, "#aircraft_type", !mapIsVisible); showColumn(infoTable, "#aircraft_type", !mapIsVisible);
showColumn(infoTable, "#vert_rate", !mapIsVisible); showColumn(infoTable, "#vert_rate", !mapIsVisible);
showColumn(infoTable, "#rssi", !mapIsVisible); showColumn(infoTable, "#rssi", !mapIsVisible);
showColumn(infoTable, "#lat", !mapIsVisible); showColumn(infoTable, "#lat", !mapIsVisible);
@ -1613,7 +1613,7 @@ function adjustSelectedInfoBlockPosition() {
var marker = selectedPlane.marker; var marker = selectedPlane.marker;
var markerCoordinates = selectedPlane.marker.getGeometry().getCoordinates(); var markerCoordinates = selectedPlane.marker.getGeometry().getCoordinates();
var markerPosition = OLMap.getPixelFromCoordinate(markerCoordinates); var markerPosition = OLMap.getPixelFromCoordinate(markerCoordinates);
// Get map size // Get map size
var mapCanvas = $('#map_canvas'); var mapCanvas = $('#map_canvas');
var mapExtent = getExtent(0, 0, mapCanvas.width(), mapCanvas.height()); var mapExtent = getExtent(0, 0, mapCanvas.width(), mapCanvas.height());
@ -1638,7 +1638,7 @@ function adjustSelectedInfoBlockPosition() {
} }
} }
} }
} }
catch(e) { } catch(e) { }
} }
@ -1718,7 +1718,7 @@ function onFilterByAltitude(e) {
SelectedPlane = null; SelectedPlane = null;
selectedPlane.selected = false; selectedPlane.selected = false;
selectedPlane.clearLines(); selectedPlane.clearLines();
selectedPlane.updateMarker(); selectedPlane.updateMarker();
refreshSelected(); refreshSelected();
refreshHighlighted(); refreshHighlighted();
} }
@ -1840,7 +1840,7 @@ function getFlightAwarePhotoLink(registration) {
return "<a target=\"_blank\" href=\"https://flightaware.com/photos/aircraft/" + registration.replace(/[^0-9a-z]/ig,'') + "\">See Photos</a>"; return "<a target=\"_blank\" href=\"https://flightaware.com/photos/aircraft/" + registration.replace(/[^0-9a-z]/ig,'') + "\">See Photos</a>";
} }
return ""; return "";
} }
function getAirframesModeSLink(code) { function getAirframesModeSLink(code) {
@ -1848,14 +1848,14 @@ function getAirframesModeSLink(code) {
return "<a href=\"http://www.airframes.org/\" onclick=\"$('#airframes_post_icao').attr('value','" + code + "'); document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;\">Airframes.org: " + code.toUpperCase() + "</a>"; return "<a href=\"http://www.airframes.org/\" onclick=\"$('#airframes_post_icao').attr('value','" + code + "'); document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;\">Airframes.org: " + code.toUpperCase() + "</a>";
} }
return ""; return "";
} }
// takes in an elemnt jQuery path and the OL3 layer name and toggles the visibility based on clicking it // takes in an elemnt jQuery path and the OL3 layer name and toggles the visibility based on clicking it
function toggleLayer(element, layer) { function toggleLayer(element, layer) {
// set initial checked status // set initial checked status
ol.control.LayerSwitcher.forEachRecursive(layers, function(lyr) { ol.control.LayerSwitcher.forEachRecursive(layers, function(lyr) {
if (lyr.get('name') === layer && lyr.getVisible()) { if (lyr.get('name') === layer && lyr.getVisible()) {
$(element).addClass('settingsCheckboxChecked'); $(element).addClass('settingsCheckboxChecked');
} }
@ -1865,7 +1865,7 @@ function toggleLayer(element, layer) {
if ($(element).hasClass('settingsCheckboxChecked')) { if ($(element).hasClass('settingsCheckboxChecked')) {
visible = true; visible = true;
} }
ol.control.LayerSwitcher.forEachRecursive(layers, function(lyr) { ol.control.LayerSwitcher.forEachRecursive(layers, function(lyr) {
if (lyr.get('name') === layer) { if (lyr.get('name') === layer) {
if (visible) { if (visible) {
lyr.setVisible(false); lyr.setVisible(false);

View file

@ -4,9 +4,9 @@ html, body {
font-size: 10pt; overflow: hidden; height: 100%; font-size: 10pt; overflow: hidden; height: 100%;
} }
#layout_container { #layout_container {
display: flex; display: flex;
height: calc(100% - 60px);; height: 100%;
} }
#selected_infoblock { #selected_infoblock {
@ -21,9 +21,10 @@ html, body {
overflow: scroll; overflow: scroll;
height: 100%; height: 100%;
} }
#sidebar_canvas { #sidebar_canvas {
padding: 10px; padding: 10px;
overflow: scroll; overflow: scroll;
height: 100%
} }
#sidebar_container { #sidebar_container {
display: flex; display: flex;
@ -203,7 +204,7 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right:
margin: 10px 0 10px 0; margin: 10px 0 10px 0;
} }
.aircraft_table_header { .aircraft_table_header {
background-color: #002F5D; background-color: #002F5D;
color: #FFFFFF; color: #FFFFFF;
cursor: pointer; cursor: pointer;
@ -231,7 +232,7 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right:
.squawk7600 { font-weight: bold; background-color: #00ffff; } .squawk7600 { font-weight: bold; background-color: #00ffff; }
.squawk7700 { font-weight: bold; background-color: #ffff00; } .squawk7700 { font-weight: bold; background-color: #ffff00; }
.selected { background-color: #dddddd; } .selected { background-color: #dddddd; }
.plane_table_row { .plane_table_row {
cursor: pointer; cursor: pointer;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
} }
@ -718,7 +719,7 @@ select.error, textarea.error, input.error {
} }
/* Retina 2x images */ /* Retina 2x images */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.settingsCloseBox { .settingsCloseBox {
background-image: url('images/close-settings@2x.png'); background-image: url('images/close-settings@2x.png');
} }
@ -746,7 +747,7 @@ select.error, textarea.error, input.error {
} }
/* Retina 3x images */ /* Retina 3x images */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 192dpi) { @media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 192dpi) {
.settingsCloseBox { .settingsCloseBox {
background-image: url('images/close-settings@3x.png'); background-image: url('images/close-settings@3x.png');
} }
@ -771,4 +772,4 @@ select.error, textarea.error, input.error {
#toggle_sidebar_button.hide_sidebar { #toggle_sidebar_button.hide_sidebar {
background-image: url("images/map-icon@3x.png"); background-image: url("images/map-icon@3x.png");
} }
} }