Skip to content

Commit edf58da

Browse files
committed
Add column widths and country badge to DX table
Set explicit widths for DX cluster table columns and display a country name badge in the DX Call column when available for improved readability and user experience.
1 parent e5f815b commit edf58da

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

application/views/dxcluster/index.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,26 @@ function matchesBandFilter(freqKhz) {
256256
columnDefs: [
257257
{
258258
targets: 0, // Time column
259+
width: '8%',
259260
render: function(data, type, row) {
260261
return data;
261262
}
262263
},
263264
{
264265
targets: 1, // DX Call column
266+
width: '35%',
265267
render: function(data, type, row) {
266268
if (type === 'display') {
267269
const callsign = data;
268270
const status = workedStatus[callsign];
269271
let html = `<span class="dx-callsign" data-callsign="${callsign}">${callsign}</span>`;
270272

271273
if (status) {
274+
// Country name badge
275+
if (status.country) {
276+
html += `<span class="badge bg-secondary ms-2" title="Country: ${status.country}">${status.country}</span>`;
277+
}
278+
272279
// Worked status icon
273280
if (status.worked_on_band) {
274281
html += `<i class="fas fa-check text-success ms-2" title="Worked on ${status.band}"></i>`;
@@ -293,6 +300,7 @@ function matchesBandFilter(freqKhz) {
293300
},
294301
{
295302
targets: 2, // Frequency column
303+
width: '12%',
296304
className: 'frequency-cell',
297305
render: function(data, type, row) {
298306
if (type === 'display') {
@@ -301,8 +309,17 @@ className: 'frequency-cell',
301309
return data;
302310
}
303311
},
312+
{
313+
targets: 3, // Spotter column
314+
width: '10%'
315+
},
316+
{
317+
targets: 4, // Comment column
318+
width: '25%'
319+
},
304320
{
305321
targets: 5, // Age column
322+
width: '10%',
306323
render: function(data, type, row) {
307324
if (type === 'display') {
308325
return `<span class="spot-age">${data}</span>`;

0 commit comments

Comments
 (0)