diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index c7961e9da..414320dac 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -193,9 +193,12 @@ function plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_f // Add country name if selected const countryName = getSelectedCountryName(); if (countryName) { - html += '

DXCC: ' + countryName + '

'; + html += '

DXCC: ' + countryName; + if ($('#call').val() != '' && $('#call').val() != '*') { + html += ' ('+$('#call').val().toUpperCase()+')'; + } + html += '

'; } - html += ""; html += '' + gridsquares_gridsquares_confirmed + ' ('+grid_four_confirmed.length+')
'; html += '' + gridsquares_gridsquares_not_confirmed + ' ('+(grid_four.length - grid_four_confirmed.length)+')
'; @@ -209,11 +212,20 @@ function plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_f let div = L.DomUtil.create("div", "legend"); div.setAttribute('id', 'gridmapLegend'); div.innerHTML += '
X
'; - div.innerHTML += "

" + gridsquares_gridsquares + "

"; + if (typeof $('#call').val() !== 'undefined' && $('#call').val() != '' && $('#call').val() != '*') { + div.innerHTML += "

" + gridsquares_gridsquares + " ("+$('#call').val().toUpperCase()+")

"; + } else { + div.innerHTML += "

" + gridsquares_gridsquares + "

"; + } + div.innerHTML += ""; div.innerHTML += '' + gridsquares_gridsquares_confirmed + ' ('+grid_four_confirmed.length+')
'; div.innerHTML += '' + gridsquares_gridsquares_not_confirmed + ' ('+(grid_four.length - grid_four_confirmed.length)+')
'; div.innerHTML += '' + gridsquares_gridsquares_total_worked + ' ('+grid_four.length+')
'; - div.innerHTML += "

Fields

"; + if (typeof $('#call').val() !== 'undefined' && $('#call').val() != '' && $('#call').val() != '*') { + div.innerHTML += "

" + gridsquares_fields + " ("+$('#call').val().toUpperCase()+")

"; + } else { + div.innerHTML += "

" + gridsquares_fields + "

"; + } div.innerHTML += 'Fields confirmed ('+grid_two_confirmed.length+')
'; div.innerHTML += 'Fields not confirmed ('+(grid_two.length - grid_two_confirmed.length)+')
'; div.innerHTML += 'Total fields worked ('+grid_two.length+')
';