Add a button that will take you your My ADS-B Stats page if claimed
This commit is contained in:
parent
16b3d12670
commit
a0dc843842
|
|
@ -216,6 +216,7 @@
|
|||
<div class="config_button_row">
|
||||
<button id="filter_button" class="config_button">Filters</button>
|
||||
<button id="column_select_button" class="config_button">Select Columns</button>
|
||||
<button id="stats_page_button" class="config_button">Go to My ADS-B Statistics Page</button>
|
||||
</div>
|
||||
|
||||
<div id="filter_panel" class="panel">
|
||||
|
|
@ -232,14 +233,14 @@
|
|||
<form id="aircraft_type_filter_form">
|
||||
<label><span class="infoBlockTitleText">Filter by Aircraft Type:</span></label>
|
||||
<input id="aircraft_type_filter" name="aircraftTypeFilter" type="text" class="aircraftFilterInput" maxlength="5">
|
||||
<button type="submit">Filter by Aircraft Type</button>
|
||||
<button type="submit">Filter</button>
|
||||
<button id="aircraft_type_filter_reset_button">Reset</button>
|
||||
</form>
|
||||
|
||||
<form id="aircraft_ident_filter_form">
|
||||
<label><span class="infoBlockTitleText">Filter by Aircraft Ident:</span></label>
|
||||
<input id="aircraft_ident_filter" name="aircraftIdentFilter" type="text" class="aircraftFilterInput" maxlength="10">
|
||||
<button type="submit">Filter by Aircraft Ident</button>
|
||||
<button type="submit">Filter</button>
|
||||
<button id="aircraft_ident_filter_reset_button">Reset</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ var HighlightedPlane = null;
|
|||
var FollowSelected = false;
|
||||
var infoBoxOriginalPosition = {};
|
||||
var customAltitudeColors = true;
|
||||
var myAdsbStatsSiteUrl = null;
|
||||
|
||||
var SpecialSquawks = {
|
||||
'7500' : { cssClass: 'squawk7500', markerColor: 'rgb(255, 85, 85)', text: 'Aircraft Hijacking' },
|
||||
|
|
@ -217,6 +218,8 @@ function initialize() {
|
|||
|
||||
flightFeederCheck();
|
||||
|
||||
setStatsLink();
|
||||
|
||||
PlaneRowTemplate = document.getElementById("plane_row_template");
|
||||
|
||||
refreshClock();
|
||||
|
|
@ -401,6 +404,12 @@ function initialize() {
|
|||
$('#filter_panel').toggle();
|
||||
});
|
||||
|
||||
$('#stats_page_button').on('click', function() {
|
||||
if (myAdsbStatsSiteUrl) {
|
||||
window.open(myAdsbStatsSiteUrl);
|
||||
}
|
||||
});
|
||||
|
||||
// Event handlers for to column checkboxes
|
||||
checkbox_div_map.forEach(function (checkbox, div) {
|
||||
$(div).on('click', function() {
|
||||
|
|
@ -2234,6 +2243,17 @@ function flightFeederCheck() {
|
|||
})
|
||||
}
|
||||
|
||||
function setStatsLink() {
|
||||
$.ajax('/status.json', {
|
||||
success: function(data) {
|
||||
if (data.site_url) {
|
||||
myAdsbStatsSiteUrl = data.site_url;
|
||||
console.log(myAdsbStatsSiteUrl)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// updates the page to replace piaware with flightfeeder references
|
||||
function updatePiAwareOrFlightFeeder() {
|
||||
if (isFlightFeeder) {
|
||||
|
|
|
|||
|
|
@ -851,7 +851,7 @@ select.error, textarea.error, input.error {
|
|||
color: #002F5D;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
width: 125px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.config_button:hover, .config_button_active {
|
||||
|
|
|
|||
Loading…
Reference in New Issue