diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 976c51f1e..bdd98ac16 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -20,8 +20,8 @@ class Awards extends CI_Controller { if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $map_custom = json_decode($this->optionslib->get_map_custom()); - $this->user_map_color_qso = $map_custom->qso->color; - $this->user_map_color_qsoconfirm = $map_custom->qsoconfirm->color; + $this->user_map_color_qso = $map_custom->qso->color ?? ''; + $this->user_map_color_qsoconfirm = $map_custom->qsoconfirm->color ?? ''; $this->user_map_color_unworked = $map_custom->unworked->color ?? ''; } diff --git a/application/views/user/edit.php b/application/views/user/edit.php index 147627142..60186013c 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -548,8 +548,8 @@
- -
"; ?>
+ "> +
"; ?>
- + " style="padding:initial;" data-icon="qso" />
@@ -568,8 +568,8 @@
- -
")); ?>
+ "> +
")); ?>
- " data-icon="qsoconfirm" /> + " style="padding:initial;" data-icon="qsoconfirm" />
@@ -589,7 +589,7 @@
- + " style="padding:initial;" data-icon="unworked" />
diff --git a/assets/js/leaflet/L.MaidenheadColoured.js b/assets/js/leaflet/L.MaidenheadColoured.js index 23e73779a..6196cdaa7 100644 --- a/assets/js/leaflet/L.MaidenheadColoured.js +++ b/assets/js/leaflet/L.MaidenheadColoured.js @@ -8,13 +8,13 @@ L.Maidenhead = L.LayerGroup.extend({ // Line and label color workedColor: user_map_custom?.qso?.color ? hexToRgba(user_map_custom.qso.color, 0.5) - : 'rgba(255, 0, 0, 0.4)', + : 'rgba(229, 165, 10, 0.5)', confirmedColor: user_map_custom?.qsoconfirm?.color ? hexToRgba(user_map_custom.qsoconfirm.color, 0.5) - : 'rgba(144,238,144, 0.5)', + : 'rgba(144, 238, 144, 0.5)', - color: 'rgba(255, 0, 0, 0.4)', + color: 'rgba(204, 55, 45, 0.5)', // Redraw on move or moveend redraw: 'move' diff --git a/assets/js/leaflet/L.MaidenheadColouredGridMap.js b/assets/js/leaflet/L.MaidenheadColouredGridMap.js index 0d027e541..7430a6bf1 100644 --- a/assets/js/leaflet/L.MaidenheadColouredGridMap.js +++ b/assets/js/leaflet/L.MaidenheadColouredGridMap.js @@ -10,7 +10,7 @@ L.Maidenhead = L.LayerGroup.extend({ workedColor: user_map_custom?.qso?.color ? hexToRgba(user_map_custom.qso.color, 0.5) - : 'rgba(255, 0, 0, 0.5)', + : 'rgba(229, 165, 10, 0.5)', confirmedColor: user_map_custom?.qsoconfirm?.color ? hexToRgba(user_map_custom.qsoconfirm.color, 0.5) diff --git a/assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js b/assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js index 4c36fef59..896cca353 100644 --- a/assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js +++ b/assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js @@ -11,14 +11,14 @@ L.Maidenhead = L.LayerGroup.extend({ workedColor: user_map_custom?.qso?.color ? hexToRgba(user_map_custom.qso.color, 0.5) - : 'rgba(255, 251, 0, 0.5)', + : 'rgba(229, 165, 10, 0.5)', confirmedColor: user_map_custom?.qsoconfirm?.color ? hexToRgba(user_map_custom.qsoconfirm.color, 0.5) - : 'rgba(144,238,144, 0.5)', + : 'rgba(144, 238, 144, 0.5)', unworkedColor : user_map_custom?.unworked?.color ? hexToRgba(user_map_custom.unworked.color, 0.5) - : 'rgba(255, 0, 0, 0.5)', + : 'rgba(204, 55, 45, 0.5)', // Redraw on move or moveend redraw: 'move' diff --git a/assets/js/leaflet/leafembed.js b/assets/js/leaflet/leafembed.js index 73a138008..a47e64562 100644 --- a/assets/js/leaflet/leafembed.js +++ b/assets/js/leaflet/leafembed.js @@ -1,6 +1,6 @@ var map; var plotlayers=[]; -var iconsList={'qso':{'color':'#FF0000','icon':'fas fa-dot-circle'}}; +var iconsList={'qso':{'color':'#E5A50A','icon':'fas fa-dot-circle'}}; var stationIcon = L.divIcon({className:'cspot_station'}); var qsoIcon = L.divIcon({className:'cspot_qso'}); //default (fas fa-dot-circle red) 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 dcff0fad4..d02d4a0d8 100644 --- a/assets/js/sections/cqmap.js +++ b/assets/js/sections/cqmap.js @@ -4,13 +4,17 @@ var geojson; var map; var info; -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; } document.addEventListener("DOMContentLoaded", function() { diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index 0e07615b3..9c474d76c 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -1,10 +1,14 @@ -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'; } document.addEventListener("DOMContentLoaded", function() { 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 45c8b5ff9..a8734b44c 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -1,7 +1,13 @@ var modalloading=false; -let confirmedColor = user_map_custom.qsoconfirm.color; -let 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; +} +let workedColor = 'rgba(229, 165, 10)'; +if (typeof(user_map_custom.qso) !== 'undefined') { + workedColor = user_map_custom.qso.color; +} document.addEventListener("DOMContentLoaded", function() { document.querySelectorAll('.dropdown').forEach(dd => { 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 d422e6294..215ffd6f4 100644 --- a/assets/js/sections/iotamap.js +++ b/assets/js/sections/iotamap.js @@ -1,10 +1,14 @@ -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; } var osmUrl = $('#iotamapjs').attr("tileUrl"); diff --git a/assets/js/sections/itumap.js b/assets/js/sections/itumap.js index fa9ff07b4..ba2bd1904 100644 --- a/assets/js/sections/itumap.js +++ b/assets/js/sections/itumap.js @@ -4,13 +4,17 @@ let geojson; let map; let info; -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; } function load_itu_map() { diff --git a/assets/js/sections/jccmap.js b/assets/js/sections/jccmap.js index 9c282a3c6..d5f629133 100644 --- a/assets/js/sections/jccmap.js +++ b/assets/js/sections/jccmap.js @@ -1,11 +1,15 @@ let osmUrl = tileUrl; -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; } function load_jcc_map() { diff --git a/assets/js/sections/racmap.js b/assets/js/sections/racmap.js index 8aa14d286..6244809ee 100644 --- a/assets/js/sections/racmap.js +++ b/assets/js/sections/racmap.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 = '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 5726507f0..2b415b98e 100644 --- a/assets/js/sections/wajamap.js +++ b/assets/js/sections/wajamap.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 = '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 c0efbd40f..f0baf377a 100644 --- a/assets/js/sections/wapmap.js +++ b/assets/js/sections/wapmap.js @@ -5,13 +5,17 @@ var map; var info; var 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 = '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 282eea7cd..a5316a096 100644 --- a/assets/js/sections/wasmap.js +++ b/assets/js/sections/wasmap.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 = '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';