mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
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:
+8
-8
@@ -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"]);
|
||||
|
||||
Reference in New Issue
Block a user