当前提交
37caa30ce9
共有 3 个文件被更改,包括 317 次插入 和 271 次删除
|
|
@ -66,7 +66,8 @@ class Logbook extends CI_Controller {
|
||||||
"callsign_qra" => "",
|
"callsign_qra" => "",
|
||||||
"callsign_qth" => "",
|
"callsign_qth" => "",
|
||||||
"callsign_iota" => "",
|
"callsign_iota" => "",
|
||||||
"bearing" => ""
|
"bearing" => "",
|
||||||
|
"workedBefore" => false
|
||||||
];
|
];
|
||||||
|
|
||||||
$return['dxcc'] = $this->find_dxcc($callsign);
|
$return['dxcc'] = $this->find_dxcc($callsign);
|
||||||
|
|
@ -80,6 +81,7 @@ class Logbook extends CI_Controller {
|
||||||
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
|
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
|
||||||
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
||||||
$return['bearing'] = $this->bearing($return['callsign_qra']);
|
$return['bearing'] = $this->bearing($return['callsign_qra']);
|
||||||
|
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra']);
|
||||||
echo json_encode($return, JSON_PRETTY_PRINT);
|
echo json_encode($return, JSON_PRETTY_PRINT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -116,6 +118,7 @@ class Logbook extends CI_Controller {
|
||||||
$return['callsign_qra'] = $callbook['gridsquare'];
|
$return['callsign_qra'] = $callbook['gridsquare'];
|
||||||
$return['callsign_qth'] = $callbook['city'];
|
$return['callsign_qth'] = $callbook['city'];
|
||||||
$return['callsign_iota'] = $callbook['iota'];
|
$return['callsign_iota'] = $callbook['iota'];
|
||||||
|
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra']);
|
||||||
}
|
}
|
||||||
$return['bearing'] = $this->bearing($return['callsign_qra']);
|
$return['bearing'] = $this->bearing($return['callsign_qra']);
|
||||||
|
|
||||||
|
|
@ -123,6 +126,21 @@ class Logbook extends CI_Controller {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function worked_grid_before($gridsquare)
|
||||||
|
{
|
||||||
|
if (strlen($gridsquare) < 4)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
|
||||||
|
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||||
|
foreach ($query->result() as $workedBeforeRow)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Used to generate maps for displaying on /logbook/ */
|
/* Used to generate maps for displaying on /logbook/ */
|
||||||
function qso_map() {
|
function qso_map() {
|
||||||
$this->load->model('logbook_model');
|
$this->load->model('logbook_model');
|
||||||
|
|
|
||||||
|
|
@ -464,6 +464,27 @@
|
||||||
if($('#locator').val() == "") {
|
if($('#locator').val() == "") {
|
||||||
$('#locator').val(result.callsign_qra);
|
$('#locator').val(result.callsign_qra);
|
||||||
$('#locator_info').html(result.bearing);
|
$('#locator_info').html(result.bearing);
|
||||||
|
|
||||||
|
if (result.callsign_qra != "")
|
||||||
|
{
|
||||||
|
if (result.workedBefore)
|
||||||
|
{
|
||||||
|
$('#locator').addClass("workedGrid");
|
||||||
|
$('#locator').attr('title', 'Grid was already worked in the past');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#locator').addClass("newGrid");
|
||||||
|
$('#locator').attr('title', 'New grid!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#locator').removeClass("workedGrid");
|
||||||
|
$('#locator').removeClass("newGrid");
|
||||||
|
$('#locator').attr('title', '');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find Operators Name */
|
/* Find Operators Name */
|
||||||
|
|
|
||||||
11
css/main.css
11
css/main.css
|
|
@ -30,9 +30,16 @@ table .title { font-weight: bold; color: #439BF6; }
|
||||||
#sat_name { text-transform: uppercase; }
|
#sat_name { text-transform: uppercase; }
|
||||||
#sat_mode { text-transform: uppercase; }
|
#sat_mode { text-transform: uppercase; }
|
||||||
#iota_ref { text-transform: uppercase; }
|
#iota_ref { text-transform: uppercase; }
|
||||||
|
.workedGrid {
|
||||||
|
background-color: #B33A3A;
|
||||||
|
color: #FFF !important;
|
||||||
|
}
|
||||||
|
.newGrid {
|
||||||
|
background-color: #4BB543;
|
||||||
|
color: #FFF !important;
|
||||||
|
}
|
||||||
input[type="text"] {
|
input[type="text"] {
|
||||||
color: #000000 !important;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pull-right { color: #fff; }
|
.pull-right { color: #fff; }
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用