diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index faddad73..42fa381e 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -293,7 +293,6 @@ class Logbook extends CI_Controller { $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4)); $query = $this->db->get($this->config->item('table_name'), 1, 0); - log_message("error",$this->db->last_query()); foreach ($query->result() as $workedBeforeRow) { $return['confirmed']=true; } @@ -377,7 +376,6 @@ class Logbook extends CI_Controller { $this->db->where('COL_COUNTRY', urldecode($country)); $query = $this->db->get($this->config->item('table_name'), 1, 0); - log_message("error",$this->db->last_query()); foreach ($query->result() as $workedBeforeRow) { $return['confirmed']=true; } diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index ddf1d648..095273d8 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -523,11 +523,14 @@ $("#callsign").focusout(function() { { // Reset CSS values before updating $('#callsign').removeClass("workedGrid"); + $('#callsign').removeClass("confirmedGrid"); $('#callsign').removeClass("newGrid"); $('#callsign').attr('title', ''); - if (result.workedBefore) - { + if (result.confirmed) { + $('#callsign').addClass("confirmedGrid"); + $('#callsign').attr('title', 'Callsign was already worked and confirmed in the past on this band and mode!'); + } else if (result.workedBefore) { $('#callsign').addClass("workedGrid"); $('#callsign').attr('title', 'Callsign was already worked in the past on this band and mode!'); } @@ -541,20 +544,22 @@ $("#callsign").focusout(function() { $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result) { // Reset CSS values before updating + $('#callsign').removeClass("confirmedGrid"); $('#callsign').removeClass("workedGrid"); $('#callsign').removeClass("newGrid"); $('#callsign').attr('title', ''); - if (result.workedBefore) - { + if (result.confirmed) { + $('#callsign').addClass("confirmedGrid"); + $('#callsign').attr('title', 'Callsign was already worked and confirmed in the past on this band and mode!'); + } else if (result.workedBefore) { $('#callsign').addClass("workedGrid"); $('#callsign').attr('title', 'Callsign was already worked in the past on this band and mode!'); - } - else - { + } else { $('#callsign').addClass("newGrid"); $('#callsign').attr('title', 'New Callsign!'); } + }) } @@ -634,20 +639,19 @@ $("#callsign").focusout(function() { if (result.callsign_qra != "") { - if (result.workedBefore) - { + if (result.confirmed) { + $('#locator').addClass("confirmedGrid"); + $('#locator').attr('title', 'Grid was already worked and confirmed in the past'); + } else if (result.workedBefore) { $('#locator').addClass("workedGrid"); $('#locator').attr('title', 'Grid was already worked in the past'); - } - else - { + } else { $('#locator').addClass("newGrid"); $('#locator').attr('title', 'New grid!'); } - } - else - { + } else { $('#locator').removeClass("workedGrid"); + $('#locator').removeClass("confirmedGrid"); $('#locator').removeClass("newGrid"); $('#locator').attr('title', ''); } @@ -775,17 +779,18 @@ $("#locator").keyup(function(){ $.getJSON(base_url + 'index.php/logbook/jsonlookupgrid/' + qra_lookup.toUpperCase() + '/SAT/0/0', function(result) { // Reset CSS values before updating + $('#locator').removeClass("confirmedGrid"); $('#locator').removeClass("workedGrid"); $('#locator').removeClass("newGrid"); $('#locator').attr('title', ''); - if (result.workedBefore) - { + if (result.confirmed) { + $('#locator').addClass("confirmedGrid"); + $('#locator').attr('title', 'Grid was already worked and confirmed in the past'); + } else if (result.workedBefore) { $('#locator').addClass("workedGrid"); $('#locator').attr('title', 'Grid was already worked in the past'); - } - else - { + } else { $('#locator').addClass("newGrid"); $('#locator').attr('title', 'New grid!'); } @@ -794,20 +799,22 @@ $("#locator").keyup(function(){ $.getJSON(base_url + 'index.php/logbook/jsonlookupgrid/' + qra_lookup.toUpperCase() + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result) { // Reset CSS values before updating + $('#locator').removeClass("confirmedGrid"); $('#locator').removeClass("workedGrid"); $('#locator').removeClass("newGrid"); $('#locator').attr('title', ''); - - if (result.workedBefore) - { + + if (result.confirmed) { + $('#locator').addClass("confirmedGrid"); + $('#locator').attr('title', 'Grid was already worked and confimred in the past'); + } else if (result.workedBefore) { $('#locator').addClass("workedGrid"); $('#locator').attr('title', 'Grid was already worked in the past'); - } - else - { + } else { $('#locator').addClass("newGrid"); $('#locator').attr('title', 'New grid!'); } + }) } }