Pull image from qrz.com and display in QSO log window
这个提交包含在:
父节点
8c84235698
当前提交
d7a23d23a4
共有 6 个文件被更改,包括 57 次插入 和 2 次删除
|
|
@ -126,11 +126,14 @@ class Logbook extends CI_Controller {
|
||||||
"bearing" => "",
|
"bearing" => "",
|
||||||
"workedBefore" => false,
|
"workedBefore" => false,
|
||||||
"lotw_member" => $lotw_member,
|
"lotw_member" => $lotw_member,
|
||||||
|
"image" => "",
|
||||||
];
|
];
|
||||||
|
|
||||||
$return['dxcc'] = $this->dxcheck($callsign);
|
$return['dxcc'] = $this->dxcheck($callsign);
|
||||||
$return['partial'] = $this->partial($callsign);
|
$return['partial'] = $this->partial($callsign);
|
||||||
|
|
||||||
|
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
|
||||||
|
|
||||||
// Do we have local data for the Callsign?
|
// Do we have local data for the Callsign?
|
||||||
if($this->logbook_model->call_name($callsign) != null)
|
if($this->logbook_model->call_name($callsign) != null)
|
||||||
{
|
{
|
||||||
|
|
@ -148,6 +151,15 @@ class Logbook extends CI_Controller {
|
||||||
$return['callsign_state'] = $this->logbook_model->call_state($callsign);
|
$return['callsign_state'] = $this->logbook_model->call_state($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 (isset($callbook)) {
|
||||||
|
if ($callbook['image'] == "") {
|
||||||
|
$return['image'] = "n/a";
|
||||||
|
} else {
|
||||||
|
$return['image'] = $callbook['image'];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$return['image'] = "n/a";
|
||||||
|
}
|
||||||
|
|
||||||
if ($return['callsign_qra'] != "") {
|
if ($return['callsign_qra'] != "") {
|
||||||
$return['latlng'] = $this->qralatlng($return['callsign_qra']);
|
$return['latlng'] = $this->qralatlng($return['callsign_qra']);
|
||||||
|
|
@ -157,7 +169,7 @@ class Logbook extends CI_Controller {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
|
//$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
|
||||||
|
|
||||||
if (isset($callbook))
|
if (isset($callbook))
|
||||||
{
|
{
|
||||||
|
|
@ -167,6 +179,11 @@ class Logbook extends CI_Controller {
|
||||||
$return['callsign_iota'] = $callbook['iota'];
|
$return['callsign_iota'] = $callbook['iota'];
|
||||||
$return['callsign_state'] = $callbook['state'];
|
$return['callsign_state'] = $callbook['state'];
|
||||||
$return['callsign_us_county'] = $callbook['us_county'];
|
$return['callsign_us_county'] = $callbook['us_county'];
|
||||||
|
if ($callbook['image'] == "") {
|
||||||
|
$return['image'] = "n/a";
|
||||||
|
} else {
|
||||||
|
$return['image'] = $callbook['image'];
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($callbook['qslmgr'])) {
|
if(isset($callbook['qslmgr'])) {
|
||||||
$return['qsl_manager'] = $callbook['qslmgr'];
|
$return['qsl_manager'] = $callbook['qslmgr'];
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
$lang['qso_title_qso_map'] = 'QSO Map';
|
$lang['qso_title_qso_map'] = 'QSO Map';
|
||||||
$lang['qso_title_suggestions'] = 'Suggestions';
|
$lang['qso_title_suggestions'] = 'Suggestions';
|
||||||
$lang['qso_title_pervious_contacts'] = 'Previous Contacts';
|
$lang['qso_title_pervious_contacts'] = 'Previous Contacts';
|
||||||
|
$lang['qso_title_image'] = 'Image';
|
||||||
|
|
||||||
// Input Help Text on the /QSO Display
|
// Input Help Text on the /QSO Display
|
||||||
$lang['qso_transmit_power_helptext'] = 'Give power value in Watts. Include only numbers in the input.';
|
$lang['qso_transmit_power_helptext'] = 'Give power value in Watts. Include only numbers in the input.';
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ class Qrz {
|
||||||
$data['long'] = (string)$xml->Callsign->lon;
|
$data['long'] = (string)$xml->Callsign->lon;
|
||||||
$data['iota'] = (string)$xml->Callsign->iota;
|
$data['iota'] = (string)$xml->Callsign->iota;
|
||||||
$data['qslmgr'] = (string)$xml->Callsign->qslmgr;
|
$data['qslmgr'] = (string)$xml->Callsign->qslmgr;
|
||||||
|
$data['image'] = (string)$xml->Callsign->image;
|
||||||
|
|
||||||
if ($xml->Callsign->country == "United States") {
|
if ($xml->Callsign->country == "United States") {
|
||||||
$data['state'] = (string)$xml->Callsign->state;
|
$data['state'] = (string)$xml->Callsign->state;
|
||||||
|
|
|
||||||
|
|
@ -521,6 +521,15 @@
|
||||||
<div class="card-body callsign-suggestions"></div>
|
<div class="card-body callsign-suggestions"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card callsign-image" id="callsign-image" style="display: none;">
|
||||||
|
<div class="card-header"><h4 style="font-size: 16px; font-weight: bold;" class="card-title"><?php echo $this->lang->line('qso_title_image'); ?></h4></div>
|
||||||
|
|
||||||
|
<div class="card-body callsign-image">
|
||||||
|
<div class="callsign-image-content" id="callsign-image-content">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card previous-qsos">
|
<div class="card previous-qsos">
|
||||||
<div class="card-header"><h4 class="card-title" style="font-size: 16px; font-weight: bold;"><?php echo $this->lang->line('qso_title_pervious_contacts'); ?></h4></div>
|
<div class="card-header"><h4 class="card-title" style="font-size: 16px; font-weight: bold;"><?php echo $this->lang->line('qso_title_pervious_contacts'); ?></h4></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,25 @@ TD.lotw{
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.callsign-image .card-title {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callsign-image {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callsign-image-content {
|
||||||
|
display: block;
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callsign-image-pic {
|
||||||
|
max-height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
.qso-map .card-title {
|
.qso-map .card-title {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
@ -255,4 +274,4 @@ color: #ffffff;
|
||||||
.modal-body {
|
.modal-body {
|
||||||
max-height: calc(100vh - 200px);
|
max-height: calc(100vh - 200px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -279,6 +279,8 @@ function reset_fields() {
|
||||||
$('#callsign_info').removeClass("badge-secondary");
|
$('#callsign_info').removeClass("badge-secondary");
|
||||||
$('#callsign_info').removeClass("badge-success");
|
$('#callsign_info').removeClass("badge-success");
|
||||||
$('#callsign_info').removeClass("badge-danger");
|
$('#callsign_info').removeClass("badge-danger");
|
||||||
|
$('#callsign-image').attr('style', 'display: none;');
|
||||||
|
$('#callsign-image-content').text("");
|
||||||
$('#qsl_via').val("");
|
$('#qsl_via').val("");
|
||||||
$('#callsign_info').text("");
|
$('#callsign_info').text("");
|
||||||
$('#input_usa_state').val("");
|
$('#input_usa_state').val("");
|
||||||
|
|
@ -441,6 +443,12 @@ $("#callsign").focusout(function() {
|
||||||
$('#qth').val(result.callsign_qth);
|
$('#qth').val(result.callsign_qth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find link to qrz.com picture */
|
||||||
|
if (result.image != "n/a") {
|
||||||
|
$('#callsign-image-content').html('<img class="callsign-image-pic" src="'+result.image+'">');
|
||||||
|
$('#callsign-image').attr('style', 'display: true;');
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update state with returned value
|
* Update state with returned value
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用