Now that SIGs are rebranded as Activities, we can merge DXpedition and Contest into that without it being too weird, and get rid of AlertType #147

This commit is contained in:
Ian Renton
2026-09-18 16:50:00 +01:00
parent bf9b4ac68c
commit cea90695ba
21 changed files with 92 additions and 113 deletions
+13 -13
View File
@@ -128,7 +128,7 @@ function updateTable() {
const showComment = $("#tableShowComment")[0].checked;
const showBearing = $("#tableShowBearing")[0].checked && userPos != null;
const showDistance = $("#tableShowDistance")[0].checked && userPos != null;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
const showDE = $("#tableShowDE")[0].checked;
const showWorkedCheckbox = $("#tableShowWorkedCheckbox")[0].checked;
@@ -157,11 +157,11 @@ function updateTable() {
if (showDistance) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Distance</th>`);
}
if (showType) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Type</th>`);
if (showActivity) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Activity</th>`);
}
if (showRef) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Ref.</th>`);
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Reference</th>`);
}
if (showDE) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>DE</th>`);
@@ -208,7 +208,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
const showComment = $("#tableShowComment")[0].checked;
const showBearing = $("#tableShowBearing")[0].checked && userPos != null;
const showDistance = $("#tableShowDistance")[0].checked && userPos != null;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
const showDE = $("#tableShowDE")[0].checked;
const showWorkedCheckbox = $("#tableShowWorkedCheckbox")[0].checked;
@@ -327,10 +327,10 @@ function createNewTableRowsForSpot(s, highlightNew) {
}
}
// Format "type" (activity or fallback to source)
let typeText = s["source"];
// Format activity
let activityText = "General DX";
if (s["sig"]) {
typeText = s["sig"];
activityText = s["sig"];
}
// Format activity refs
@@ -397,8 +397,8 @@ function createNewTableRowsForSpot(s, highlightNew) {
if (showDistance) {
$tr.append(`<td class='nowrap hideonmobile'>${distanceText}</td>`);
}
if (showType) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText}</td>`);
if (showActivity) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${activityText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile' style='max-width: 11em;'>${activityRefs}</td>`);
@@ -410,7 +410,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
$tr.append(`<td class='nowrap hideonmobile'>${workedCheckbox}</td>`);
}
// Second row for mobile view only, containing type, ref & comment
// Second row for mobile view only, containing activity, ref & comment
const $tr2 = $("<tr class='hidenotonmobile'>");
// Apply styles as per the first row
@@ -429,8 +429,8 @@ function createNewTableRowsForSpot(s, highlightNew) {
const $td2 = $("<td colspan='100'>");
const $td2floatleft = $(`<div style="float: left;">`);
if (showType) {
$td2floatleft.append(`<span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText} `);
if (showActivity) {
$td2floatleft.append(`<span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${activityText} `);
}
if (showRef) {
$td2floatleft.append(`${activityRefs} `);