set prefixes using CSS

This commit is contained in:
Jakob Ketterl 2021-01-19 00:36:55 +01:00
parent 23bf1df72a
commit 6e416d0839
2 changed files with 15 additions and 15 deletions

View File

@ -990,6 +990,18 @@ img.openwebrx-mirror-img
cursor: pointer;
}
.openwebrx-ysf-mode:not(:empty):before {
content: "Mode: ";
}
.openwebrx-ysf-up:not(:empty):before {
content: "Up: ";
}
.openwebrx-ysf-down:not(:empty):before {
content: "Down: ";
}
.openwebrx-maps-pin {
background-image: url("../gfx/google_maps_pin.svg");
background-position: center;

View File

@ -143,11 +143,7 @@ YsfMetaPanel.prototype.clear = function() {
YsfMetaPanel.prototype.setMode = function(mode) {
if (this.mode === mode) return;
this.mode = mode;
var text = '';
if (mode && mode != '') {
text = 'Mode: ' + mode;
}
this.el.find('.openwebrx-ysf-mode').text(text);
this.el.find('.openwebrx-ysf-mode').text(mode || '');
};
YsfMetaPanel.prototype.setSource = function(source) {
@ -170,21 +166,13 @@ YsfMetaPanel.prototype.setLocation = function(lat, lon, callsign) {
YsfMetaPanel.prototype.setUp = function(up) {
if (this.up === up) return;
this.up = up;
var text = '';
if (up && up != '') {
text = 'Up: ' + up;
}
this.el.find('.openwebrx-ysf-up').text(text);
this.el.find('.openwebrx-ysf-up').text(up || '');
};
YsfMetaPanel.prototype.setDown = function(down) {
if (this.down === down) return;
this.down = down;
var text = '';
if (down && down != '') {
text = 'Down: ' + down;
}
this.el.find('.openwebrx-ysf-down').text(text);
this.el.find('.openwebrx-ysf-down').text(down || '');
}
MetaPanel.types = {