Add functionality to ground vehicle and blocked MLAT filter
Add box shadow to header
This commit is contained in:
parent
6b699bffc3
commit
bee850061e
|
@ -222,11 +222,11 @@
|
||||||
<div class="settingsColumn">
|
<div class="settingsColumn">
|
||||||
<div class="infoBlockTitleText">View Toggles</div>
|
<div class="infoBlockTitleText">View Toggles</div>
|
||||||
<div class="settingsOptionContainer">
|
<div class="settingsOptionContainer">
|
||||||
<div class="settingsCheckbox"></div>
|
<div class="settingsCheckbox" id="blockedmlat_filter"></div>
|
||||||
<div class="settingsText">Blocked MLAT Flights</div>
|
<div class="settingsText">Blocked MLAT Flights</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingsOptionContainer">
|
<div class="settingsOptionContainer">
|
||||||
<div class="settingsCheckbox"></div>
|
<div class="settingsCheckbox" id="groundvehicle_filter"></div>
|
||||||
<div class="settingsText">Ground Vehicles</div>
|
<div class="settingsText">Ground Vehicles</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingsOptionContainer">
|
<div class="settingsOptionContainer">
|
||||||
|
|
|
@ -86,6 +86,20 @@ PlaneObject.prototype.isFiltered = function() {
|
||||||
return planeAltitude < this.filter.minAltitude || planeAltitude > this.filter.maxAltitude;
|
return planeAltitude < this.filter.minAltitude || planeAltitude > this.filter.maxAltitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// filter out ground vehicles
|
||||||
|
if (typeof this.filter.groundVehicles !== 'undefined' && this.filter.groundVehicles === 'filtered') {
|
||||||
|
if (typeof this.category === 'string' && this.category.startsWith('C')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// filter out blocked MLAT flights
|
||||||
|
if (typeof this.filter.blockedMLAT !== 'undefined' && this.filter.blockedMLAT === 'filtered') {
|
||||||
|
if (typeof this.icao === 'string' && this.icao.startsWith('~')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,9 +236,23 @@ function initialize() {
|
||||||
$('#settings_infoblock').toggle();
|
$('#settings_infoblock').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#groundvehicle_filter').on('click', function() {
|
||||||
|
filterGroundVehicles(true);
|
||||||
|
refreshSelected();
|
||||||
|
refreshHighlighted();
|
||||||
|
refreshTableInfo();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#blockedmlat_filter').on('click', function() {
|
||||||
|
filterBlockedMLAT(true);
|
||||||
|
refreshSelected();
|
||||||
|
refreshHighlighted();
|
||||||
|
refreshTableInfo();
|
||||||
|
});
|
||||||
|
|
||||||
$('#grouptype_checkbox').on('click', function() {
|
$('#grouptype_checkbox').on('click', function() {
|
||||||
if ($('#grouptype_checkbox').hasClass('settingsCheckboxChecked')) {
|
if ($('#grouptype_checkbox').hasClass('settingsCheckboxChecked')) {
|
||||||
sortByICAO();
|
sortByDistance();
|
||||||
} else {
|
} else {
|
||||||
sortByDataSource();
|
sortByDataSource();
|
||||||
}
|
}
|
||||||
|
@ -260,6 +274,9 @@ function initialize() {
|
||||||
mapResizeTimeout = setTimeout(updateMapSize, 10);
|
mapResizeTimeout = setTimeout(updateMapSize, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
filterGroundVehicles(false);
|
||||||
|
filterBlockedMLAT(false);
|
||||||
|
|
||||||
// Get receiver metadata, reconfigure using it, then continue
|
// Get receiver metadata, reconfigure using it, then continue
|
||||||
// with initialization
|
// with initialization
|
||||||
$.ajax({ url: 'data/receiver.json',
|
$.ajax({ url: 'data/receiver.json',
|
||||||
|
@ -955,7 +972,7 @@ function refreshTableInfo() {
|
||||||
|
|
||||||
if (tableplane.getDataSource() === "adsb_icao") {
|
if (tableplane.getDataSource() === "adsb_icao") {
|
||||||
classes += " vPosition";
|
classes += " vPosition";
|
||||||
} else if (tableplane.getDataSource() === "tisb") {
|
} else if (tableplane.getDataSource() === "tisb_trackfile") {
|
||||||
classes += " tisb";
|
classes += " tisb";
|
||||||
} else if (tableplane.getDataSource() === "mlat") {
|
} else if (tableplane.getDataSource() === "mlat") {
|
||||||
classes += " mlat";
|
classes += " mlat";
|
||||||
|
@ -1444,6 +1461,40 @@ function onFilterByAltitude(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterGroundVehicles(switchFilter) {
|
||||||
|
if (typeof localStorage['groundVehicleFilter'] === 'undefined') {
|
||||||
|
localStorage['groundVehicleFilter'] = 'not_filtered';
|
||||||
|
}
|
||||||
|
var groundFilter = localStorage['groundVehicleFilter'];
|
||||||
|
if (switchFilter === true) {
|
||||||
|
groundFilter = (groundFilter === 'not_filtered') ? 'filtered' : 'not_filtered';
|
||||||
|
}
|
||||||
|
if (groundFilter === 'not_filtered') {
|
||||||
|
$('#groundvehicle_filter').addClass('settingsCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#groundvehicle_filter').removeClass('settingsCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage['groundVehicleFilter'] = groundFilter;
|
||||||
|
PlaneFilter.groundVehicles = groundFilter;
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterBlockedMLAT(switchFilter) {
|
||||||
|
if (typeof localStorage['blockedMLATFilter'] === 'undefined') {
|
||||||
|
localStorage['blockedMLATFilter'] = 'not_filtered';
|
||||||
|
}
|
||||||
|
var blockedMLATFilter = localStorage['blockedMLATFilter'];
|
||||||
|
if (switchFilter === true) {
|
||||||
|
blockedMLATFilter = (blockedMLATFilter === 'not_filtered') ? 'filtered' : 'not_filtered';
|
||||||
|
}
|
||||||
|
if (blockedMLATFilter === 'not_filtered') {
|
||||||
|
$('#blockedmlat_filter').addClass('settingsCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#blockedmlat_filter').removeClass('settingsCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage['blockedMLATFilter'] = blockedMLATFilter;
|
||||||
|
PlaneFilter.blockedMLAT = blockedMLATFilter;
|
||||||
|
}
|
||||||
|
|
||||||
function onResetAltitudeFilter(e) {
|
function onResetAltitudeFilter(e) {
|
||||||
$("#altitude_filter_min").val("");
|
$("#altitude_filter_min").val("");
|
||||||
$("#altitude_filter_max").val("");
|
$("#altitude_filter_max").val("");
|
||||||
|
|
|
@ -337,6 +337,8 @@ select.error, textarea.error, input.error {
|
||||||
background: -ms-linear-gradient(#002F5D, #002F5D 60%, #021624);
|
background: -ms-linear-gradient(#002F5D, #002F5D 60%, #021624);
|
||||||
background: linear-gradient(#002F5D, #002F5D 60%, #021624);
|
background: linear-gradient(#002F5D, #002F5D 60%, #021624);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
box-shadow: -6px 0px 8px #999999;
|
||||||
|
z-index: 99999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flightawareLogo {
|
.flightawareLogo {
|
||||||
|
@ -347,6 +349,7 @@ select.error, textarea.error, input.error {
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
width: 121px;
|
width: 121px;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
|
box-shadow:inset -12px 0 12px -12px #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.adsbLogo {
|
.adsbLogo {
|
||||||
|
|
Loading…
Reference in a new issue