Skip to content

Commit 1004d42

Browse files
committed
Apply same fallback colors to all maps
1 parent 6de5cff commit 1004d42

File tree

14 files changed

+124
-87
lines changed

14 files changed

+124
-87
lines changed

assets/js/sections/award_pl_polska.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,18 @@ var isLoading = false; // Prevent duplicate API calls
3434
var isModalLoading = false; // Prevent duplicate modal opens
3535

3636
// Use user-customizable map colors (same as RAC and other awards)
37-
var confirmedColor = user_map_custom.qsoconfirm.color;
38-
var workedColor = user_map_custom.qso.color;
39-
var unworkedColor = (typeof(user_map_custom.unworked) !== 'undefined') ? user_map_custom.unworked.color : 'red';
37+
let confirmedColor = 'rgba(144,238,144)';
38+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
39+
confirmedColor = user_map_custom.qsoconfirm.color;
40+
}
41+
let workedColor = 'rgba(229, 165, 10)';
42+
if (typeof(user_map_custom.qso) !== 'undefined') {
43+
workedColor = user_map_custom.qso.color;
44+
}
45+
let unworkedColor = 'rgba(204, 55, 45)';
46+
if (typeof(user_map_custom.unworked) !== 'undefined') {
47+
unworkedColor = user_map_custom.unworked.color;
48+
}
4049

4150
function showMapSpinner() {
4251
var mapContainer = $('#polska-map');

assets/js/sections/cqmap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ var geojson;
44
var map;
55
var info;
66

7-
let unworkedColor = 'red';
8-
if (typeof(user_map_custom.unworked) !== 'undefined') {
9-
unworkedColor = user_map_custom.unworked.color;
7+
let confirmedColor = 'rgba(144,238,144)';
8+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
9+
confirmedColor = user_map_custom.qsoconfirm.color;
1010
}
11-
let workedColor = 'rgba(255, 0, 0)';
11+
let workedColor = 'rgba(229, 165, 10)';
1212
if (typeof(user_map_custom.qso) !== 'undefined') {
13-
workedColor = user_map_custom.qso.color;
13+
workedColor = user_map_custom.qso.color;
1414
}
15-
let confirmedColor = 'rgba(144,238,144)';
16-
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
17-
confirmedColor = user_map_custom.qsoconfirm.color;
15+
let unworkedColor = 'rgba(204, 55, 45)';
16+
if (typeof(user_map_custom.unworked) !== 'undefined') {
17+
unworkedColor = user_map_custom.unworked.color;
1818
}
1919

2020
document.addEventListener("DOMContentLoaded", function() {

assets/js/sections/dxccmap.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
let confirmedColor = user_map_custom.qsoconfirm.color;
2-
let workedColor = user_map_custom.qso.color;
3-
let unworkedColor = 'red';
1+
let confirmedColor = 'rgba(144,238,144)';
2+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
3+
confirmedColor = user_map_custom.qsoconfirm.color;
4+
}
5+
let workedColor = 'rgba(229, 165, 10)';
6+
if (typeof(user_map_custom.qso) !== 'undefined') {
7+
workedColor = user_map_custom.qso.color;
8+
}
9+
let unworkedColor = 'rgba(204, 55, 45)';
410
if (typeof(user_map_custom.unworked) !== 'undefined') {
511
unworkedColor = user_map_custom.unworked.color;
612
}

assets/js/sections/ffma.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ let grid_four = '';
33
let grid_four_lotw = '';
44
let grid_four_paper = '';
55

6-
let confirmedColor = user_map_custom.qsoconfirm.color;
6+
let confirmedColor = 'rgba(144,238,144)';
7+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
8+
confirmedColor = user_map_custom.qsoconfirm.color;
9+
}
10+
let workedColor = 'rgba(229, 165, 10)';
11+
if (typeof(user_map_custom.qso) !== 'undefined') {
12+
workedColor = user_map_custom.qso.color;
13+
}
714
// Take station color for paper QSLs here
8-
let paperColor = user_map_custom.station.color
9-
let workedColor = user_map_custom.qso.color;
15+
let paperColor = 'rgba(204, 55, 45)';
16+
if (typeof(user_map_custom.station) !== 'undefined') {
17+
paperColor = user_map_custom.station.color;
18+
}
1019

1120
function gridPlot(form) {
1221
$(".ld-ext-right-plot").addClass('running');

assets/js/sections/gridmap.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
var modalloading=false;
22

33
let confirmedColor = 'rgba(144,238,144)';
4-
if (typeof user_map_custom.qsoconfirm !== 'undefined') {
5-
confirmedColor = user_map_custom.qsoconfirm.color;
4+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
5+
confirmedColor = user_map_custom.qsoconfirm.color;
66
}
7-
let workedColor = 'rgba(255, 0, 0)';
8-
if (typeof user_map_custom.qso !== 'undefined') {
9-
workedColor = user_map_custom.qso.color;
7+
let workedColor = 'rgba(229, 165, 10)';
8+
if (typeof(user_map_custom.qso) !== 'undefined') {
9+
workedColor = user_map_custom.qso.color;
1010
}
1111

1212
document.addEventListener("DOMContentLoaded", function() {

assets/js/sections/gridmaster.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ let grid_four = '';
33
let grid_four_lotw = '';
44
let grid_four_paper = '';
55

6-
let confirmedColor = user_map_custom.qsoconfirm.color;
6+
let confirmedColor = 'rgba(144,238,144)';
7+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
8+
confirmedColor = user_map_custom.qsoconfirm.color;
9+
}
10+
let workedColor = 'rgba(229, 165, 10)';
11+
if (typeof(user_map_custom.qso) !== 'undefined') {
12+
workedColor = user_map_custom.qso.color;
13+
}
714
// Take station color for paper QSLs here
8-
let paperColor = user_map_custom.station.color
9-
let workedColor = user_map_custom.qso.color;
15+
let paperColor = 'rgba(204, 55, 45)';
16+
if (typeof(user_map_custom.station) !== 'undefined') {
17+
paperColor = user_map_custom.station.color;
18+
}
1019

1120
function gridPlot(form, dxcc) {
1221
$(".ld-ext-right-plot").addClass('running');

assets/js/sections/helvetiamap.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ let map;
55
let info;
66
let clickmarkers = [];
77

8-
let confirmedColor = user_map_custom.qsoconfirm.color;
9-
let workedColor = user_map_custom.qso.color;
10-
let unworkedColor = '';
8+
let confirmedColor = 'rgba(144,238,144)';
9+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
10+
confirmedColor = user_map_custom.qsoconfirm.color;
11+
}
12+
let workedColor = 'rgba(229, 165, 10)';
13+
if (typeof(user_map_custom.qso) !== 'undefined') {
14+
workedColor = user_map_custom.qso.color;
15+
}
16+
let unworkedColor = 'rgba(204, 55, 45)';
1117
if (typeof(user_map_custom.unworked) !== 'undefined') {
12-
unworkedColor = user_map_custom.unworked.color;
13-
} else {
14-
unworkedColor = 'red';
18+
unworkedColor = user_map_custom.unworked.color;
1519
}
1620

1721
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';

assets/js/sections/iotamap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
let unworkedColor = 'red';
2-
if (typeof(user_map_custom.unworked) !== 'undefined') {
3-
unworkedColor = user_map_custom.unworked.color;
1+
let confirmedColor = 'rgba(144,238,144)';
2+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
3+
confirmedColor = user_map_custom.qsoconfirm.color;
44
}
5-
let workedColor = 'rgba(255, 0, 0)';
5+
let workedColor = 'rgba(229, 165, 10)';
66
if (typeof(user_map_custom.qso) !== 'undefined') {
7-
workedColor = user_map_custom.qso.color;
7+
workedColor = user_map_custom.qso.color;
88
}
9-
let confirmedColor = 'rgba(144,238,144)';
10-
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
11-
confirmedColor = user_map_custom.qsoconfirm.color;
9+
let unworkedColor = 'rgba(204, 55, 45)';
10+
if (typeof(user_map_custom.unworked) !== 'undefined') {
11+
unworkedColor = user_map_custom.unworked.color;
1212
}
1313

1414
var osmUrl = $('#iotamapjs').attr("tileUrl");

assets/js/sections/itumap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ let geojson;
44
let map;
55
let info;
66

7-
let unworkedColor = 'red';
8-
if (typeof(user_map_custom.unworked) !== 'undefined') {
9-
unworkedColor = user_map_custom.unworked.color;
7+
let confirmedColor = 'rgba(144,238,144)';
8+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
9+
confirmedColor = user_map_custom.qsoconfirm.color;
1010
}
11-
let workedColor = 'rgba(255, 0, 0)';
11+
let workedColor = 'rgba(229, 165, 10)';
1212
if (typeof(user_map_custom.qso) !== 'undefined') {
13-
workedColor = user_map_custom.qso.color;
13+
workedColor = user_map_custom.qso.color;
1414
}
15-
let confirmedColor = 'rgba(144,238,144)';
16-
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
17-
confirmedColor = user_map_custom.qsoconfirm.color;
15+
let unworkedColor = 'rgba(204, 55, 45)';
16+
if (typeof(user_map_custom.unworked) !== 'undefined') {
17+
unworkedColor = user_map_custom.unworked.color;
1818
}
1919

2020
function load_itu_map() {

assets/js/sections/jccmap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
let osmUrl = tileUrl;
2-
let unworkedColor = 'red';
3-
if (typeof(user_map_custom.unworked) !== 'undefined') {
4-
unworkedColor = user_map_custom.unworked.color;
2+
let confirmedColor = 'rgba(144,238,144)';
3+
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
4+
confirmedColor = user_map_custom.qsoconfirm.color;
55
}
6-
let workedColor = 'rgba(255, 0, 0)';
6+
let workedColor = 'rgba(229, 165, 10)';
77
if (typeof(user_map_custom.qso) !== 'undefined') {
8-
workedColor = user_map_custom.qso.color;
8+
workedColor = user_map_custom.qso.color;
99
}
10-
let confirmedColor = 'rgba(144,238,144)';
11-
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
12-
confirmedColor = user_map_custom.qsoconfirm.color;
10+
let unworkedColor = 'rgba(204, 55, 45)';
11+
if (typeof(user_map_custom.unworked) !== 'undefined') {
12+
unworkedColor = user_map_custom.unworked.color;
1313
}
1414

1515
function load_jcc_map() {

0 commit comments

Comments
 (0)