Merge pull request #2564 from szporwolik/dev_fix_open_call_history

[DX Cluster] DX and spotter callsign click behaviour
This commit is contained in:
Joerg (DJ7NT)
2025-11-22 17:39:05 +01:00
committed by GitHub
3 changed files with 17 additions and 30 deletions

View File

@@ -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")),
];

View File

@@ -152,11 +152,6 @@ tbody a {
cursor: pointer !important;
}
.spottable tbody tr td:nth-child(6) a {
text-decoration: underline !important;
cursor: pointer !important;
}
.spottable tbody tr td:nth-child(8) i:hover {
opacity: 0.7;
transform: scale(1.1);
@@ -322,7 +317,8 @@ table tbody tr.cat-nearest-above td {
.spottable {
width: 100%;
table-layout: fixed;
font-family: 'Courier New', Courier, 'Lucida Console', Monaco, monospace;
font-family: 'Consolas', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
font-variant-numeric: slashed-zero;
font-size: calc(1rem - 2px);
}
@@ -381,6 +377,12 @@ table tbody tr.cat-nearest-above td {
font-size: calc(1rem - 4px);
}
/* Callsign columns (DX and Spotter) - larger font */
.spottable td:nth-child(6), .spottable td:nth-child(12) {
font-size: calc(1rem - 2px);
}
/* Continent columns (emoji font) */
.spottable td:nth-child(7), .spottable td:nth-child(13) {
font-family: 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', Arial, sans-serif;
overflow: hidden;

View File

@@ -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 = $('<div>').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,9 @@ $(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 = '<a href="https://www.qrz.com/db/' + single.spotted + '" target="_blank" onclick="event.stopPropagation();" data-bs-toggle="tooltip" title="' + lang_bandmap_click_view_qrz_callsign.replace('%s', single.spotted) + '">' + single.spotted + '</a>';
wked_info = ((wked_info != '' ? '<span class="' + wked_info + '">' : '') + qrzLink + (wked_info != '' ? '</span>' : ''));
data[0].push(submode); // Callsign column: wrap in callstats link with color coding
let callstatsLink = '<a href="javascript:displayCallstatsContacts(\'' + single.spotted + '\',\'All\',\'All\',\'All\',\'All\',\'\');" onclick="event.stopPropagation();">' + single.spotted + '</a>';
wked_info = ((wked_info != '' ? '<span class="' + wked_info + '">' : '') + callstatsLink + (wked_info != '' ? '</span>' : ''));
var spotted = wked_info;
data[0].push(spotted);
@@ -1144,9 +1128,9 @@ $(function() {
let dxcc_number = dxcc_id_value ? ((dxcc_wked_info != '' ? '<span class="' + dxcc_wked_info + '">' : '') + dxcc_id_value + (dxcc_wked_info != '' ? '</span>' : '')) : '';
data[0].push(dxcc_number);
// de Callsign column (Spotter) - clickable QRZ link
let spotterQrzLink = '<a href="https://www.qrz.com/db/' + single.spotter + '" target="_blank" onclick="event.stopPropagation();" data-bs-toggle="tooltip" title="' + lang_bandmap_click_view_qrz_callsign.replace('%s', single.spotter) + '">' + single.spotter + '</a>';
data[0].push(spotterQrzLink);
// de Callsign column (Spotter) - clickable callstats link
let spotterCallstatsLink = '<a href="javascript:displayCallstatsContacts(\'' + single.spotter + '\',\'All\',\'All\',\'All\',\'All\',\'\');" onclick="event.stopPropagation();">' + single.spotter + '</a>';
data[0].push(spotterCallstatsLink);
// de Cont column: spotter's continent
data[0].push((single.dxcc_spotter && single.dxcc_spotter.cont) ? single.dxcc_spotter.cont : '');