mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2346 from int2001/fix_dxcc_badge
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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/' + 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/' + 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() == "") {
|
||||
|
||||
Reference in New Issue
Block a user