mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Also calc distance and bearing while editing VUCC grids
This commit is contained in:
@@ -252,6 +252,42 @@ function qso_edit(id) {
|
||||
}
|
||||
});
|
||||
|
||||
$('#vucc_grids').change(function(){
|
||||
if ($(this).val().length >= 9) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/logbook/searchbearing',
|
||||
type: 'post',
|
||||
data: {
|
||||
grid: $(this).val(),
|
||||
stationProfile: $('#stationProfile').val()
|
||||
},
|
||||
success: function(data) {
|
||||
$('#locator_info').html(data).fadeIn("slow");
|
||||
},
|
||||
error: function() {
|
||||
$('#locator_info').text("Error loading bearing!").fadeIn("slow");
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/logbook/searchdistance',
|
||||
type: 'post',
|
||||
data: {
|
||||
grid: $(this).val(),
|
||||
stationProfile: $('#stationProfile').val()
|
||||
},
|
||||
success: function(data) {
|
||||
document.getElementById("distance").value = data;
|
||||
},
|
||||
error: function() {
|
||||
document.getElementById("distance").value = null;
|
||||
},
|
||||
});
|
||||
} else if ($(this).val().length == 0) {
|
||||
$('#locator_info').fadeOut("slow");
|
||||
document.getElementById("distance").value = null;
|
||||
}
|
||||
});
|
||||
|
||||
$('#sota_ref_edit').selectize({
|
||||
maxItems: 1,
|
||||
closeAfterSelect: true,
|
||||
|
||||
Reference in New Issue
Block a user