removed debug, added setClass for worked/cnfmd

这个提交包含在:
int2001 2023-09-12 06:36:31 +00:00
父节点 67731e4c61
当前提交 db87530f37
找不到此签名对应的密钥
GPG 密钥 ID: DFB1C13CD2DB037B
共有 2 个文件被更改,包括 33 次插入28 次删除

查看文件

@ -293,7 +293,6 @@ class Logbook extends CI_Controller {
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4)); $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
$query = $this->db->get($this->config->item('table_name'), 1, 0); $query = $this->db->get($this->config->item('table_name'), 1, 0);
log_message("error",$this->db->last_query());
foreach ($query->result() as $workedBeforeRow) { foreach ($query->result() as $workedBeforeRow) {
$return['confirmed']=true; $return['confirmed']=true;
} }
@ -377,7 +376,6 @@ class Logbook extends CI_Controller {
$this->db->where('COL_COUNTRY', urldecode($country)); $this->db->where('COL_COUNTRY', urldecode($country));
$query = $this->db->get($this->config->item('table_name'), 1, 0); $query = $this->db->get($this->config->item('table_name'), 1, 0);
log_message("error",$this->db->last_query());
foreach ($query->result() as $workedBeforeRow) { foreach ($query->result() as $workedBeforeRow) {
$return['confirmed']=true; $return['confirmed']=true;
} }

查看文件

@ -523,11 +523,14 @@ $("#callsign").focusout(function() {
{ {
// Reset CSS values before updating // Reset CSS values before updating
$('#callsign').removeClass("workedGrid"); $('#callsign').removeClass("workedGrid");
$('#callsign').removeClass("confirmedGrid");
$('#callsign').removeClass("newGrid"); $('#callsign').removeClass("newGrid");
$('#callsign').attr('title', ''); $('#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').addClass("workedGrid");
$('#callsign').attr('title', 'Callsign was already worked in the past on this band and mode!'); $('#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) $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result)
{ {
// Reset CSS values before updating // Reset CSS values before updating
$('#callsign').removeClass("confirmedGrid");
$('#callsign').removeClass("workedGrid"); $('#callsign').removeClass("workedGrid");
$('#callsign').removeClass("newGrid"); $('#callsign').removeClass("newGrid");
$('#callsign').attr('title', ''); $('#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').addClass("workedGrid");
$('#callsign').attr('title', 'Callsign was already worked in the past on this band and mode!'); $('#callsign').attr('title', 'Callsign was already worked in the past on this band and mode!');
} } else {
else
{
$('#callsign').addClass("newGrid"); $('#callsign').addClass("newGrid");
$('#callsign').attr('title', 'New Callsign!'); $('#callsign').attr('title', 'New Callsign!');
} }
}) })
} }
@ -634,20 +639,19 @@ $("#callsign").focusout(function() {
if (result.callsign_qra != "") 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').addClass("workedGrid");
$('#locator').attr('title', 'Grid was already worked in the past'); $('#locator').attr('title', 'Grid was already worked in the past');
} } else {
else
{
$('#locator').addClass("newGrid"); $('#locator').addClass("newGrid");
$('#locator').attr('title', 'New grid!'); $('#locator').attr('title', 'New grid!');
} }
} } else {
else
{
$('#locator').removeClass("workedGrid"); $('#locator').removeClass("workedGrid");
$('#locator').removeClass("confirmedGrid");
$('#locator').removeClass("newGrid"); $('#locator').removeClass("newGrid");
$('#locator').attr('title', ''); $('#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) $.getJSON(base_url + 'index.php/logbook/jsonlookupgrid/' + qra_lookup.toUpperCase() + '/SAT/0/0', function(result)
{ {
// Reset CSS values before updating // Reset CSS values before updating
$('#locator').removeClass("confirmedGrid");
$('#locator').removeClass("workedGrid"); $('#locator').removeClass("workedGrid");
$('#locator').removeClass("newGrid"); $('#locator').removeClass("newGrid");
$('#locator').attr('title', ''); $('#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').addClass("workedGrid");
$('#locator').attr('title', 'Grid was already worked in the past'); $('#locator').attr('title', 'Grid was already worked in the past');
} } else {
else
{
$('#locator').addClass("newGrid"); $('#locator').addClass("newGrid");
$('#locator').attr('title', 'New grid!'); $('#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) $.getJSON(base_url + 'index.php/logbook/jsonlookupgrid/' + qra_lookup.toUpperCase() + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result)
{ {
// Reset CSS values before updating // Reset CSS values before updating
$('#locator').removeClass("confirmedGrid");
$('#locator').removeClass("workedGrid"); $('#locator').removeClass("workedGrid");
$('#locator').removeClass("newGrid"); $('#locator').removeClass("newGrid");
$('#locator').attr('title', ''); $('#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').addClass("workedGrid");
$('#locator').attr('title', 'Grid was already worked in the past'); $('#locator').attr('title', 'Grid was already worked in the past');
} } else {
else
{
$('#locator').addClass("newGrid"); $('#locator').addClass("newGrid");
$('#locator').attr('title', 'New grid!'); $('#locator').attr('title', 'New grid!');
} }
}) })
} }
} }