Indentation/Readability cleanup

This commit is contained in:
Chris Bowles 2016-03-22 15:39:57 -04:00
parent dfc253bebf
commit d00b07f361
2 changed files with 857 additions and 851 deletions

View file

@ -16,194 +16,201 @@
<script type="text/javascript" src="coolclock/excanvas.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/coolclock.js"></script>
<script type="text/javascript" src="coolclock/moreskins.js"></script> <script type="text/javascript" src="coolclock/moreskins.js"></script>
<title>DUMP1090</title> <title>DUMP1090</title>
</head> </head>
<body onload="initialize()">
<div id="loader" class="hidden">
<img src="spinny.gif" id="spinny">
<progress id="loader_progress"></progress>
</div>
<!-- <body onload="initialize()">
This is hideous. airframes.org insists on getting a POST with a "submit" value specified, <div id="loader" class="hidden">
but if we have an input control with that name then it shadows the submit() function that <img src="spinny.gif" id="spinny">
we need. So steal the submit function off a different form. Surely there is a better way?! <progress id="loader_progress"></progress>
--> </div>
<form id="horrible_hack" class="hidden"></form>
<form id="airframes_post" method="POST" action="http://www.airframes.org/" target="_blank" class="hidden"> <!--
<input type="hidden" name="reg1" value=""> This is hideous. airframes.org insists on getting a POST with a "submit" value specified,
<input type="hidden" name="selcal" value=""> but if we have an input control with that name then it shadows the submit() function that
<input id="airframes_post_icao" type="hidden" name="ica024" value=""> we need. So steal the submit function off a different form. Surely there is a better way?!
<input type="hidden" name="submit" value="submit"> -->
</form> <form id="horrible_hack" class="hidden">
</form>
<form id="airframes_post" method="POST" action="http://www.airframes.org/" target="_blank" class="hidden">
<input type="hidden" name="reg1" value="">
<input type="hidden" name="selcal" value="">
<input id="airframes_post_icao" type="hidden" name="ica024" value="">
<input type="hidden" name="submit" value="submit">
</form>
<div id="map_container"> <div id="map_container">
<div id="map_canvas"></div> <div id="map_canvas"></div>
</div> </div>
<div id="sidebar_container"> <div id="sidebar_container">
<div id="sidebar_canvas"> <div id="sidebar_canvas">
<div id="timestamps"> <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>
<td align="center"> <canvas id="receiverclock"></canvas> </td> <td align="center"> <canvas id="receiverclock"></canvas> </td>
</tr> </tr>
<tr>
<td align="center">UTC</td>
<td align="center">Last Update</td>
</tr>
</table>
</div> <!-- timestamps -->
<tr>
<td align="center">UTC</td>
<td align="center">Last Update</td>
</tr>
</table>
</div>
<div id="sudo_buttons"> <div id="sudo_buttons">
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="150" style="text-align: center;" class="pointer"> <td width="150" style="text-align: center;" class="pointer">
[ <span onclick="resetMap();">Reset Map</span> ] [ <span onclick="resetMap();">Reset Map</span> ]
</td> </td>
</tr> </tr>
</table> </table>
</div> </div> <!-- sudo_buttons -->
<div id="dump1090_infoblock"> <div id="dump1090_infoblock">
<table width="100%"> <table width="100%">
<tr class="infoblock_heading"> <tr class="infoblock_heading">
<td> <td>
<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"></a> <a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></a>
</td> </td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr class="infoblock_body dim"> <tr class="infoblock_body dim">
<td>(no aircraft selected)</td> <td>(no aircraft selected)</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>Aircraft (total): <span id="dump1090_total_ac">n/a</span></td> <td>Aircraft (total): <span id="dump1090_total_ac">n/a</span></td>
<td>Messages: <span id="dump1090_message_rate">n/a</span>/sec</td> <td>Messages: <span id="dump1090_message_rate">n/a</span>/sec</td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>(with positions): <span id="dump1090_total_ac_positions">n/a</span></td> <td>(with positions): <span id="dump1090_total_ac_positions">n/a</span></td>
<td>History: <span id="dump1090_total_history">n/a</span> positions</td> <td>History: <span id="dump1090_total_history">n/a</span> positions</td>
</tr> </tr>
</table> </table>
</div> </div> <!-- dump1090_infoblock -->
<div id="selected_infoblock" class="hidden"> <div id="selected_infoblock" class="hidden">
<table width="100%"> <table width="100%">
<tr class="infoblock_heading"> <tr class="infoblock_heading">
<td colspan="2"> <td colspan="2">
<b> <b>
<span id="selected_callsign" onclick="toggleFollowSelected();" class="pointer">n/a</span> <span id="selected_callsign" onclick="toggleFollowSelected();" class="pointer">n/a</span>
</b> </b>
<span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2</span> <span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2</span>
<span id="selected_flag"> <span id="selected_flag">
<img width="20" height="12"> <img width="20" height="12">
</span> </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_registration"></span> <span id="selected_registration"></span>
<span id="selected_icaotype"></span> <span id="selected_icaotype"></span>
<span id="selected_emergency"></span> <span id="selected_emergency"></span>
<a id="selected_flightaware_link" href="" target="_blank">[FlightAware]</a> <a id="selected_flightaware_link" href="" target="_blank">[FlightAware]</a>
<span id="selected_links"> <span id="selected_links">
<a id="selected_fr24_link" href="" target="_blank">[FR24]</a> <a id="selected_fr24_link" href="" target="_blank">[FR24]</a>
<a id="selected_flightstats_link" href="" target="_blank">[FlightStats]</a> <a id="selected_flightstats_link" href="" target="_blank">[FlightStats]</a>
<a id="selected_planefinder_link" href="" target="_blank">[PlaneFinder]</a> <a id="selected_planefinder_link" href="" target="_blank">[PlaneFinder]</a>
</span> </span>
</td> </td>
</tr> </tr>
<tr id="infoblock_country" class="infoblock_body"> <tr id="infoblock_country" class="infoblock_body">
<td colspan="2">Country of registration: <span id="selected_country">n/a</span></td> <td colspan="2">Country of registration: <span id="selected_country">n/a</span></td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td width="55%">Altitude: <span id="selected_altitude"></span></td> <td width="55%">Altitude: <span id="selected_altitude"></span></td>
<td width="45%">Squawk: <span id="selected_squawk"></span></td> <td width="45%">Squawk: <span id="selected_squawk"></span></td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td>Speed: <span id="selected_speed">n/a</span></td> <td>Speed: <span id="selected_speed">n/a</span></td>
<td>RSSI: <span id="selected_rssi">n/a</span></td> <td>RSSI: <span id="selected_rssi">n/a</span></td>
</tr> </tr>
<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">
<td colspan="2">Position: <span id="selected_position">n/a</span></td> <td colspan="2">Position: <span id="selected_position">n/a</span></td>
</tr> </tr>
<tr class="infoblock_body">
<td colspan="2">Distance from Site: <span id="selected_sitedist">n/a</span></td>
</tr>
</table>
</div> <!-- selected_infoblock -->
<tr class="infoblock_body">
<td colspan="2">Distance from Site: <span id="selected_sitedist">n/a</span></td>
</tr>
</table>
</div>
<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> <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>
<td id="squawk" onclick="sortBySquawk();" align="right">Squawk</td> <td id="squawk" onclick="sortBySquawk();" align="right">Squawk</td>
<td id="altitude" onclick="sortByAltitude();" align="right">Altitude</td> <td id="altitude" onclick="sortByAltitude();" align="right">Altitude</td>
<td id="speed" onclick="sortBySpeed();" align="right">Speed</td> <td id="speed" onclick="sortBySpeed();" align="right">Speed</td>
<td id="distance" onclick="sortByDistance();" align="right">Distance</td> <td id="distance" onclick="sortByDistance();" align="right">Distance</td>
<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> </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">
<td>ICAO</td> <td>ICAO</td>
<td><img width="20" height="12"></td> <td><img width="20" height="12"></td>
<td>FLIGHT</td> <td>FLIGHT</td>
<td align="right">SQUAWK</td> <td align="right">SQUAWK</td>
<td align="right">ALTITUDE</td> <td align="right">ALTITUDE</td>
<td align="right">SPEED</td> <td align="right">SPEED</td>
<td align="right">DISTANCE</td> <td align="right">DISTANCE</td>
<td align="right">TRACK</td> <td align="right">TRACK</td>
<td align="right">MSGS</td> <td align="right">MSGS</td>
<td align="right">SEEN</td> <td align="right">SEEN</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div> <!-- planes_table -->
</div>
</div> </div> <!-- sidebar_canvas -->
</div> <!-- sidebar_container -->
<div id="SpecialSquawkWarning" class="hidden"> <div id="SpecialSquawkWarning" class="hidden">
<b>Squawk 7x00 is reported and shown.</b><br> <b>Squawk 7x00 is reported and shown.</b><br>
This is most likely an error in receiving or decoding.<br> This is most likely an error in receiving or decoding.<br>
Please do not call the local authorities, they already know about it if it is a valid squawk. Please do not call the local authorities, they already know about it if it is a valid squawk.
</div> </div>
<div id="update_error" class="hidden"> <div id="update_error" class="hidden">
<b>Problem fetching data from dump1090.</b><br> <b>Problem fetching data from dump1090.</b><br>
<span id="update_error_detail"></span><br> <span id="update_error_detail"></span><br>
The displayed map data will be out of date. The displayed map data will be out of date.
</div> </div>
<div id="container_splitter"></div> <div id="container_splitter"></div>
</body> </body>

File diff suppressed because it is too large Load diff