Heard station table list tweaks

This commit is contained in:
Mashintime 2023-02-06 22:26:39 -05:00
parent f74cb06491
commit c6b28e2ccc
2 changed files with 22 additions and 8 deletions

View file

@ -2117,6 +2117,7 @@ var speedChartOptions = {
var dxCallText = document.createElement('span');
dxCallText.innerText = arg.stations[i]['dxcallsign'];
let dxCallTextCall = dxCallText.innerText;
let dxCallTextShort = dxCallTextCall.split("-",1)[0];
row.addEventListener("click", function() {
document.getElementById("dxCall").value = dxCallTextCall;
});
@ -2152,20 +2153,22 @@ var speedChartOptions = {
dataType.appendChild(dataTypeText);
break;
case 'SESSION-HB':
dataTypeText.innerHTML = '<i class="bi bi-heart-pulse-fill"></i>';
dataTypeText.innerHTML = '<i title=\"Heartbeat\" class="bi bi-heart-pulse-fill"></i>';
dataType.appendChild(dataTypeText);
break;
}
switch (dataTypeText.innerText){
case 'CQ CQ CQ':
dataTypeText.textContent="CQ CQ";
row.classList.add("table-success");
break;
case 'DATA-C':
dataTypeText.innerHTML = '<i class="bi bi-file-earmark-binary-fill"></i>';
dataTypeText.innerHTML = '<i title=\"DATA-C\" class="bi bi-file-earmark-binary-fill"></i>';
row.classList.add("table-warning");
break;
case 'BEACON':
dataTypeText.textContent="BCN";
row.classList.add("table-light");
break;
case 'PING':
@ -2179,20 +2182,28 @@ var speedChartOptions = {
var snrText = document.createElement('span');
snrText.innerText = arg.stations[i]['snr'];
snr.appendChild(snrText);
var offset = document.createElement("td");
var offsetText = document.createElement('span');
offsetText.innerText = arg.stations[i]['offset'];
offset.appendChild(offsetText);
var offsetText = "&nbsp;";
if (contrib.indexOf(dxCallTextShort) >=0) {
var offsetText ='<i title="Yeah baby, yeah!!!!" class="bi bi-award-fill text-primary"></i>';
}
else {
if (dxCallTextShort == "DJ2LS") {
var offsetText ='<i title="Yeah FreeDATA, yeah!!!!" class="bi bi-emoji-wink-fill text-warning"></i>';
}
}
offset.innerHTML=offsetText;
row.appendChild(timestamp);
row.appendChild(frequency);
row.appendChild(offset);
row.appendChild(dxCall);
row.appendChild(dxGrid);
row.appendChild(gridDistance);
row.appendChild(dataType);
row.appendChild(snr);
row.appendChild(offset);
//row.appendChild(offset);
tbl.appendChild(row);
}

View file

@ -1118,18 +1118,20 @@
style="font-size: 1rem; color: black;" style="font-size: 1rem; color: black;"></i>
<strong> HEARD STATIONS</strong> </div>
<div class="card-body p-0">
<div class="table-responsive">
<!-- START OF TABLE FOR HEARD STATIONS -->
<table class="table table-sm">
<thead>
<tr>
<th scope="col">Time</th>
<th scope="col">Frequency</th>
<th>&nbsp;</th>
<th scope="col">DXCall</th>
<th scope="col">DXGrid</th>
<th scope="col">Distance</th>
<th scope="col">Type</th>
<th scope="col">SNR</th>
<th scope="col">Off</th>
<!--<th scope="col">Off</th>-->
</tr>
</thead>
<tbody id="heardstations">
@ -1143,6 +1145,7 @@
-->
</tbody>
</table>
</div>
<!-- END OF HEARD STATIONS TABLE -->
</div>
</div>