From 1004d4295c72091c4fe45eeca7026a07d18986d5 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Dec 2025 09:18:59 +0100 Subject: [PATCH] Apply same fallback colors to all maps --- assets/js/sections/award_pl_polska.js | 15 ++++++++++++--- assets/js/sections/cqmap.js | 18 +++++++++--------- assets/js/sections/dxccmap.js | 12 +++++++++--- assets/js/sections/ffma.js | 15 ++++++++++++--- assets/js/sections/gridmap.js | 10 +++++----- assets/js/sections/gridmaster.js | 15 ++++++++++++--- assets/js/sections/helvetiamap.js | 16 ++++++++++------ assets/js/sections/iotamap.js | 18 +++++++++--------- assets/js/sections/itumap.js | 18 +++++++++--------- assets/js/sections/jccmap.js | 18 +++++++++--------- assets/js/sections/racmap.js | 18 +++++++++--------- assets/js/sections/wajamap.js | 18 +++++++++--------- assets/js/sections/wapmap.js | 18 +++++++++--------- assets/js/sections/wasmap.js | 18 +++++++++--------- 14 files changed, 132 insertions(+), 95 deletions(-) diff --git a/assets/js/sections/award_pl_polska.js b/assets/js/sections/award_pl_polska.js index c8162cb35..8b84ada19 100644 --- a/assets/js/sections/award_pl_polska.js +++ b/assets/js/sections/award_pl_polska.js @@ -34,9 +34,18 @@ var isLoading = false; // Prevent duplicate API calls var isModalLoading = false; // Prevent duplicate modal opens // Use user-customizable map colors (same as RAC and other awards) -var confirmedColor = user_map_custom.qsoconfirm.color; -var workedColor = user_map_custom.qso.color; -var unworkedColor = (typeof(user_map_custom.unworked) !== 'undefined') ? user_map_custom.unworked.color : 'red'; +let confirmedColor = 'rgba(144,238,144)'; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; +} function showMapSpinner() { var mapContainer = $('#polska-map'); diff --git a/assets/js/sections/cqmap.js b/assets/js/sections/cqmap.js index 795a7c461..d02d4a0d8 100644 --- a/assets/js/sections/cqmap.js +++ b/assets/js/sections/cqmap.js @@ -4,17 +4,17 @@ var geojson; var map; var info; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } document.addEventListener("DOMContentLoaded", function() { diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index c98ad0c17..9c474d76c 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -1,6 +1,12 @@ -let confirmedColor = user_map_custom.qsoconfirm.color; -let workedColor = user_map_custom.qso.color; -let unworkedColor = 'red'; +let confirmedColor = 'rgba(144,238,144)'; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; if (typeof(user_map_custom.unworked) !== 'undefined') { unworkedColor = user_map_custom.unworked.color; } diff --git a/assets/js/sections/ffma.js b/assets/js/sections/ffma.js index 4c4c82b40..34c607b6f 100644 --- a/assets/js/sections/ffma.js +++ b/assets/js/sections/ffma.js @@ -3,10 +3,19 @@ let grid_four = ''; let grid_four_lotw = ''; let grid_four_paper = ''; -let confirmedColor = user_map_custom.qsoconfirm.color; +let confirmedColor = 'rgba(144,238,144)'; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} // Take station color for paper QSLs here -let paperColor = user_map_custom.station.color -let workedColor = user_map_custom.qso.color; +let paperColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.station) !== 'undefined') { + paperColor = user_map_custom.station.color; +} function gridPlot(form) { $(".ld-ext-right-plot").addClass('running'); diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index 9a5fca388..a8734b44c 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -1,12 +1,12 @@ var modalloading=false; let confirmedColor = 'rgba(144,238,144)'; -if (typeof user_map_custom.qsoconfirm !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; } -let workedColor = 'rgba(255, 0, 0)'; -if (typeof user_map_custom.qso !== 'undefined') { - workedColor = user_map_custom.qso.color; +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; } document.addEventListener("DOMContentLoaded", function() { diff --git a/assets/js/sections/gridmaster.js b/assets/js/sections/gridmaster.js index a48a9bfce..8f60c94b8 100644 --- a/assets/js/sections/gridmaster.js +++ b/assets/js/sections/gridmaster.js @@ -3,10 +3,19 @@ let grid_four = ''; let grid_four_lotw = ''; let grid_four_paper = ''; -let confirmedColor = user_map_custom.qsoconfirm.color; +let confirmedColor = 'rgba(144,238,144)'; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} // Take station color for paper QSLs here -let paperColor = user_map_custom.station.color -let workedColor = user_map_custom.qso.color; +let paperColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.station) !== 'undefined') { + paperColor = user_map_custom.station.color; +} function gridPlot(form, dxcc) { $(".ld-ext-right-plot").addClass('running'); diff --git a/assets/js/sections/helvetiamap.js b/assets/js/sections/helvetiamap.js index 7266f9475..ea432d506 100644 --- a/assets/js/sections/helvetiamap.js +++ b/assets/js/sections/helvetiamap.js @@ -5,13 +5,17 @@ let map; let info; let clickmarkers = []; -let confirmedColor = user_map_custom.qsoconfirm.color; -let workedColor = user_map_custom.qso.color; -let unworkedColor = ''; +let confirmedColor = 'rgba(144,238,144)'; +if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} else { - unworkedColor = 'red'; + unworkedColor = user_map_custom.unworked.color; } const states = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH'; diff --git a/assets/js/sections/iotamap.js b/assets/js/sections/iotamap.js index 6848c5175..215ffd6f4 100644 --- a/assets/js/sections/iotamap.js +++ b/assets/js/sections/iotamap.js @@ -1,14 +1,14 @@ -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } var osmUrl = $('#iotamapjs').attr("tileUrl"); diff --git a/assets/js/sections/itumap.js b/assets/js/sections/itumap.js index ce6f191ff..ba2bd1904 100644 --- a/assets/js/sections/itumap.js +++ b/assets/js/sections/itumap.js @@ -4,17 +4,17 @@ let geojson; let map; let info; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } function load_itu_map() { diff --git a/assets/js/sections/jccmap.js b/assets/js/sections/jccmap.js index 8759f2412..d5f629133 100644 --- a/assets/js/sections/jccmap.js +++ b/assets/js/sections/jccmap.js @@ -1,15 +1,15 @@ let osmUrl = tileUrl; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } function load_jcc_map() { diff --git a/assets/js/sections/racmap.js b/assets/js/sections/racmap.js index 66e9f31ed..6244809ee 100644 --- a/assets/js/sections/racmap.js +++ b/assets/js/sections/racmap.js @@ -5,17 +5,17 @@ let map; let info; let clickmarkers = []; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } const states = 'AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT'; diff --git a/assets/js/sections/wajamap.js b/assets/js/sections/wajamap.js index f13332ef2..2b415b98e 100644 --- a/assets/js/sections/wajamap.js +++ b/assets/js/sections/wajamap.js @@ -5,17 +5,17 @@ let map; let info; let clickmarkers = []; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } const states = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47'; diff --git a/assets/js/sections/wapmap.js b/assets/js/sections/wapmap.js index 33055d2af..f0baf377a 100644 --- a/assets/js/sections/wapmap.js +++ b/assets/js/sections/wapmap.js @@ -5,17 +5,17 @@ var map; var info; var clickmarkers = []; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } const states = 'DR,FL,FR,GD,GR,LB,NB,NH,OV,UT,ZH,ZL'; diff --git a/assets/js/sections/wasmap.js b/assets/js/sections/wasmap.js index 28ec490b2..a5316a096 100644 --- a/assets/js/sections/wasmap.js +++ b/assets/js/sections/wasmap.js @@ -5,17 +5,17 @@ let map; let info; let clickmarkers = []; -let unworkedColor = 'red'; -if (typeof(user_map_custom.unworked) !== 'undefined') { - unworkedColor = user_map_custom.unworked.color; -} -let workedColor = 'rgba(255, 0, 0)'; -if (typeof(user_map_custom.qso) !== 'undefined') { - workedColor = user_map_custom.qso.color; -} let confirmedColor = 'rgba(144,238,144)'; if (typeof(user_map_custom.qsoconfirm) !== 'undefined') { - confirmedColor = user_map_custom.qsoconfirm.color; + confirmedColor = user_map_custom.qsoconfirm.color; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} +let unworkedColor = 'rgba(204, 55, 45)'; +if (typeof(user_map_custom.unworked) !== 'undefined') { + unworkedColor = user_map_custom.unworked.color; } const states = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY';