Improved lookup for callsigns and display of DXpedition DXCC name on alerts page #38

This commit is contained in:
Ian Renton
2025-10-11 21:34:44 +01:00
parent 7cf6d05c4b
commit ba84b90315
4 changed files with 51 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ function addAlertRowsToTable(tbody, alerts) {
}
// Format DX flag
var dx_flag = "<i class='fa-solid fa-circle-question'></i>";
var dx_flag = "<i class='fa-solid fa-globe-africa'></i>";
if (a["dx_flag"] && a["dx_flag"] != null && a["dx_flag"] != "") {
dx_flag = a["dx_flag"];
}
@@ -150,6 +150,12 @@ function addAlertRowsToTable(tbody, alerts) {
dx_calls_html = a["dx_calls"].map(call => `<a class='dx-link' href='https://qrz.com/db/${call}' target='_new'>${call}</a>`).join(", ");
}
// Format DXpedition country
var dx_country_html = "";
if (a["is_dxpedition"] == true && a["dx_country"] != null && a["dx_country"] != "") {
dx_country_html = `<br/>${a["dx_country"]}`;
}
// Format freqs & modes
var freqsModesText = "";
if (a["freqs_modes"] != null) {
@@ -177,7 +183,7 @@ function addAlertRowsToTable(tbody, alerts) {
// Populate the row
$tr.append(`<td class='nowrap'>${start_time_formatted}</td>`);
$tr.append(`<td class='nowrap'>${end_time_formatted}</td>`);
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${dx_flag}</span>${dx_calls_html}</td>`);
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${dx_flag}</span>${dx_calls_html}${dx_country_html}</td>`);
$tr.append(`<td class='hideonmobile'>${freqsModesText}</td>`);
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid fa-${a["icon"]}'></i></span> ${sigSourceText}</td>`);