From 0320acbefdb42c3ea605211b32dec27f73bf1a14 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 18 Aug 2023 01:00:39 +0200 Subject: [PATCH] Make LoTW hint clickable and show last upload from LoTW page --- application/views/qso/index.php | 2 +- application/views/view_log/partial/log_ajax.php | 2 +- assets/js/sections/logbookadvanced.js | 4 ++-- assets/js/sections/qso.js | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 39dfc123..e4185389 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -65,7 +65,7 @@
optionslib->get_option('dxcache_url') != '') { ?>  - +
diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index e0afda10..5eece060 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -112,7 +112,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { } elseif ($diff > 7) { $lotw_hint = ' lotw_info_yellow'; } - $timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' L'); + $timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' L'); } ?> diff --git a/assets/js/sections/logbookadvanced.js b/assets/js/sections/logbookadvanced.js index 6b393de5..63f92de5 100644 --- a/assets/js/sections/logbookadvanced.js +++ b/assets/js/sections/logbookadvanced.js @@ -26,7 +26,7 @@ function updateRow(qso) { let c = 1; cells.eq(c++).text(qso.qsoDateTime); cells.eq(c++).text(qso.de); - cells.eq(c++).html(''+qso.dx+'' + (qso.callsign == '' ? '' : ' L') + ' Lookup ' + qso.dx + ' on QRZ.com Lookup ' + qso.dx + ' on HamQTH'); + cells.eq(c++).html(''+qso.dx+'' + (qso.callsign == '' ? '' : ' L') + ' Lookup ' + qso.dx + ' on QRZ.com Lookup ' + qso.dx + ' on HamQTH'); cells.eq(c++).text(qso.mode); cells.eq(c++).text(qso.rstS); cells.eq(c++).text(qso.rstR); @@ -81,7 +81,7 @@ function loadQSOTable(rows) { data.push('
'); data.push(qso.qsoDateTime); data.push(qso.de); - data.push(''+qso.dx+'' + (qso.callsign == '' ? '' : ' L') + ' Lookup ' + qso.dx + ' on QRZ.com Lookup ' + qso.dx + ' on HamQTH'); + data.push(''+qso.dx+'' + (qso.callsign == '' ? '' : ' L') + ' Lookup ' + qso.dx + ' on QRZ.com Lookup ' + qso.dx + ' on HamQTH'); data.push(qso.mode); data.push(qso.rstS); data.push(qso.rstR); diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 3ad082e5..23909736 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -495,8 +495,10 @@ $("#callsign").focusout(function() { } else if (result.lotw_days > 7) { $('#lotw_info').addClass('lotw_info_yellow'); } + $('#lotw_link').attr('href',"https://lotw.arrl.org/lotwuser/act?act="+find_callsign); + $('#lotw_link').attr('target',"_blank"); $('#lotw_info').attr('data-toggle',"tooltip"); - $('#lotw_info').attr('data-original-title',"LoTW User. Last upload was "+result.lotw_days+" days ago"); + $('#lotw_info').attr('data-original-title',"BLABLA LoTW User. Last upload was "+result.lotw_days+" days ago"); $('[data-toggle="tooltip"]').tooltip(); } $('#qrz_info').html(''); @@ -867,4 +869,4 @@ function closeModal() { container.removeChild(backdrop) container.removeChild(modal) }, 200) -} \ No newline at end of file +}