Fix minimum width of sidebar and more spacing cleanup

This commit is contained in:
eric1tran 2020-12-14 16:39:34 +00:00
parent 8f9abe57be
commit 9950e72d1a
2 changed files with 30 additions and 28 deletions

View File

@ -99,19 +99,19 @@ function processReceiverUpdate(data) {
if ((now - MessageCountHistory[0].time) > 30) if ((now - MessageCountHistory[0].time) > 30)
MessageCountHistory.shift(); MessageCountHistory.shift();
for (var j=0; j < acs.length; j++) { for (var j=0; j < acs.length; j++) {
var ac = acs[j]; var ac = acs[j];
var hex = ac.hex; var hex = ac.hex;
var squawk = ac.squawk; var squawk = ac.squawk;
var plane = null; var plane = null;
// Do we already have this plane object in Planes? // Do we already have this plane object in Planes?
// If not make it. // If not make it.
if (Planes[hex]) { if (Planes[hex]) {
plane = Planes[hex]; plane = Planes[hex];
} else { } else {
plane = new PlaneObject(hex); plane = new PlaneObject(hex);
plane.filter = PlaneFilter; plane.filter = PlaneFilter;
plane.tr = PlaneRowTemplate.cloneNode(true); plane.tr = PlaneRowTemplate.cloneNode(true);
@ -156,11 +156,11 @@ function processReceiverUpdate(data) {
Planes[hex] = plane; Planes[hex] = plane;
PlanesOrdered.push(plane); PlanesOrdered.push(plane);
} }
// Call the function update // Call the function update
plane.updateData(now, ac); plane.updateData(now, ac);
} }
} }
function fetchData() { function fetchData() {
@ -184,10 +184,10 @@ function fetchData() {
plane.updateTick(now, LastReceiverTimestamp); plane.updateTick(now, LastReceiverTimestamp);
} }
selectNewPlanes(); selectNewPlanes();
refreshTableInfo(); refreshTableInfo();
refreshSelected(); refreshSelected();
refreshHighlighted(); refreshHighlighted();
if (ReceiverClock) { if (ReceiverClock) {
var rcv = new Date(now * 1000); var rcv = new Date(now * 1000);
@ -206,7 +206,7 @@ function fetchData() {
LastReceiverTimestamp = now; LastReceiverTimestamp = now;
$("#update_error").css('display','none'); $("#update_error").css('display','none');
} }
}); });
FetchPending.fail(function(jqxhr, status, error) { FetchPending.fail(function(jqxhr, status, error) {
$("#update_error_detail").text("AJAX call failed (" + status + (error ? (": " + error) : "") + "). Maybe dump1090 is no longer running?"); $("#update_error_detail").text("AJAX call failed (" + status + (error ? (": " + error) : "") + "). Maybe dump1090 is no longer running?");
@ -387,7 +387,6 @@ function initialize() {
$("#aircraft_ident_filter_form").submit(onFilterByAircraftIdent); $("#aircraft_ident_filter_form").submit(onFilterByAircraftIdent);
$("#aircraft_ident_filter_reset_button").click(onResetAircraftIdentFilter); $("#aircraft_ident_filter_reset_button").click(onResetAircraftIdentFilter);
$('#settingsCog').on('click', function() { $('#settingsCog').on('click', function() {
$('#settings_infoblock').toggle(); $('#settings_infoblock').toggle();
}); });
@ -546,20 +545,19 @@ function load_history_item(i) {
dataType: 'json' }) dataType: 'json' })
.done(function(data) { .done(function(data) {
PositionHistoryBuffer.push(data); PositionHistoryBuffer.push(data);
HistoryItemsReturned++; HistoryItemsReturned++;
$("#loader_progress").attr('value',HistoryItemsReturned); if (HistoryItemsReturned == PositionHistorySize) {
if (HistoryItemsReturned == PositionHistorySize) { end_load_history();
end_load_history(); }
}
}) })
.fail(function(jqxhr, status, error) { .fail(function(jqxhr, status, error) {
//Doesn't matter if it failed, we'll just be missing a data point //Doesn't matter if it failed, we'll just be missing a data point
HistoryItemsReturned++; HistoryItemsReturned++;
if (HistoryItemsReturned == PositionHistorySize) { if (HistoryItemsReturned == PositionHistorySize) {
end_load_history(); end_load_history();
} }
}); });
} }

View File

@ -942,3 +942,7 @@ select.error, textarea.error, input.error {
margin-top: 10px; margin-top: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.ui-resizable {
min-width: 400px;
}