Removed DXCC ADIF id columnt

This commit is contained in:
Szymon Porwolik
2025-11-22 18:24:40 +01:00
parent a2f88137c6
commit 4f73c27331
3 changed files with 36 additions and 47 deletions

View File

@@ -521,7 +521,6 @@
<th title="<?= __("CQ Zone"); ?>"><i class="fas fa-map-marked"></i></th>
<th title="<?= __("Flag"); ?>"><i class="fas fa-flag"></i></th>
<th title="<?= __("DXCC Entity"); ?>"><?= __("Entity"); ?></th>
<th title="<?= __("DXCC Number"); ?>"><i class="fas fa-hashtag"></i></th>
<th title="<?= __("Spotter Callsign"); ?>"><?= __("de"); ?></th>
<th title="<?= __("Spotter Continent"); ?>"><i class="fas fa-globe-americas"></i></th>
<th title="<?= __("Spotter CQ Zone"); ?>"><i class="fas fa-map-marked"></i></th>

View File

@@ -346,22 +346,21 @@ table tbody tr.cat-nearest-above td {
/* Column widths - consolidated selectors */
.spottable th:nth-child(1), .spottable td:nth-child(1) { width: 50px; } /* Age (minutes) */
.spottable th:nth-child(2), .spottable td:nth-child(2) { width: 53px; } /* Band */
.spottable th:nth-child(2), .spottable td:nth-child(2) { width: 75px; } /* Band */
.spottable th:nth-child(3), .spottable td:nth-child(3) { width: 90px; } /* Frequency */
.spottable th:nth-child(4), .spottable td:nth-child(4) { width: 60px; } /* Mode */
.spottable th:nth-child(5), .spottable td:nth-child(5) { width: 70px; } /* Submode */
.spottable th:nth-child(6), .spottable td:nth-child(6) { width: 115px; } /* Callsign (reduced by 5px) */
.spottable th:nth-child(4), .spottable td:nth-child(4) { width: 70px; } /* Mode */
.spottable th:nth-child(5), .spottable td:nth-child(5) { width: 60px; } /* Submode */
.spottable th:nth-child(6), .spottable td:nth-child(6) { width: 115px; } /* Callsign */
.spottable th:nth-child(7), .spottable td:nth-child(7) { width: 40px; } /* Continent */
.spottable th:nth-child(8), .spottable td:nth-child(8) { width: 50px; } /* CQ Zone */
.spottable th:nth-child(9), .spottable td:nth-child(9) { width: 50px; } /* Flag */
.spottable th:nth-child(10), .spottable td:nth-child(10) { width: 150px; } /* Entity (DXCC name) */
.spottable th:nth-child(11), .spottable td:nth-child(11) { width: 60px; } /* DXCC Number */
.spottable th:nth-child(12), .spottable td:nth-child(12) { width: 115px; } /* de Callsign (Spotter) (reduced by 5px) */
.spottable th:nth-child(13), .spottable td:nth-child(13) { width: 50px; } /* de Cont */
.spottable th:nth-child(14), .spottable td:nth-child(14) { width: 50px; } /* de CQZ */
.spottable th:nth-child(15), .spottable td:nth-child(15) { width: 95px; } /* Last QSO */
.spottable th:nth-child(16), .spottable td:nth-child(16) { width: 120px; } /* Special (LoTW, POTA, etc) (increased by 10px) */
.spottable th:nth-child(17), .spottable td:nth-child(17) { min-width: 70px; width: 100%; } /* Message - fills remaining space */
.spottable th:nth-child(11), .spottable td:nth-child(11) { width: 115px; } /* de Callsign (Spotter) */
.spottable th:nth-child(12), .spottable td:nth-child(12) { width: 50px; } /* de Cont */
.spottable th:nth-child(13), .spottable td:nth-child(13) { width: 50px; } /* de CQZ */
.spottable th:nth-child(14), .spottable td:nth-child(14) { width: 100px; } /* Last QSO */
.spottable th:nth-child(15), .spottable td:nth-child(15) { width: 135px; } /* Special (LoTW, POTA, etc) */
.spottable th:nth-child(16), .spottable td:nth-child(16) { min-width: 70px; width: 100%; } /* Message - fills remaining space */
/* Hidden class for responsive columns (controlled by JavaScript) */
.spottable .column-hidden {

View File

@@ -131,7 +131,7 @@ $(function() {
// Also log which row/column caused the issue
if (message.indexOf('parameter') !== -1) {
console.error('This usually means the data array has wrong number of columns');
console.error('Expected columns: 16 (Age, Band, Freq, Mode, Spotted, Cont, CQZ, Flag, Entity, DXCC#, Spotter, de Cont, de CQZ, Last QSO, Special, Message)');
console.error('Expected columns: 16 (Age, Band, Freq, Mode, Submode, Spotted, Cont, CQZ, Flag, Entity, Spotter, de Cont, de CQZ, Last QSO, Special, Message)');
}
};
} else {
@@ -489,7 +489,7 @@ $(function() {
}
},
{
'targets': [5, 6, 9, 16], // Submode, Cont, Flag, Message - disable sorting
'targets': [4, 6, 8, 15], // Submode, Cont, Flag, Message - disable sorting
'orderable': false
}
],
@@ -1140,11 +1140,6 @@ $(function() {
data[0].push(entity_colored);
}
// DXCC Number column: show ADIF DXCC entity number with color coding
let dxcc_id_value = (single.dxcc_spotted && single.dxcc_spotted.dxcc_id) ? single.dxcc_spotted.dxcc_id : '';
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);
@@ -1175,14 +1170,14 @@ $(function() {
data[0].push(flags_column); // Message column
data[0].push(single.message || '');
// Debug: Validate data array has exactly 17 columns
if (data[0].length !== 17) {
console.error('INVALID DATA ARRAY LENGTH:', data[0].length, 'Expected: 17');
// Debug: Validate data array has exactly 16 columns
if (data[0].length !== 16) {
console.error('INVALID DATA ARRAY LENGTH:', data[0].length, 'Expected: 16');
console.error('Spot:', single.spotted, 'Frequency:', single.frequency);
console.error('Data array:', data[0]);
console.error('Missing columns:', 17 - data[0].length);
console.error('Missing columns:', 16 - data[0].length);
// Pad array with empty strings to prevent DataTables error
while (data[0].length < 17) {
while (data[0].length < 16) {
data[0].push('');
}
}
@@ -3130,8 +3125,8 @@ $(function() {
$('.spottable').removeClass('cat-sorting-locked');
// Re-enable sorting on all columns that were originally sortable
// Based on columnDefs: columns 5, 6, 9, 16 are not sortable (Submode, Cont, Flag, Message)
const nonSortableColumns = [5, 6, 9, 16];
// Based on columnDefs: columns 4, 6, 8, 15 are not sortable (Submode, Cont, Flag, Message)
const nonSortableColumns = [4, 6, 8, 15];
table.settings()[0].aoColumns.forEach(function(col, index) {
if (!nonSortableColumns.includes(index)) {
@@ -3381,41 +3376,37 @@ $(function() {
$('.spottable th:nth-child(7), .spottable td:nth-child(7)').addClass('column-hidden'); // Continent
$('.spottable th:nth-child(8), .spottable td:nth-child(8)').addClass('column-hidden'); // CQZ
$('.spottable th:nth-child(9), .spottable td:nth-child(9)').addClass('column-hidden'); // Flag
$('.spottable th:nth-child(11), .spottable td:nth-child(11)').addClass('column-hidden'); // DXCC
$('.spottable th:nth-child(12), .spottable td:nth-child(12)').addClass('column-hidden'); // de Callsign
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(15), .spottable td:nth-child(15)').addClass('column-hidden'); // Last QSO
$('.spottable th:nth-child(16), .spottable td:nth-child(16)').addClass('column-hidden'); // Special
$('.spottable th:nth-child(17), .spottable td:nth-child(17)').addClass('column-hidden'); // Message
$('.spottable th:nth-child(11), .spottable td:nth-child(11)').addClass('column-hidden'); // de Callsign
$('.spottable th:nth-child(12), .spottable td:nth-child(12)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // Last QSO
$('.spottable th:nth-child(15), .spottable td:nth-child(15)').addClass('column-hidden'); // Special
$('.spottable th:nth-child(16), .spottable td:nth-child(16)').addClass('column-hidden'); // Message
} else if (containerWidth <= 1024) {
// Hide: DXCC, CQZ, de CQZ, Last QSO, Submode, Band, Cont, de Cont, Flag
// Hide: CQZ, de CQZ, Last QSO, Submode, Band, Cont, de Cont, Flag
$('.spottable th:nth-child(2), .spottable td:nth-child(2)').addClass('column-hidden'); // Band
$('.spottable th:nth-child(5), .spottable td:nth-child(5)').addClass('column-hidden'); // Submode
$('.spottable th:nth-child(7), .spottable td:nth-child(7)').addClass('column-hidden'); // Continent
$('.spottable th:nth-child(8), .spottable td:nth-child(8)').addClass('column-hidden'); // CQZ
$('.spottable th:nth-child(9), .spottable td:nth-child(9)').addClass('column-hidden'); // Flag
$('.spottable th:nth-child(11), .spottable td:nth-child(11)').addClass('column-hidden'); // DXCC
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(15), .spottable td:nth-child(15)').addClass('column-hidden'); // Last QSO
$('.spottable th:nth-child(12), .spottable td:nth-child(12)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // Last QSO
} else if (containerWidth <= 1294) {
// Hide: DXCC, CQZ, de CQZ, Last QSO, Submode, Band, Cont, de Cont
// Hide: CQZ, de CQZ, Last QSO, Submode, Band, Cont, de Cont
$('.spottable th:nth-child(2), .spottable td:nth-child(2)').addClass('column-hidden'); // Band
$('.spottable th:nth-child(5), .spottable td:nth-child(5)').addClass('column-hidden'); // Submode
$('.spottable th:nth-child(7), .spottable td:nth-child(7)').addClass('column-hidden'); // Continent
$('.spottable th:nth-child(8), .spottable td:nth-child(8)').addClass('column-hidden'); // CQZ
$('.spottable th:nth-child(11), .spottable td:nth-child(11)').addClass('column-hidden'); // DXCC
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(15), .spottable td:nth-child(15)').addClass('column-hidden'); // Last QSO
$('.spottable th:nth-child(12), .spottable td:nth-child(12)').addClass('column-hidden'); // de Cont
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // Last QSO
} else if (containerWidth <= 1374) {
// Hide: DXCC, CQZ, de CQZ, Last QSO, Submode
// Hide: CQZ, de CQZ, Last QSO, Submode
$('.spottable th:nth-child(5), .spottable td:nth-child(5)').addClass('column-hidden'); // Submode
$('.spottable th:nth-child(8), .spottable td:nth-child(8)').addClass('column-hidden'); // CQZ
$('.spottable th:nth-child(11), .spottable td:nth-child(11)').addClass('column-hidden'); // DXCC
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(15), .spottable td:nth-child(15)').addClass('column-hidden'); // Last QSO
$('.spottable th:nth-child(13), .spottable td:nth-child(13)').addClass('column-hidden'); // de CQZ
$('.spottable th:nth-child(14), .spottable td:nth-child(14)').addClass('column-hidden'); // Last QSO
}
// else: containerWidth > 1374 - show all columns (already reset above)