fix ysf images; remove obsolete code

This commit is contained in:
Jakob Ketterl 2021-01-19 22:04:33 +01:00
parent 6e60247026
commit 5d3d6423ed
2 changed files with 4 additions and 25 deletions

View File

@ -979,7 +979,8 @@ img.openwebrx-mirror-img
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.openwebrx-meta-slot.active .openwebrx-meta-user-image { .openwebrx-meta-slot.active.direct .openwebrx-meta-user-image,
#openwebrx-panel-metadata-ysf .openwebrx-meta-slot.active .openwebrx-meta-user-image {
background-image: url("../gfx/openwebrx-directcall.png"); background-image: url("../gfx/openwebrx-directcall.png");
} }

View File

@ -45,6 +45,8 @@ DmrMetaSlot.prototype.setName = function(name) {
}; };
DmrMetaSlot.prototype.setMode = function(mode) { DmrMetaSlot.prototype.setMode = function(mode) {
if (this.mode === mode) return;
this.mode = mode;
var classes = ['group', 'direct'].filter(function(c){ var classes = ['group', 'direct'].filter(function(c){
return c !== mode; return c !== mode;
}); });
@ -57,30 +59,6 @@ DmrMetaSlot.prototype.setTarget = function(target) {
this.el.find('.openwebrx-dmr-target').text(target || ''); this.el.find('.openwebrx-dmr-target').text(target || '');
} }
DmrMetaSlot.prototype.setTalkgroup = function(talkgroup) {
if (this.talkgroup === talkgroup && this.targetMode === 'talkgroup') return;
this.talkgroup = talkgroup;
this.targetMode = 'talkgroup';
var text = '';
if (talkgroup && talkgroup != '') {
text = 'Talkgroup: ' + talkgroup;
}
this.el.find('.openwebrx-dmr-target').text(text);
this.el.find(".openwebrx-meta-user-image").addClass("group");
};
DmrMetaSlot.prototype.setDirect = function(call) {
if (this.call === call && this.targetMode === 'direct') return;
this.call = call;
this.targetMode = 'direct';
var text = '';
if (call && call != '') {
text = 'Direct: ' + call;
}
this.el.find('.openwebrx-dmr-target').text(text);
this.el.find(".openwebrx-meta-user-image").removeClass("group");
};
DmrMetaSlot.prototype.clear = function() { DmrMetaSlot.prototype.clear = function() {
this.setId(); this.setId();
this.setName(); this.setName();