Updating list of reports sizing.

This commit is contained in:
Marat Fayzullin 2023-10-15 18:30:51 -04:00
parent ad01c8dc81
commit e831a78630
8 changed files with 19 additions and 8 deletions

View File

@ -90,8 +90,9 @@ ul {
}
.openwebrx-map-info td {
padding-left: 10px;
padding-right: 10px;
padding-left: 5px;
padding-right: 5px;
text-align: center;
white-space: nowrap;
font-size: 1vw;
}

View File

@ -307,5 +307,5 @@ Locator.prototype.getInfoHTML = function(locator, pos, receiverMarker = null) {
return '<h3>Locator ' + locator + distance + '</h3>'
+ '<div align="center">' + lastReport + '</div>'
+ Utils.makeListTitle('Active Callsigns')
+ '<table class="openwebrx-map-info">' + list + '</table>';
+ '<table align="center" class="openwebrx-map-info">' + list + '</table>';
};

View File

@ -95,7 +95,7 @@ MapManager.prototype.process = function(e) {
retention_time = this.config.map_position_retention_time * 1000;
}
if ('callsign_url' in this.config) {
callsign_url = this.config.callsign_url;
Utils.setCallsignUrl(this.config.callsign_url);
}
if ('vessel_url' in this.config) {
vessel_url = this.config.vessel_url;

View File

@ -4,6 +4,13 @@
function Utils() {}
Utils.callsign_url = null;
// Set URL for linkifying callsigns
Utils.setCallsignUrl = function(url) {
this.callsign_url = url;
};
// Escape HTML code.
Utils.htmlEscape = function(input) {
return $('<div/>').text(input).html()
@ -31,7 +38,7 @@ Utils.linkifyCallsign = function(callsign) {
// Strip callsign of modifiers
var id = callsign.replace(new RegExp('[-/].*$'), '');
// Add country name as a tooltip
return this.linkify(id, callsign_url, callsign, Utils.call2country(id));
return this.linkify(id, this.callsign_url, callsign, this.call2country(id));
};
// Create link to tune OWRX to the given frequency and modulation.
@ -121,7 +128,7 @@ Utils.getOpacityScale = function(age) {
Utils.call2country = function(callsign) {
for (var j=4 ; j>0 ; j--) {
var pfx = callsign.substring(0, j)
if (pfx in Utils.PFX2COUNTRY) return Utils.PFX2COUNTRY[pfx];
if (pfx in this.PFX2COUNTRY) return this.PFX2COUNTRY[pfx];
}
return '';
};

View File

@ -1,5 +1,4 @@
// Marker.linkify() uses these URLs
var callsign_url = null;
var vessel_url = null;
var flight_url = null;
var modes_url = null;

View File

@ -1,5 +1,4 @@
// Marker.linkify() uses these URLs
var callsign_url = null;
var vessel_url = null;
var flight_url = null;
var modes_url = null;

View File

@ -1133,6 +1133,10 @@ function on_ws_recv(evt) {
adsb_panel.setModeSUrl(config['modes_url']);
}
if ('callsign_url' in config) {
Utils.setCallsignUrl(config['callsign_url']);
}
break;
case "secondary_config":
var s = json['value'];

View File

@ -146,6 +146,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
"allow_center_freq_changes",
"allow_audio_recording",
"magic_key",
"callsign_url",
"flight_url",
"modes_url",
"receiver_gps",