From 31bb96500f8941bce564042d92d0790cb20838fc Mon Sep 17 00:00:00 2001 From: int2001 Date: Wed, 24 Sep 2025 07:10:02 +0000 Subject: [PATCH 1/3] derive wked/cnfm badge out of DXCC-ID instead of string --- application/controllers/Logbook.php | 4 ++-- assets/js/sections/qso.js | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 137cb9cae..62700cc67 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -428,7 +428,7 @@ class Logbook extends CI_Controller { } $this->db->where_in('station_id', $logbooks_locations_array); - $this->db->where('COL_COUNTRY', urldecode($country)); + $this->db->where('COL_DXCC', urldecode($country)); $query = $this->db->get($this->config->item('table_name'), 1, 0); foreach ($query->result() as $workedBeforeRow) @@ -481,7 +481,7 @@ class Logbook extends CI_Controller { } $this->db->where_in('station_id', $logbooks_locations_array); - $this->db->where('COL_COUNTRY', urldecode($country)); + $this->db->where('COL_DXCC', urldecode($country)); $query = $this->db->get($this->config->item('table_name'), 1, 0); foreach ($query->result() as $workedBeforeRow) { diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 07350d2c2..075808d2c 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -753,9 +753,9 @@ $(document).on('change', 'input', function () { } }); -function changebadge(entityname) { +function changebadge(entityval) { if ($("#sat_name").val() != "") { - $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityname) + '/SAT/0/0', function (result) { + $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityval) + '/SAT/0/0', function (result) { $('#callsign_info').removeClass("lotw_info_orange"); $('#callsign_info').removeClass("text-bg-secondary"); @@ -776,7 +776,7 @@ function changebadge(entityname) { } }) } else { - $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityname) + '/0/' + $("#band").val() + '/' + $("#mode").val(), function (result) { + $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityval) + '/0/' + $("#band").val() + '/' + $("#mode").val(), function (result) { // Reset CSS values before updating $('#callsign_info').removeClass("lotw_info_orange"); $('#callsign_info').removeClass("text-bg-secondary"); @@ -1014,7 +1014,7 @@ $("#callsign").on("focusout", function () { }) } - changebadge(result.dxcc.entity); + changebadge(result.dxcc.adif); } @@ -2017,7 +2017,8 @@ function convert_case(str) { } $('#dxcc_id').on('change', function () { - $.getJSON(base_url + 'index.php/logbook/jsonentity/' + $(this).val(), function (result) { + const dxccadif=$(this).val(); + $.getJSON(base_url + 'index.php/logbook/jsonentity/' + dxccadif, function (result) { if (result.dxcc.name != undefined) { $('#country').val(convert_case(result.dxcc.name)); @@ -2029,7 +2030,7 @@ $('#dxcc_id').on('change', function () { $('#callsign_info').attr('title', ''); $('#callsign_info').text(convert_case(result.dxcc.name)); - changebadge(result.dxcc.name); + changebadge(dxccadif); // Set Map to Lat/Long it locator is not empty if ($('#locator').val() == "") { From 7d8afa76b158bb7c994f0d633540098636d010c6 Mon Sep 17 00:00:00 2001 From: "Joerg (DJ7NT)" Date: Wed, 24 Sep 2025 12:53:17 +0200 Subject: [PATCH 2/3] Update assets/js/sections/qso.js Co-authored-by: Florian (DF2ET) --- assets/js/sections/qso.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 075808d2c..73e17f6cd 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -755,7 +755,7 @@ $(document).on('change', 'input', function () { function changebadge(entityval) { if ($("#sat_name").val() != "") { - $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityval) + '/SAT/0/0', function (result) { + $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + entityval + '/SAT/0/0', function (result) { $('#callsign_info').removeClass("lotw_info_orange"); $('#callsign_info').removeClass("text-bg-secondary"); From 8ac7babb3312927680031ca285c6ffdb012f9d2c Mon Sep 17 00:00:00 2001 From: int2001 Date: Wed, 24 Sep 2025 10:54:38 +0000 Subject: [PATCH 3/3] remove convert_case For SAT aswell --- assets/js/sections/qso.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 73e17f6cd..f889b23b8 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -776,7 +776,7 @@ function changebadge(entityval) { } }) } else { - $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + convert_case(entityval) + '/0/' + $("#band").val() + '/' + $("#mode").val(), function (result) { + $.getJSON(base_url + 'index.php/logbook/jsonlookupdxcc/' + entityval + '/0/' + $("#band").val() + '/' + $("#mode").val(), function (result) { // Reset CSS values before updating $('#callsign_info').removeClass("lotw_info_orange"); $('#callsign_info').removeClass("text-bg-secondary");