当前提交
e0c83f556a
共有 3 个文件被更改,包括 34 次插入 和 0 次删除
|
|
@ -149,6 +149,7 @@ class Logbook extends CI_Controller {
|
||||||
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
||||||
$return['qsl_manager'] = $this->logbook_model->call_qslvia($callsign);
|
$return['qsl_manager'] = $this->logbook_model->call_qslvia($callsign);
|
||||||
$return['callsign_state'] = $this->logbook_model->call_state($callsign);
|
$return['callsign_state'] = $this->logbook_model->call_state($callsign);
|
||||||
|
$return['callsign_us_county'] = $this->logbook_model->call_us_county($callsign);
|
||||||
$return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base, $station_id);
|
$return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base, $station_id);
|
||||||
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
|
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
|
||||||
if ($this->session->userdata('user_show_qrz_image')) {
|
if ($this->session->userdata('user_show_qrz_image')) {
|
||||||
|
|
|
||||||
|
|
@ -841,6 +841,27 @@ class Logbook_model extends CI_Model {
|
||||||
return $qsl_state;
|
return $qsl_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function call_us_county($callsign) {
|
||||||
|
$this->db->select('COL_CALL, COL_CNTY');
|
||||||
|
$this->db->where('COL_CALL', $callsign);
|
||||||
|
$where = "COL_CNTY != \"\"";
|
||||||
|
|
||||||
|
$this->db->where($where);
|
||||||
|
|
||||||
|
$this->db->order_by("COL_TIME_ON", "desc");
|
||||||
|
$this->db->limit(1);
|
||||||
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
if ($query->num_rows() > 0)
|
||||||
|
{
|
||||||
|
$data = $query->row();
|
||||||
|
$qsl_county = $data->COL_CNTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Strip state identifier
|
||||||
|
$qsl_county = substr($qsl_county, (strpos($qsl_county, ',')+1));
|
||||||
|
return $qsl_county;
|
||||||
|
}
|
||||||
|
|
||||||
function call_qth($callsign) {
|
function call_qth($callsign) {
|
||||||
$this->db->select('COL_CALL, COL_QTH, COL_TIME_ON');
|
$this->db->select('COL_CALL, COL_QTH, COL_TIME_ON');
|
||||||
$this->db->where('COL_CALL', $callsign);
|
$this->db->where('COL_CALL', $callsign);
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,9 @@ function reset_fields() {
|
||||||
var $select = $('#darc_dok').selectize();
|
var $select = $('#darc_dok').selectize();
|
||||||
var selectize = $select[0].selectize;
|
var selectize = $select[0].selectize;
|
||||||
selectize.clear();
|
selectize.clear();
|
||||||
|
$select = $('#stationCntyInput').selectize();
|
||||||
|
selectize = $select[0].selectize;
|
||||||
|
selectize.clear();
|
||||||
|
|
||||||
mymap.setView(pos, 12);
|
mymap.setView(pos, 12);
|
||||||
mymap.removeLayer(markers);
|
mymap.removeLayer(markers);
|
||||||
|
|
@ -472,6 +475,15 @@ $("#callsign").focusout(function() {
|
||||||
$("#input_usa_state").val(result.callsign_state).trigger('change');
|
$("#input_usa_state").val(result.callsign_state).trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Update county with returned value
|
||||||
|
*/
|
||||||
|
if( $('#stationCntyInput').has('option').length == 0 && result.callsign_us_county != "") {
|
||||||
|
var $select = $('#stationCntyInput').selectize();
|
||||||
|
var selectize = $select[0].selectize;
|
||||||
|
selectize.addOption({name: result.callsign_us_county});
|
||||||
|
selectize.setValue(result.callsign_us_county, false);
|
||||||
|
}
|
||||||
|
|
||||||
if($('#iota_ref').val() == "") {
|
if($('#iota_ref').val() == "") {
|
||||||
$('#iota_ref').val(result.callsign_iota);
|
$('#iota_ref').val(result.callsign_iota);
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用