Further improving EIBI schedules display.

This commit is contained in:
Marat Fayzullin 2024-01-20 23:07:18 -05:00
parent ab9ff1fe8e
commit 686850b2a3
2 changed files with 15 additions and 13 deletions

View File

@ -303,10 +303,12 @@ FeatureMarker.prototype.getInfoHTML = function(name, receiverMarker = null) {
if (this.schedule) {
var odd = false;
var list = this.schedule.map(function(x) {
var row = '<tr title="'
+ "Transmitting to " + x.tgt
+ (x.lang? ' (' + x.lang.replace(/:.*/, '') + ')' : '')
+ '" style="background-color:' + (odd? '#E0FFE0':'#FFFFFF')
var hint = x.tgt? 'Transmitting to ' + x.tgt : '';
if (hint && x.lang) hint += ' (' + x.lang.replace(/ *[:(].*/, '') + ')';
var row = '<tr '
+ (hint? 'title="' + hint + '" ' : '')
+ 'style="background-color:' + (odd? '#E0FFE0':'#FFFFFF')
+ ';"><td>' + ('0000' + x.time1).slice(-4)
+ '&#8209;' + ('0000' + x.time2).slice(-4)
+ '</td><td width="100%">' + x.name + '</td>'

View File

@ -306,15 +306,15 @@ class Markers(object):
targets = {}
comment = ""
langstr = ""
for row in schedule:
lang = row["lang"]
target = row["tgt"]
if target and target not in targets:
targets[target] = True
comment += (", " if comment else " to ") + target
if lang and lang not in langs:
langs[lang] = True
langstr += (", " if langstr else "") + re.sub(r"(:|\s*\().*$", "", lang)
# for row in schedule:
# lang = row["lang"]
# target = row["tgt"]
# if target and target not in targets:
# targets[target] = True
# comment += (", " if comment else " to ") + target
# if lang and lang not in langs:
# langs[lang] = True
# langstr += (", " if langstr else "") + re.sub(r"(:|\s*\().*$", "", lang)
# Compose comment
comment = ("Transmitting" + comment) if comment else "Transmitter"