[Callsign Lookup] Return Callsign in json request and match to input when looking a callsign up

这个提交包含在:
Peter Goodhall 2022-12-01 14:01:15 +00:00
父节点 072d6fb6e7
当前提交 cbc6224ad3
共有 2 个文件被更改,包括 4 次插入2 次删除

查看文件

@ -124,6 +124,7 @@ class Logbook extends CI_Controller {
$this->load->model('logbook_model'); $this->load->model('logbook_model');
$return = [ $return = [
"callsign" => strtoupper($callsign),
"dxcc" => false, "dxcc" => false,
"callsign_name" => "", "callsign_name" => "",
"callsign_qra" => "", "callsign_qra" => "",

查看文件

@ -360,8 +360,9 @@ $("#callsign").focusout(function() {
// Replace / in a callsign with - to stop urls breaking // Replace / in a callsign with - to stop urls breaking
$.getJSON('logbook/json/' + find_callsign.replace(/\//g, "-") + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result) $.getJSON('logbook/json/' + find_callsign.replace(/\//g, "-") + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result)
{ {
// Make sure the typed callsign and temp callsign match
if($('#callsign').val = temp_callsign){ // Make sure the typed callsign and json result match
if($('#callsign').val = result.callsign) {
if(result.dxcc.entity != undefined) { if(result.dxcc.entity != undefined) {
$('#country').val(convert_case(result.dxcc.entity)); $('#country').val(convert_case(result.dxcc.entity));