fixed table display column problem
This is the final version for this project. (I hope!)
This commit is contained in:
parent
95f90fe799
commit
402e40fc36
|
@ -101,3 +101,5 @@ PageName = "DUMP1090";
|
|||
|
||||
// Path to country flags subfolder
|
||||
flag_dir = "flags-tiny";
|
||||
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<script type="text/javascript" src="dbloader.js"></script>
|
||||
<script type="text/javascript" src="planeObject.js"></script>
|
||||
<script type="text/javascript" src="formatter.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="flags.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="coolclock/excanvas.js"></script>
|
||||
<script type="text/javascript" src="coolclock/coolclock.js"></script>
|
||||
<script type="text/javascript" src="coolclock/moreskins.js"></script>
|
||||
|
@ -143,7 +143,7 @@
|
|||
</tr>
|
||||
|
||||
<tr class="infoblock_body">
|
||||
<td colspan=1>Position: <span id="selected_position">n/a</span></td>
|
||||
<td colspan=2>Position: <span id="selected_position">n/a</span></td>
|
||||
<td>Country: <span id="selected_country">n/a</span></td>
|
||||
</tr>
|
||||
|
||||
|
@ -155,7 +155,8 @@
|
|||
<div id="planes_table">
|
||||
<table id="tableinfo" width="100%">
|
||||
<thead style="background-color: #BBBBBB; cursor: pointer;">
|
||||
<td colspan="2" id="icao" onclick="sortByICAO();">ICAO</td>
|
||||
<td id="icao" onclick="sortByICAO();">ICAO</td>
|
||||
<td>Country</td>
|
||||
<td id="flight" onclick="sortByFlight();">Flight</td>
|
||||
<td id="squawk" onclick="sortBySquawk();" align="right">Squawk</td>
|
||||
<td id="altitude" onclick="sortByAltitude();" align="right">Altitude</td>
|
||||
|
@ -168,6 +169,7 @@
|
|||
<tbody>
|
||||
<tr id="plane_row_template" class="plane_table_row hidden">
|
||||
<td>ICAO</td>
|
||||
<td>COUNTRY</td>
|
||||
<td>FLIGHT</td>
|
||||
<td align="right">SQUAWK</td>
|
||||
<td align="right">ALTITUDE</td>
|
||||
|
|
|
@ -46,7 +46,8 @@ function processReceiverUpdate(data) {
|
|||
|
||||
// Detect stats reset
|
||||
if (MessageCountHistory.length > 0 && MessageCountHistory[MessageCountHistory.length-1].messages > data.messages) {
|
||||
MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time, 'messages' : 0}];
|
||||
MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time,
|
||||
'messages' : 0}];
|
||||
}
|
||||
|
||||
// Note the message count in the history
|
||||
|
@ -80,15 +81,14 @@ function processReceiverUpdate(data) {
|
|||
}
|
||||
// end of flag lookup
|
||||
|
||||
|
||||
if (hex[0] === '~') {
|
||||
// Non-ICAO address
|
||||
plane.tr.cells[0].textContent = hex.substring(1);
|
||||
$(plane.tr).css('font-style', 'italic');
|
||||
plane.tr.cells[1].textContent = ("");
|
||||
plane.tr.cells[1].textContent = null;
|
||||
} else {
|
||||
plane.tr.cells[0].textContent = (hex);
|
||||
plane.tr.cells[1].innerHTML = (plane.Flag);
|
||||
plane.tr.cells[0].textContent = hex;
|
||||
plane.tr.cells[1].innerHTML = plane.Flag;
|
||||
}
|
||||
|
||||
plane.tr.addEventListener('click', selectPlaneByHex.bind(undefined,hex,false));
|
||||
|
@ -324,7 +324,7 @@ function initialize_map() {
|
|||
sortByDistance();
|
||||
} else {
|
||||
SitePosition = null;
|
||||
PlaneRowTemplate.cells[5].style.display = 'none'; // hide distance column
|
||||
PlaneRowTemplate.cells[6].style.display = 'none'; // hide distance column
|
||||
document.getElementById("distance").style.display = 'none'; // hide distance header
|
||||
sortByAltitude();
|
||||
}
|
||||
|
@ -608,12 +608,17 @@ function refreshSelected() {
|
|||
$('#selected_seen').text(selected.seen.toFixed(1) + 's');
|
||||
}
|
||||
|
||||
// add the country and flag to the selected section
|
||||
// add the country and flag
|
||||
$('#selected_country').text(selected.Country);
|
||||
if (selected.Flag !== null) {
|
||||
//$('#selected_flag').html('<img src="' + flag_dir + '/' + selected.flag.icon_fn + '" height=12 width=20 title="' + selected.flag.Country + '">' + NBSP + selected.flag.Country);
|
||||
$('#selected_flag').html(selected.Flag);
|
||||
} else {
|
||||
$('#selected_flag').text('Unrecognized');
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (selected.position === null) {
|
||||
$('#selected_position').text('n/a');
|
||||
$('#selected_follow').addClass('hidden');
|
||||
|
@ -678,7 +683,6 @@ function refreshTableInfo() {
|
|||
tableplane.tr.cells[7].textContent = format_track_brief(tableplane.track);
|
||||
tableplane.tr.cells[8].textContent = tableplane.messages;
|
||||
tableplane.tr.cells[9].textContent = tableplane.seen.toFixed(0);
|
||||
|
||||
tableplane.tr.className = classes;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue