From 31305a4c1ea54a97018221f778419035caff5598 Mon Sep 17 00:00:00 2001 From: Szymon Porwolik Date: Thu, 20 Nov 2025 16:22:42 +0100 Subject: [PATCH] Fix - callsigns shall display callsign history --- application/controllers/Bandmap.php | 1 + assets/js/sections/bandmap_list.js | 34 +++++++++-------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/application/controllers/Bandmap.php b/application/controllers/Bandmap.php index 101e79a62..d50bf1c66 100644 --- a/application/controllers/Bandmap.php +++ b/application/controllers/Bandmap.php @@ -46,6 +46,7 @@ class Bandmap extends CI_Controller { 'assets/js/leaflet/leaflet.geodesic.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/leaflet/leaflet.geodesic.js")), 'assets/js/leaflet.polylineDecorator.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/leaflet.polylineDecorator.js")), 'assets/js/leaflet/L.Terminator.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/leaflet/L.Terminator.js")), + 'assets/js/sections/callstats.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/callstats.js")), 'assets/js/sections/bandmap_list.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/bandmap_list.js")), ]; diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js index 4e7f10df2..b354f8fa1 100644 --- a/assets/js/sections/bandmap_list.js +++ b/assets/js/sections/bandmap_list.js @@ -508,27 +508,11 @@ $(function() { // to prevent recursion issues with table redraws } }); $('.spottable tbody').off('click', 'tr').on('click', 'tr', function(e) { - // Don't trigger row click if clicking on a link (LoTW, POTA, SOTA, WWFF, QRZ, etc.) - if ($(e.target).is('a') || $(e.target).closest('a').length) { + // Don't trigger row click if clicking on a link or image (LoTW, POTA, SOTA, WWFF, callstats, QRZ icon, etc.) + if ($(e.target).is('a') || $(e.target).is('img') || $(e.target).closest('a').length) { return; } - let cellIndex = $(e.target).closest('td').index(); - // If clicking callsign column (column 5, 0-indexed = 4), open QRZ link directly - if (cellIndex === 4) { - let rowData = table.row(this).data(); - if (!rowData) return; - - let callsignHtml = rowData[4]; - let tempDiv = $('
').html(callsignHtml); - let qrzLink = tempDiv.find('a'); - - if (qrzLink.length) { - qrzLink[0].click(); - return; - } - } - // Default row click: prepare QSO logging with callsign, frequency, mode let rowData = table.row(this).data(); if (!rowData) return; @@ -1086,9 +1070,10 @@ $(function() { // Submode column: show submode if available let submode = (single.submode && single.submode !== '') ? single.submode : ''; - data[0].push(submode); // Callsign column: wrap in QRZ link with color coding - let qrzLink = '' + single.spotted + ''; - wked_info = ((wked_info != '' ? '' : '') + qrzLink + (wked_info != '' ? '' : '')); + data[0].push(submode); // Callsign column: wrap in callstats link with color coding, add QRZ icon before callsign + let qrzIcon = 'QRZ'; + let callstatsLink = '' + single.spotted + ''; + wked_info = ((wked_info != '' ? '' : '') + qrzIcon + callstatsLink + (wked_info != '' ? '' : '')); var spotted = wked_info; data[0].push(spotted); @@ -1144,9 +1129,10 @@ $(function() { let dxcc_number = dxcc_id_value ? ((dxcc_wked_info != '' ? '' : '') + dxcc_id_value + (dxcc_wked_info != '' ? '' : '')) : ''; data[0].push(dxcc_number); - // de Callsign column (Spotter) - clickable QRZ link - let spotterQrzLink = '' + single.spotter + ''; - data[0].push(spotterQrzLink); + // de Callsign column (Spotter) - clickable callstats link with QRZ icon before callsign + let spotterQrzIcon = 'QRZ'; + let spotterCallstatsLink = '' + single.spotter + ''; + data[0].push(spotterQrzIcon + spotterCallstatsLink); // de Cont column: spotter's continent data[0].push((single.dxcc_spotter && single.dxcc_spotter.cont) ? single.dxcc_spotter.cont : '');