Added back the flag in the selected section
This commit is contained in:
parent
00f3f3723e
commit
899e072cf1
|
@ -46,8 +46,7 @@ function processReceiverUpdate(data) {
|
||||||
|
|
||||||
// Detect stats reset
|
// Detect stats reset
|
||||||
if (MessageCountHistory.length > 0 && MessageCountHistory[MessageCountHistory.length-1].messages > data.messages) {
|
if (MessageCountHistory.length > 0 && MessageCountHistory[MessageCountHistory.length-1].messages > data.messages) {
|
||||||
MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time,
|
MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time, 'messages' : 0}];
|
||||||
'messages' : 0}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note the message count in the history
|
// Note the message count in the history
|
||||||
|
@ -76,7 +75,7 @@ function processReceiverUpdate(data) {
|
||||||
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) {
|
||||||
plane.Country = ICAO_Codes[i].Country;
|
plane.Country = ICAO_Codes[i].Country;
|
||||||
plane.Flag = '<div><img src="' + flag_dir + '/' + ICAO_Codes[i].icon_fn + '" title="' + ICAO_Codes[i].Country + '\"></div>';
|
plane.Flag = '<img src="' + flag_dir + '/' + ICAO_Codes[i].icon_fn + '" title="' + ICAO_Codes[i].Country + '\">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end of flag lookup
|
// end of flag lookup
|
||||||
|
@ -611,14 +610,9 @@ function refreshSelected() {
|
||||||
|
|
||||||
// add the country and flag to the selected section
|
// add the country and flag to the selected section
|
||||||
$('#selected_country').text(selected.Country);
|
$('#selected_country').text(selected.Country);
|
||||||
// the following is not working to add the flag. Note the property has tags for table.
|
if (selected.Flag !== null) {
|
||||||
// flagtag.style.margin = "0px 10px";
|
$('#selected_flag').html(selected.Flag);
|
||||||
// flagtag.style.cssFloat = "none";
|
}
|
||||||
//
|
|
||||||
// document.getElementById('selected_icao').appendChild(selected.Flag);
|
|
||||||
|
|
||||||
//$('#selected_icaoflag').attr(selected.Flag);
|
|
||||||
|
|
||||||
|
|
||||||
if (selected.position === null) {
|
if (selected.position === null) {
|
||||||
$('#selected_position').text('n/a');
|
$('#selected_position').text('n/a');
|
||||||
|
|
Loading…
Reference in a new issue