Giant refactor to rebrand "SIG" as "Activity" anywhere that doesn't touch API or config file (which is to be addressed in a future breaking change). #147

This commit is contained in:
Ian Renton
2026-09-18 14:54:11 +01:00
parent 556ea56378
commit 81cd686a00
96 changed files with 1208 additions and 1170 deletions
+7 -7
View File
@@ -41,11 +41,11 @@ function loadOptions() {
}));
});
// Populate SIG drop-down
$.each(options["sigs"], function (i, sig) {
// Populate activity drop-down
$.each(options["sigs"], function (i, activity) {
$('#sig').append($('<option>', {
value: sig.name,
text: sig.name
value: activity.name,
text: activity.name
}));
});
@@ -57,7 +57,7 @@ function loadOptions() {
// Load settings from settings storage now all the controls are available
loadSettings();
// Update the upstream area for any pre-selected SIG
// Update the upstream area for any pre-selected activity
updateUpstreamArea();
});
}
@@ -84,7 +84,7 @@ function renderRecaptcha() {
});
}
// Update the "Send spot to..." area based on the currently selected SIG
// Update the "Send spot to..." area based on the currently selected activity
function updateUpstreamArea() {
if (!window._allowUpstreamSpotting || !options || !options["spot_submit_providers"]) {
$("#upstream-area").hide();
@@ -290,7 +290,7 @@ $("#mode").change(function () {
$(this).val($(this).val().trim().toUpperCase());
});
// Update upstream area and credentials button when SIG changes
// Update upstream area and credentials button when activity changes
$("#sig").change(function () {
updateUpstreamArea();
});
+14 -14
View File
@@ -250,34 +250,34 @@ function addAlertRowsToTable(tbody, alerts) {
}
// Type, SIG or fallback to source
let sigTypeText = a["source"];
// Type, activity or fallback to source
let activityTypeText = a["source"];
if (a["alert_type"] === "CONTEST") {
sigTypeText = "Contest";
activityTypeText = "Contest";
} else if (a["alert_type"] === "DXPEDITION") {
sigTypeText = "DXpedition";
activityTypeText = "DXpedition";
} else if (a["alert_type"] === "SATELLITE") {
sigTypeText = "Satellite";
activityTypeText = "Satellite";
} else if (a["alert_type"] === "XOTA") {
if (a["sig"]) {
sigTypeText = a["sig"];
activityTypeText = a["sig"];
} else {
sigTypeText = "xOTA";
activityTypeText = "xOTA";
}
}
// Format sig_refs
let sig_refs = "";
// Format activity refs
let activityRefs = "";
if (a["sig_refs"] != null) {
const items = [];
for (let i = 0; i < a["sig_refs"].length; i++) {
if (a["sig_refs"][i]["url"] != null) {
items[i] = `<a href='${encodeURI(a["sig_refs"][i]["url"])}' title='${escapeHtml(a["sig_refs"][i]["name"])}' target='_new' class='sig-ref-link'>${escapeHtml(a["sig_refs"][i]["id"])}</a>`
items[i] = `<a href='${encodeURI(a["sig_refs"][i]["url"])}' title='${escapeHtml(a["sig_refs"][i]["name"])}' target='_new' class='activity-ref-link'>${escapeHtml(a["sig_refs"][i]["id"])}</a>`
} else {
items[i] = `${escapeHtml(a["sig_refs"][i]["id"])}`
}
}
sig_refs = items.join(", ");
activityRefs = items.join(", ");
}
// Populate the row
@@ -297,10 +297,10 @@ function addAlertRowsToTable(tbody, alerts) {
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
}
if (showType) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${sigTypeText}</td>`);
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${activityTypeText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile'>${sig_refs}</td>`);
$tr.append(`<td class='hideonmobile'>${activityRefs}</td>`);
}
tbody.append($tr);
@@ -318,7 +318,7 @@ function addAlertRowsToTable(tbody, alerts) {
$td2.append(`<span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> `);
}
if (showRef) {
$td2.append(`${sig_refs} `);
$td2.append(`${activityRefs} `);
}
if (showFreqsModes) {
$td2.append(`${freqsModesText} `);
+1 -1
View File
@@ -295,7 +295,7 @@ function loadOptions() {
// Populate the filters panel
generateBandsMultiToggleFilterCard(options["bands"]);
generateSIGsMultiToggleFilterCard(options["sigs"]);
generateActivitiesMultiToggleFilterCard(options["sigs"]);
generateMultiToggleFilterCard("#dx_continent_options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#de_continent_options", "de_continent", options["continents"]);
generateModesMultiToggleFilterCard(options["modes"]);
+10 -10
View File
@@ -274,24 +274,24 @@ function getTooltipText(s) {
commentText = escapeHtml(s["comment"]);
}
// Sig or fallback to source
let sigSourceText = s["source"];
// Activity or fallback to source
let activitySourceText = s["source"];
if (s["sig"]) {
sigSourceText = s["sig"];
activitySourceText = s["sig"];
}
// Format sig_refs
let sig_refs = "";
// Format activity refs
let activityRefs = "";
if (s["sig_refs"] != null) {
const items = [];
for (let i = 0; i < s["sig_refs"].length; i++) {
if (s["sig_refs"][i]["url"] != null) {
items[i] = `<a href='${s["sig_refs"][i]["url"]}' title='${s["sig_refs"][i]["name"]}' target='_new' class='sig-ref-link'>${s["sig_refs"][i]["id"]}</a>`
items[i] = `<a href='${s["sig_refs"][i]["url"]}' title='${s["sig_refs"][i]["name"]}' target='_new' class='activity-ref-link'>${s["sig_refs"][i]["id"]}</a>`
} else {
items[i] = `${s["sig_refs"][i]["id"]}`
}
}
sig_refs = items.join(", ");
activityRefs = items.join(", ");
}
// DX
@@ -308,8 +308,8 @@ function getTooltipText(s) {
}
ttt += "<br/>";
// Source / SIG / Ref
ttt += `<span class='nowrap'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span>&nbsp;${sigSourceText} ${sig_refs}</span><br/>`;
// Source / Activity / Ref
ttt += `<span class='nowrap'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span>&nbsp;${activitySourceText} ${activityRefs}</span><br/>`;
// Time
ttt += `<span class='icon-wrapper'><i class='fa-solid fa-clock markerPopupIcon'></i></span>&nbsp;${moment.unix(s["time"]).fromNow()}`;
@@ -339,7 +339,7 @@ function loadOptions() {
// Populate the filters panel
generateBandsMultiToggleFilterCard(options["bands"]);
generateSIGsMultiToggleFilterCard(options["sigs"]);
generateActivitiesMultiToggleFilterCard(options["sigs"]);
generateMultiToggleFilterCard("#dx_continent_options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#de_continent_options", "de_continent", options["continents"]);
generateModesMultiToggleFilterCard(options["modes"]);
+8 -8
View File
@@ -327,24 +327,24 @@ function createNewTableRowsForSpot(s, highlightNew) {
}
}
// Format "type" (Sig or fallback to source)
// Format "type" (activity or fallback to source)
let typeText = s["source"];
if (s["sig"]) {
typeText = s["sig"];
}
// Format sig_refs
let sig_refs = "";
// Format activity refs
let activityRefs = "";
if (s["sig_refs"] != null) {
const items = [];
for (let i = 0; i < s["sig_refs"].length; i++) {
if (s["sig_refs"][i]["url"] != null) {
items[i] = `<span style="white-space: nowrap;"><a href='${encodeURI(s["sig_refs"][i]["url"])}' title='${escapeHtml(s["sig_refs"][i]["name"])}' target='_new' class='sig-ref-link'>${escapeHtml(s["sig_refs"][i]["id"])}</a></span>`
items[i] = `<span style="white-space: nowrap;"><a href='${encodeURI(s["sig_refs"][i]["url"])}' title='${escapeHtml(s["sig_refs"][i]["name"])}' target='_new' class='activity-ref-link'>${escapeHtml(s["sig_refs"][i]["id"])}</a></span>`
} else {
items[i] = `<span style="white-space: nowrap;">${escapeHtml(s["sig_refs"][i]["id"])}</span>`
}
}
sig_refs = items.join(", ");
activityRefs = items.join(", ");
}
// Format de country
@@ -401,7 +401,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile' style='max-width: 11em;'>${sig_refs}</td>`);
$tr.append(`<td class='hideonmobile' style='max-width: 11em;'>${activityRefs}</td>`);
}
if (showDE) {
$tr.append(`<td class='nowrap hideonmobile'><span class='flag-wrapper' title='${de_country}'>${de_flag}</span>${de_call}</td>`);
@@ -433,7 +433,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
$td2floatleft.append(`<span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText} `);
}
if (showRef) {
$td2floatleft.append(`${sig_refs} `);
$td2floatleft.append(`${activityRefs} `);
}
$td2.append($td2floatleft);
const $td2floatright = $(`<div style="float: right;">`);
@@ -478,7 +478,7 @@ function loadOptions() {
// Populate the filters panel
generateBandsMultiToggleFilterCard(options["bands"]);
generateSIGsMultiToggleFilterCard(options["sigs"]);
generateActivitiesMultiToggleFilterCard(options["sigs"]);
generateMultiToggleFilterCard("#dx_continent_options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#de_continent_options", "de_continent", options["continents"]);
generateModesMultiToggleFilterCard(options["modes"]);
+5 -5
View File
@@ -38,25 +38,25 @@ function setHamHFBandToggles() {
filtersUpdated();
}
// Generate SIGs filter card. This one is also a special case.
function generateSIGsMultiToggleFilterCard(sig_options) {
// Generate activities filter card. This one is also a special case.
function generateActivitiesMultiToggleFilterCard(activity_options) {
const $grid1 = $('<div class="row row-cols-2 g-1 mb-1">');
$("#sig-options").append('<strong>Worldwide</strong>');
sig_options.filter(o => o["sig_type"] === "WORLDWIDE").forEach(o => {
activity_options.filter(o => o["sig_type"] === "WORLDWIDE").forEach(o => {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid1.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
});
$("#sig-options").append($grid1);
const $grid2 = $('<div class="row row-cols-2 g-1 mb-1">');
$("#sig-options").append('<strong>Regional</strong>');
sig_options.filter(o => o["sig_type"] === "REGIONAL").forEach(o => {
activity_options.filter(o => o["sig_type"] === "REGIONAL").forEach(o => {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid2.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
});
$("#sig-options").append($grid2);
const $grid3 = $('<div class="row row-cols-2 g-1 mb-1">');
$("#sig-options").append('<strong>Event</strong>');
sig_options.filter(o => o["sig_type"] === "EVENT").forEach(o => {
activity_options.filter(o => o["sig_type"] === "EVENT").forEach(o => {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid3.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
});
+1 -1
View File
@@ -1,6 +1,6 @@
//
// USER INTERFACE FUNCTIONS (AMATEUR RADIO)
// Functions providing colour schemes for ham radio bands, SIG icons etc.
// Functions providing colour schemes for ham radio bands, activity icons etc.
//
const BAND_COLOR_SCHEMES = {