Merge pull request #103 from bjd/web-fixes

web view fixes
This commit is contained in:
Oliver Jowett 2016-02-18 22:19:30 +00:00
commit f7c9aed8b0
2 changed files with 11 additions and 8 deletions

View file

@ -5,7 +5,7 @@
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=geometry"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=geometry"></script>
<script type="text/javascript" src="config.js"></script> <script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="markers.js"></script> <script type="text/javascript" src="markers.js"></script>
<script type="text/javascript" src="dbloader.js"></script> <script type="text/javascript" src="dbloader.js"></script>
@ -42,7 +42,7 @@
</div> </div>
<div id="sidebar_container"> <div id="sidebar_container">
<div id="sidebar_canvas"> <div id="sidebar_canvas">
<div id="timestamps" style="align: center"> <div id="timestamps">
<table width="100%"> <table width="100%">
<tr> <tr>
<td align="center"> <canvas id="utcclock"></canvas> </td> <td align="center"> <canvas id="utcclock"></canvas> </td>
@ -72,7 +72,7 @@
<b id="infoblock_name">DUMP1090</b> <b id="infoblock_name">DUMP1090</b>
</td> </td>
<td align="right"> <td align="right">
<a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></span> <a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></a>
</td> </td>
</tr> </tr>
@ -146,7 +146,7 @@
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>Track: <span id="selected_track">n/a</span></td> <td>Track: <span id="selected_track">n/a</span></td>
<td>Last seen: <span id="selected_seen">n/a</span</td> <td>Last seen: <span id="selected_seen">n/a</span></td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
@ -161,6 +161,7 @@
<div id="planes_table"> <div id="planes_table">
<table id="tableinfo" width="100%"> <table id="tableinfo" width="100%">
<thead style="background-color: #BBBBBB; cursor: pointer;"> <thead style="background-color: #BBBBBB; cursor: pointer;">
<tr>
<td id="icao" onclick="sortByICAO();">ICAO</td> <td id="icao" onclick="sortByICAO();">ICAO</td>
<td id="flag" onclick="sortByCountry()"><!-- column for flag image --></td> <td id="flag" onclick="sortByCountry()"><!-- column for flag image --></td>
<td id="flight" onclick="sortByFlight();">Flight</td> <td id="flight" onclick="sortByFlight();">Flight</td>
@ -171,6 +172,7 @@
<td id="track" onclick="sortByTrack();" align="right">Track</td> <td id="track" onclick="sortByTrack();" align="right">Track</td>
<td id="msgs" onclick="sortByMsgs();" align="right">Msgs</td> <td id="msgs" onclick="sortByMsgs();" align="right">Msgs</td>
<td id="seen" onclick="sortBySeen();" align="right">Age</td> <td id="seen" onclick="sortBySeen();" align="right">Age</td>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr id="plane_row_template" class="plane_table_row hidden"> <tr id="plane_row_template" class="plane_table_row hidden">

View file

@ -894,10 +894,11 @@ function resetMap() {
function drawCircle(marker, distance) { function drawCircle(marker, distance) {
if (typeof distance === 'undefined') { if (typeof distance === 'undefined') {
return false; return false;
}
if (!(!isNaN(parseFloat(distance)) && isFinite(distance)) || distance < 0) {
return false; distance = parseFloat(distance);
} if (isNaN(distance) || !isFinite(distance) || distance < 0) {
return false;
} }
distance *= 1000.0; distance *= 1000.0;