Allow sorting of additional fields in heard station list

This commit is contained in:
Mashintime 2023-05-15 17:12:52 -04:00
parent 83fc3f5ce2
commit c1079085cd
2 changed files with 15 additions and 3 deletions

View file

@ -1632,6 +1632,18 @@ window.addEventListener("DOMContentLoaded", () => {
sorthslTable(5);
resetSortIcon();
});
document.getElementById("thType").addEventListener("click", () => {
if (hslLastSort == 6 && hslLastSortDir == "asc") hslLastSortDir = "desc";
else hslLastSortDir = "asc";
sorthslTable(6);
resetSortIcon();
});
document.getElementById("thSnr").addEventListener("click", () => {
if (hslLastSort == 7 && hslLastSortDir == "asc") hslLastSortDir = "desc";
else hslLastSortDir = "asc";
sorthslTable(7);
resetSortIcon();
});
});
function resetSortIcon(){

View file

@ -1152,14 +1152,14 @@
<table class="table table-sm" id="tblHeardStationList">
<thead>
<tr>
<th scope="col" id="thTime">Time</th>
<th scope="col" id="thTime"><i id="hslSort" class="bi bi-sort-up"></i>Time</th>
<th scope="col" id="thFreq">Frequency</th>
<th>&nbsp;</th>
<th scope="col" id="thDxcall">DXCall</th>
<th scope="col" id="thDxgrid">DXGrid</th>
<th scope="col" id="thDist">Distance</th>
<th scope="col">Type</th>
<th scope="col">SNR (rx/dx)</th>
<th scope="col" id="thType">Type</th>
<th scope="col" id="thSnr">SNR (rx/dx)</th>
<!--<th scope="col">Off</th>-->
</tr>
</thead>