Merge remote-tracking branch 'origin/flags' into flags

Conflicts:
	public_html/script.js
This commit is contained in:
Dynomity 2015-08-30 10:19:53 -06:00
commit 9e00c2d0d3
2 changed files with 4 additions and 3 deletions

View file

@ -113,7 +113,7 @@
<span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2</span> <span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2</span>
<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;">
<span id="selected_icao"></span> <span id="selected_icao"></span>
</a> </a>
<span id="selected_flag"></span> <span id="selected_flag"></span>
<span id="selected_registration"></span> <span id="selected_registration"></span>

View file

@ -71,7 +71,8 @@ function processReceiverUpdate(data) {
plane.tr = PlaneRowTemplate.cloneNode(true); plane.tr = PlaneRowTemplate.cloneNode(true);
// Lookup ICAO country flag // Lookup ICAO country flag
var hexa = +("0x" + hex);
var hexa = +("0x" + hex);
for (var i = 0; i < ICAO_Codes.length; i++) { for (var i = 0; i < ICAO_Codes.length; i++) {
if ( hexa >= ICAO_Codes[i].start && hexa <= ICAO_Codes[i].end) { if ( hexa >= ICAO_Codes[i].start && hexa <= ICAO_Codes[i].end) {
@ -608,6 +609,7 @@ function refreshSelected() {
$('#selected_seen').text(selected.seen.toFixed(1) + 's'); $('#selected_seen').text(selected.seen.toFixed(1) + 's');
} }
// add the country and flag // add the country and flag
$('#selected_country').text(selected.Country); $('#selected_country').text(selected.Country);
if (selected.Flag !== null) { if (selected.Flag !== null) {
@ -618,7 +620,6 @@ function refreshSelected() {
} }
if (selected.position === null) { if (selected.position === null) {
$('#selected_position').text('n/a'); $('#selected_position').text('n/a');
$('#selected_follow').addClass('hidden'); $('#selected_follow').addClass('hidden');