diff --git a/htdocs/lib/MapMarkers.js b/htdocs/lib/MapMarkers.js index 5120c3ac..b97d62da 100644 --- a/htdocs/lib/MapMarkers.js +++ b/htdocs/lib/MapMarkers.js @@ -300,7 +300,7 @@ FeatureMarker.prototype.getAnchorOffset = function() { FeatureMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { 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 = ''; @@ -335,8 +335,8 @@ FeatureMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { } 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); @@ -373,11 +373,11 @@ FeatureMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { } if (detailsString.length > 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 + '
'; } if (receiverMarker) { @@ -406,6 +406,7 @@ AprsMarker.prototype.update = function(update) { this.hops = update.hops; this.band = update.band; this.comment = update.location.comment; + // APRS, AIS this.weather = update.location.weather; this.altitude = update.location.altitude; this.height = update.location.height; @@ -413,6 +414,7 @@ AprsMarker.prototype.update = function(update) { this.gain = update.location.gain; this.device = update.location.device; this.directivity = update.location.directivity; + // HFDL, ACARS, VDL2, ADSB this.aircraft = update.location.aircraft; this.destination = update.location.destination; this.origin = update.location.origin; @@ -521,12 +523,12 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { 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'); @@ -565,7 +567,7 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { weatherString += Marker.makeListItem('Snow', this.weather.snowfall.toFixed(1) + ' cm'); } - weatherString += '

'; + weatherString += '
'; } if (this.device) { @@ -630,7 +632,7 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { } if (detailsString.length > 0) { - detailsString = '

' + Marker.makeListTitle('Details') + detailsString + '

'; + detailsString = '
' + Marker.makeListTitle('Details') + detailsString + '
'; } if (receiverMarker) { @@ -674,7 +676,7 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { } 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; }; diff --git a/owrx/controllers/template.py b/owrx/controllers/template.py index 3306a93c..cf54e225 100644 --- a/owrx/controllers/template.py +++ b/owrx/controllers/template.py @@ -43,7 +43,7 @@ class IndexController(WebpageController): class MapController(WebpageController): def indexAction(self): # TODO check if we have a google maps api key first? - self.serve_template("map-%s.html" % self.map_type(), **self.template_variables()) + self.serve_template("map-{}.html".format(self.map_type()), **self.template_variables()) def header_variables(self): # Invert map type for the "map" toolbar icon