';
diff --git a/assets/js/sections/qslprint.js b/assets/js/sections/qslprint.js
index 0020062e2..d3d08cd2f 100644
--- a/assets/js/sections/qslprint.js
+++ b/assets/js/sections/qslprint.js
@@ -70,9 +70,11 @@ function addQsoToPrintQueue(id) {
if (qsoDialogInstance) {
qsoDialogInstance.close();
}
- var callSign = $("#qsolist_"+id).find("td:eq(0)").text();
- var formattedCallSign = callSign.replace(/0/g, "Ø").toUpperCase();
- var line = '
';
+ let callSign = $("#qsolist_"+id).find("td:eq(0)").text();
+ let formattedCallSign = callSign.replace(/0/g, "Ø").toUpperCase();
+ let line = '
';
+ let freq_or_band = $('#frequency_or_band').val();
+
line += '
';
line += '
';
line += '';
@@ -94,13 +96,20 @@ function addQsoToPrintQueue(id) {
line += '
'+$("#qsolist_"+id).find("td:eq(1)").text()+'
';
line += '
'+$("#qsolist_"+id).find("td:eq(2)").text()+'
';
line += '
'+$("#qsolist_"+id).find("td:eq(3)").text()+'
';
- line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
- line += '
'+$("#qsolist_"+id).find("td:eq(5)").text()+'
';
+ if (freq_or_band === 'band') {
+ line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
+ } else if (freq_or_band === 'frequency') {
+ line += '
'+$("#qsolist_"+id).find("td:eq(5)").text()+'
';
+ } else {
+ line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(5)").text()+'
';
+ }
line += '
'+$("#qsolist_"+id).find("td:eq(6)").text()+'
';
- line += '
'+$("#qsolist_"+id).find("td:eq(9)").text()+'
';
- line += '
'+$("#qsolist_"+id).find("td:eq(7)").text()+'
';
- line += '
'+$("#qsolist_"+id).find("td:eq(8)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(7)").text()+'
';
line += '
'+$("#qsolist_"+id).find("td:eq(10)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(8)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(9)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(11)").text()+'
';
line += '
'+prev_qsl_html+'
';
line += '
';
line += '
';
@@ -334,12 +343,12 @@ function exportSelectedQsos() {
}
function markMethod(){
-
+
//grab the dropdown
const select = document.getElementById('markqslmethod');
//grab the selected method
- const methodkey = select.value;
+ const methodkey = select.value;
const method = select.options[select.selectedIndex].text;
//perform function
@@ -350,22 +359,22 @@ function markMethodQSOs(method) {
//unmark any QSO that is already marked for cleanup purposes
unmarkallQSOs();
-
+
//grab the table
const table = document.getElementById('qslprint_table');
//loop through each row except the header
Array.from(table.tBodies[0].rows).forEach(row => {
-
+
//get the send-method column
const sendMethodCell = row.querySelector('td.send-method');
//check if it contains the right method (or skip check if method is empty)
if (sendMethodCell && (method === "" || sendMethodCell.textContent.trim() === method)) {
-
+
//find the checkbox in the first cell
const checkbox = row.querySelector('td:first-child input[type="checkbox"]');
-
+
//check that box
if (checkbox) {
checkbox.checked = true;
@@ -375,16 +384,16 @@ function markMethodQSOs(method) {
}
function unmarkallQSOs(){
-
+
//grab the table
const table = document.getElementById('qslprint_table');
//loop through each row except the header
Array.from(table.tBodies[0].rows).forEach(row => {
-
+
//find the checkbox in the first cell
const checkbox = row.querySelector('td:first-child input[type="checkbox"]');
-
+
//check that box
if (checkbox) {
checkbox.checked = false;
@@ -393,7 +402,7 @@ function unmarkallQSOs(){
}
function switchbandandfrequencydisplay(mode){
-
+
//switch state according to selected value. Default case = band
switch(mode) {
case 'band':
@@ -426,4 +435,4 @@ function switchbandandfrequencydisplay(mode){
document.getElementById('frequency_or_band').addEventListener('change', function (event) {
//switch display options
switchbandandfrequencydisplay(event.target.value);
-});
\ No newline at end of file
+});
From 5b74cf4c37c01d38e19db2a8028053ac5e0a3247 Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Sun, 14 Sep 2025 14:16:18 +0200
Subject: [PATCH 2/5] Fixed the js the correct way
---
assets/js/sections/qslprint.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/assets/js/sections/qslprint.js b/assets/js/sections/qslprint.js
index d3d08cd2f..0d7b5caee 100644
--- a/assets/js/sections/qslprint.js
+++ b/assets/js/sections/qslprint.js
@@ -97,12 +97,15 @@ function addQsoToPrintQueue(id) {
line += '
'+$("#qsolist_"+id).find("td:eq(2)").text()+'
';
line += '
'+$("#qsolist_"+id).find("td:eq(3)").text()+'
';
if (freq_or_band === 'band') {
- line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(5)").text()+'
';
+
} else if (freq_or_band === 'frequency') {
- line += '