Callsign information is only looked up when you enter a callsign equals to or larger than 3 chars

这个提交包含在:
Peter Goodhall 2019-07-25 14:16:09 +01:00
父节点 98cc57bcd3
当前提交 d99ea19bb3
共有 2 个文件被更改,包括 4 次插入3 次删除

查看文件

@ -208,7 +208,7 @@ $(document).ready(function(){
/* Function: reset_fields is used to reset the fields on the QSO page */ /* Function: reset_fields is used to reset the fields on the QSO page */
function reset_fields() { function reset_fields() {
$('#callsign_info').text("");
$('#locator_info').text(""); $('#locator_info').text("");
$('#country').val(""); $('#country').val("");
$('#lotw_info').text(""); $('#lotw_info').text("");
@ -221,6 +221,7 @@ $(document).ready(function(){
$("#locator").removeClass("workedGrid"); $("#locator").removeClass("workedGrid");
$("#locator").removeClass("newGrid"); $("#locator").removeClass("newGrid");
$('#qsl_via').val(""); $('#qsl_via').val("");
$('#callsign_info').text("");
mymap.setView([51.505, -0.09], 13); mymap.setView([51.505, -0.09], 13);
mymap.removeLayer(markers); mymap.removeLayer(markers);
@ -239,7 +240,7 @@ $(document).ready(function(){
$("#callsign").focusout(function() { $("#callsign").focusout(function() {
if ($(this).val()) { if ($(this).val().length >= 3) {
/* Find and populate DXCC */ /* Find and populate DXCC */
$.getJSON('logbook/json/' + $(this).val(), function(result) $.getJSON('logbook/json/' + $(this).val(), function(result)
{ {

查看文件

@ -276,7 +276,7 @@
</div> </div>
<button type="reset" class="btn btn-light" onclick="reset_fields()">Reset</button> <button type="reset" class="btn btn-light" onclick="reset_fields()">Reset</button>
<button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> Save QSO</button> <button type="submit" class="btn btn-success"><i class="fas fa-save"></i> Save QSO</button>
</div> </div>
</form> </form>
</div> </div>