From 26e4875ce447745e5ea33dbf3c658d1edb212504 Mon Sep 17 00:00:00 2001
From: "Stanislav Lechev [0xAF]"
Date: Tue, 19 Sep 2023 04:07:26 +0300
Subject: [PATCH] port Marat's fix for divs
---
htdocs/lib/MapMarkers.js | 59 ++++++++--------------------------------
1 file changed, 12 insertions(+), 47 deletions(-)
diff --git a/htdocs/lib/MapMarkers.js b/htdocs/lib/MapMarkers.js
index fc61b033..973deef1 100644
--- a/htdocs/lib/MapMarkers.js
+++ b/htdocs/lib/MapMarkers.js
@@ -280,7 +280,7 @@ FeatureMarker.prototype.getAnchorOffset = function() {
FeatureMarker.prototype.getInfoHTML = function(name) {
var nameString = this.url? Marker.linkify(name, this.url) : name;
- var commentString = this.comment? '' + this.comment + '
' : '';
+ var commentString = this.comment? '' + this.comment + '
' : '';
var detailsString = '';
var scheduleString = '';
var distance = '';
@@ -294,29 +294,13 @@ FeatureMarker.prototype.getInfoHTML = function(name) {
detailsString += Marker.makeListItem('Altitude', this.altitude.toFixed(0) + ' m');
}
- if (this.device) {
- detailsString += Marker.makeListItem('Device', this.device.manufacturer?
- this.device.device + ' by ' + this.device.manufacturer : this.device
- );
- }
-
- if (this.antenna) {
- detailsString += Marker.makeListItem('Antenna', Marker.truncate(this.antenna, 24));
- }
-
- if (this.freq) {
- detailsString += Marker.makeListItem('Frequency', Marker.linkifyFreq(
- this.freq, this.mmode? this.mmode:'fm'
- ));
- }
-
if (this.mmode) {
detailsString += Marker.makeListItem('Modulation', this.mmode.toUpperCase());
}
if (!this.comment && this.status && this.updated) {
- commentString = '' + this.status
- + ', last updated on ' + this.updated + '
';
+ commentString = '' + this.status
+ + ', last updated on ' + this.updated + '
';
} else {
if (this.status) {
detailsString += Marker.makeListItem('Status', this.status);
@@ -333,31 +317,12 @@ FeatureMarker.prototype.getInfoHTML = function(name) {
});
}
- if (this.schedule) {
- for (var j=0 ; j 0) {
- detailsString = '' + Marker.makeListTitle('Details') + detailsString + '
';
+ detailsString = '' + Marker.makeListTitle('Details') + detailsString + '
';
}
if (scheduleString.length > 0) {
- scheduleString = '' + Marker.makeListTitle('Schedule') + scheduleString + '
';
+ scheduleString = '' + Marker.makeListTitle('Schedule') + scheduleString + '
';
}
return '' + nameString + distance + '
'
@@ -497,12 +462,12 @@ AprsMarker.prototype.getInfoHTML = function(name) {
var distance = '';
if (this.comment) {
- commentString += '' + Marker.makeListTitle('Comment') + '
' +
- this.comment + '
';
+ commentString += '' + Marker.makeListTitle('Comment') + '' +
+ this.comment + '
';
}
if (this.weather) {
- weatherString += '' + Marker.makeListTitle('Weather');
+ weatherString += '
' + Marker.makeListTitle('Weather');
if (this.weather.temperature) {
weatherString += Marker.makeListItem('Temperature', this.weather.temperature.toFixed(1) + ' oC');
@@ -541,7 +506,7 @@ AprsMarker.prototype.getInfoHTML = function(name) {
weatherString += Marker.makeListItem('Snow', this.weather.snowfall.toFixed(1) + ' cm');
}
- weatherString += '';
+ weatherString += '
';
}
if (this.height) {
@@ -600,7 +565,7 @@ AprsMarker.prototype.getInfoHTML = function(name) {
}
if (detailsString.length > 0) {
- detailsString = '' + Marker.makeListTitle('Details') + detailsString + '
';
+ detailsString = '' + Marker.makeListTitle('Details') + detailsString + '
';
}
if (this.hops && this.hops.length > 0) {
@@ -640,7 +605,7 @@ AprsMarker.prototype.getInfoHTML = function(name) {
}
return '' + Marker.linkify(name, url, linkEntity) + distance + '
'
- + '' + timeString + ' using ' + this.mode
- + ( this.band ? ' on ' + this.band : '' ) + '
'
+ + '' + timeString + ' using ' + this.mode
+ + ( this.band ? ' on ' + this.band : '' ) + '
'
+ commentString + weatherString + detailsString + hopsString;
};