From 973165a0464ec9d4011a744e044b8f97e0824cd6 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 20 Oct 2024 18:26:15 +0200 Subject: [PATCH] [QSLPrint] Added profile name. Fixed table columns when adding QSOs --- application/views/qslprint/qslprint.php | 4 +++- application/views/qslprint/qsolist.php | 4 +++- assets/js/sections/qslprint.js | 30 +++++++++++++++++++++---- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/application/views/qslprint/qslprint.php b/application/views/qslprint/qslprint.php index 52ce3a052..e8f1cfbb2 100644 --- a/application/views/qslprint/qslprint.php +++ b/application/views/qslprint/qslprint.php @@ -27,6 +27,7 @@ if ($qsos->result() != NULL) { ' . __("RST (R)") . ' ' . __("QSL") . ' ' . __("Via") . ' ' . __("Station") . ' +' . __("Profile name") . ' ' . __("Send Method") . ' ' . __("Mark as sent") . ' ' . __("Remove") . ' @@ -46,7 +47,7 @@ if ($qsos->result() != NULL) { foreach ($qsos->result() as $qsl) { echo ''; echo '
'; - ?>COL_CALL)); ?>Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on QRZ.com Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on HamQTH Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on eQSL.ccCOL_CALL)); ?>Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on QRZ.com Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on HamQTH Lookup <?php echo strtoupper($qsl->COL_CALL); ?> on eQSL.cc'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo ''; echo ''; $timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp); echo ''; echo ''; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo ''; @@ -55,6 +56,7 @@ if ($qsos->result() != NULL) { echo '' . $qsl->COL_RST_RCVD . ''; echo '' . $qsl->COL_QSL_VIA . ''; echo '' . $qsl->station_callsign . ''; + echo '' . $qsl->station_profile_name . ''; echo ''; echo_qsl_sent_via($qsl->COL_QSL_SENT_VIA); echo ''; echo ''; echo ''; diff --git a/application/views/qslprint/qsolist.php b/application/views/qslprint/qsolist.php index aeadf894e..a9245606b 100644 --- a/application/views/qslprint/qsolist.php +++ b/application/views/qslprint/qsolist.php @@ -1,6 +1,6 @@ result() != NULL) { - echo ' + echo '
@@ -11,6 +11,7 @@ if ($qsos->result() != NULL) { + '; @@ -43,6 +44,7 @@ if ($qsos->result() != NULL) { echo ''; echo ''; echo ''; + echo ''; echo ''; echo ''; echo ''; - line += ''; + line += ''; + line += ''; + line += ''; line += ''; line += ''; line += ''; + line += ''; line += ''; - line += ''; - line += ''; + line += ''; + line += ''; + line += ''; + line += ''; line += ''; line += ''; line += ''; line += ''; - $('.table tr:last').after(line); + $('#qslprint_table tr:last').after(line); $("#qsolist_"+id).remove();'' } });
'.__("Callsign").'' . __("RST (S)") . ' ' . __("RST (R)") . ' ' . __("Station") . '' . __("Profile name") . ' ' . __("QSL") . ' ' . __("Via") . ' ' . __("Send Method") . ' ' . __("QSL") . '' . $qsl->COL_RST_SENT . '' . $qsl->COL_RST_RCVD . '' . $qsl->station_callsign . '' . $qsl->station_profile_name . '' . $qsl->COL_QSL_VIA . ''; echo_qsl_sent_via($qsl->COL_QSL_SENT_VIA); echo ''; diff --git a/assets/js/sections/qslprint.js b/assets/js/sections/qslprint.js index a08167fa4..538613671 100644 --- a/assets/js/sections/qslprint.js +++ b/assets/js/sections/qslprint.js @@ -51,20 +51,42 @@ function addQsoToPrintQueue(id) { type: 'post', data: {'id': id}, success: function(html) { + var callSign = $("#qsolist_"+id).find("td:eq(0)").text(); + var formattedCallSign = callSign.replace(/0/g, "Ø").toUpperCase(); var line = '
'+$("#qsolist_"+id).find("td:eq(0)").text()+'
'; + line += ''; + line += ''; + line += formattedCallSign; + line += ''; + line += ''; + line += 'Lookup ' + formattedCallSign + ' on QRZ.com'; + line += ' '; + line += ''; + line += 'Lookup ' + formattedCallSign + ' on HamQTH'; + line += ' '; + line += ''; + line += 'Lookup ' + formattedCallSign + ' on eQSL.cc'; + line += ''; + line += ''; + line += ''+$("#qsolist_"+id).find("td:eq(1)").text()+''+$("#qsolist_"+id).find("td:eq(2)").text()+''+$("#qsolist_"+id).find("td:eq(3)").text()+''+$("#qsolist_"+id).find("td:eq(4)").text()+''+$("#qsolist_"+id).find("td:eq(5)").text()+''+$("#qsolist_"+id).find("td:eq(6)").text()+''+$("#qsolist_"+id).find("td:eq(5)").text()+''+$("#qsolist_"+id).find("td:eq(7)").text()+''+$("#qsolist_"+id).find("td:eq(9)").text()+''+$("#qsolist_"+id).find("td:eq(7)").text()+''+$("#qsolist_"+id).find("td:eq(8)").text()+''+$("#qsolist_"+id).find("td:eq(10)").text()+'