Added the start of the callsign suggest feature

这个提交包含在:
Peter Goodhall 2019-08-13 22:02:36 +01:00
父节点 933ff98979
当前提交 50fc45dd80
共有 3 个文件被更改,包括 25 次插入1 次删除

查看文件

@ -239,10 +239,24 @@ $(document).ready(function(){
});
// On Key up check and suggest callsigns
$("#callsign").keyup(function() {
if ($(this).val().length >= 3) {
$('.callsign-suggest').show();
$.get('lookup/scp/' + $(this).val().toUpperCase(), function(result) {
$('.callsign-suggestions').text(result);
});
}
});
$("#callsign").focusout(function() {
if ($(this).val().length >= 3) {
/* Find and populate DXCC */
$.getJSON('logbook/json/' + $(this).val(), function(result)
$('.callsign-suggest').hide();
$.getJSON('logbook/json/' + $(this).val().toUpperCase(), function(result)
{
//$('#country').val(result); lotw_info
if(result.dxcc.entity != undefined) {

查看文件

@ -303,6 +303,12 @@
<div id="qsomap" style="width: 100%; height: 200px;"></div>
</div>
<div class="card callsign-suggest">
<div class="card-header"><h4 class="card-title">Suggestions</h4></div>
<div class="card-body callsign-suggestions"></div>
</div>
<div class="card previous-qsos">
<div class="card-header"><h4 class="card-title">Previous Contacts</h4></div>
<div class="card-body">

查看文件

@ -133,5 +133,9 @@ TD.lotw{
margin-bottom: 10px;
}
.callsign-suggest {
margin-bottom: 10px;
}