Merge pull request #2331 from int2001/bandmap2qso

Bandmap2qso
pull/2336/head
Andreas Kristiansen 2023-07-27 19:58:49 +02:00 zatwierdzone przez GitHub
commit b05ad202e1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 73 dodań i 9 usunięć

Wyświetl plik

@ -6,6 +6,10 @@
</script>
<style>
.spotted_call {
cursor: alias;
}
.kHz::after {
content: " kHz";
}

Wyświetl plik

@ -82,7 +82,7 @@
<a class="dropdown-item" href="<?php echo site_url('contesting?manual=1');?>" title="Post contest QSOs"><i class="fas fa-list"></i> <?php echo lang('menu_post_contest_logging'); ?></a>
<?php if ($this->optionslib->get_option('dxcache_url') != '') { ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('bandmap/index');?>" title="Bandmap"><i class="fa fa-id-card"></i> <?php echo lang('menu_bandmap'); ?></a>
<a class="dropdown-item" href="<?php echo site_url('bandmap/list');?>" title="Bandmap"><i class="fa fa-id-card"></i> <?php echo lang('menu_bandmap'); ?></a>
<?php } ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('qsl');?>" title="QSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_qsl'); ?></a>

Wyświetl plik

@ -197,7 +197,7 @@ $(function() {
var updateFromCAT = function() {
if($('select.radios option:selected').val() != '0') {
radioID = $('select.radios option:selected').val();
$.getJSON( base_url + "radio/json/" + radioID, function( data ) {
$.getJSON( base_url + "index.php/radio/json/" + radioID, function( data ) {
if (data.error) {
if (data.error == 'not_logged_in') {

Wyświetl plik

@ -15,6 +15,13 @@ $(function() {
'createdCell': function (td, cellData, rowData, row, col) {
$(td).addClass("kHz");
}
},
{
'targets': 2,
'createdCell': function (td, cellData, rowData, row, col) {
$(td).addClass("spotted_call");
$(td).attr( "title", "Click to prepare logging" );
}
}
]
});
@ -112,6 +119,32 @@ $(function() {
}
});
var qso_window_last_seen=Date.now()-3600;
var bc_qsowin = new BroadcastChannel('qso_window');
bc_qsowin.onmessage = function (ev) {
if (ev.data == 'pong') {
qso_window_last_seen=Date.now();
}
};
setInterval(function () { bc_qsowin.postMessage('ping') },500);
var bc2qso = new BroadcastChannel('qso_wish');
$(document).on('click','.spotted_call', function() {
if (Date.now()-qso_window_last_seen < 2000) {
bc2qso.postMessage({ frequency: this.parentNode.cells[1].textContent*1000, call: this.innerText });
} else {
let cl={};
cl.qrg=this.parentNode.cells[1].textContent*1000;
cl.call=this.innerText;
window.open(base_url + 'index.php/qso?manual=0','_blank');
setTimeout(function () {
bc2qso.postMessage({ frequency: cl.qrg, call: cl.call })
},2500); // Wait at least 2500ms for new-Window to appear, before posting data to it
}
});
$("#menutoggle").on("click", function() {
if ($('.navbar').is(":hidden")) {
$('.navbar').show();
@ -131,7 +164,7 @@ $(function() {
var updateFromCAT = function() {
if($('select.radios option:selected').val() != '0') {
radioID = $('select.radios option:selected').val();
$.getJSON( base_url+"radio/json/" + radioID, function( data ) {
$.getJSON( base_url+"index.php/radio/json/" + radioID, function( data ) {
if (data.error) {
if (data.error == 'not_logged_in') {

Wyświetl plik

@ -1,5 +1,32 @@
$( document ).ready(function() {
var bc_bandmap = new BroadcastChannel('qso_window');
bc_bandmap.onmessage = function (ev) {
if (ev.data == 'ping') {
bc_bandmap.postMessage('pong');
}
}
var bc = new BroadcastChannel('qso_wish');
bc.onmessage = function (ev) {
if (ev.data.ping) {
let message={};
message.pong=true;
bc.postMessage(message);
} else {
$('#frequency').val(ev.data.frequency);
$("#band").val(frequencyToBand(ev.data.frequency));
if (ev.data.frequency_rx != "") {
$('#frequency_rx').val(ev.data.frequency_rx);
$("#band_rx").val(frequencyToBand(ev.data.frequency_rx));
}
$("#callsign").val(ev.data.call);
$("#callsign").focusout();
$("#callsign").blur();
}
} /* receive */
$("#locator")
.popover({ placement: 'top', title: 'Gridsquare Formatting', content: "Enter multiple (4-digit) grids separated with commas. For example: IO77,IO78" })
.focus(function () {
@ -89,7 +116,7 @@ $( document ).ready(function() {
});
$('#sota_ref').change(function(){
$('#sota_info').html('<a target="_blank" href="https://summits.sota.org.uk/summit/'+$('#sota_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/sota.org.uk.png"></a>');
$('#sota_info').html('<a target="_blank" href="https://summits.sota.org.uk/summit/'+$('#sota_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/sota.org.uk.png"></a>');
$('#sota_info').attr('title', 'Lookup '+$('#sota_ref').val()+' summit info on sota.org.uk');
});
@ -122,7 +149,7 @@ $( document ).ready(function() {
});
$('#wwff_ref').change(function(){
$('#wwff_info').html('<a target="_blank" href="https://www.cqgma.org/zinfo.php?ref='+$('#wwff_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/wwff.co.png"></a>');
$('#wwff_info').html('<a target="_blank" href="https://www.cqgma.org/zinfo.php?ref='+$('#wwff_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/wwff.co.png"></a>');
$('#wwff_info').attr('title', 'Lookup '+$('#wwff_ref').val()+' reference info on cqgma.org');
});
@ -155,7 +182,7 @@ $( document ).ready(function() {
});
$('#pota_ref').change(function(){
$('#pota_info').html('<a target="_blank" href="https://pota.app/#/park/'+$('#pota_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/pota.app.png"></a>');
$('#pota_info').html('<a target="_blank" href="https://pota.app/#/park/'+$('#pota_ref').val()+'"><img width="32" height="32" src="'+base_url+'images/icons/pota.app.png"></a>');
$('#pota_info').attr('title', 'Lookup '+$('#pota_ref').val()+' reference info on pota.co');
});
@ -454,7 +481,7 @@ $("#callsign").focusout(function() {
}
changebadge(result.dxcc.entity);
getDxccResult(result.dxcc.adif, convert_case(result.dxcc.entity));
}
@ -472,9 +499,9 @@ $("#callsign").focusout(function() {
$('#lotw_info').attr('data-original-title',"LoTW User. Last upload was "+result.lotw_days+" days ago");
$('[data-toggle="tooltip"]').tooltip();
}
$('#qrz_info').html('<a target="_blank" href="https://www.qrz.com/db/'+find_callsign+'"><img width="32" height="32" src="'+base_url+'images/icons/qrz.com.png"></a>');
$('#qrz_info').html('<a target="_blank" href="https://www.qrz.com/db/'+find_callsign+'"><img width="32" height="32" src="'+base_url+'images/icons/qrz.com.png"></a>');
$('#qrz_info').attr('title', 'Lookup '+find_callsign+' info on qrz.com');
$('#hamqth_info').html('<a target="_blank" href="https://www.hamqth.com/'+find_callsign+'"><img width="32" height="32" src="'+base_url+'images/icons/hamqth.com.png"></a>');
$('#hamqth_info').html('<a target="_blank" href="https://www.hamqth.com/'+find_callsign+'"><img width="32" height="32" src="'+base_url+'images/icons/hamqth.com.png"></a>');
$('#hamqth_info').attr('title', 'Lookup '+find_callsign+' info on hamqth.com');
var $dok_select = $('#darc_dok').selectize();