';
diff --git a/assets/js/sections/qslprint.js b/assets/js/sections/qslprint.js
index 0020062e2..0d7b5caee 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,23 @@ 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()+'
';
+ line += '
'+$("#qsolist_"+id).find("td:eq(5)").text()+'
';
+
+ } else if (freq_or_band === 'frequency') {
+ line += '
'+$("#qsolist_"+id).find("td:eq(4)").text()+'
';
+ 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 +346,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 +362,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 +387,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 +405,7 @@ function unmarkallQSOs(){
}
function switchbandandfrequencydisplay(mode){
-
+
//switch state according to selected value. Default case = band
switch(mode) {
case 'band':
@@ -426,4 +438,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
+});