click on call -> copy call and qrg to add_qso

pull/2331/head
int2001 2023-07-26 19:50:52 +00:00
rodzic 7455ee6f46
commit 17703e16d3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DFB1C13CD2DB037B
2 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -122,7 +122,6 @@ $(function() {
var bc_qsowin = new BroadcastChannel('qso_window');
bc_qsowin.onmessage = function (ev) {
// console.log(ev.data);
if (ev.data == 'pong') {
qso_window_last_seen=Date.now();
}
@ -133,9 +132,15 @@ $(function() {
$(document).on('click','.spotted_call', function() {
if (Date.now()-qso_window_last_seen < 2000) {
bc2qso.postMessage({ call: this.innerText });
bc2qso.postMessage({ frequency: this.parentNode.cells[1].textContent*1000, call: this.innerText });
} else {
window.open('https://log.dj7nt.de/index.php/qso?manual=0','_blank');
let cl={};
cl.qrg=this.parentNode.cells[1].textContent*1000;
cl.call=this.innerText;
window.open(base_url + '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
}
});

Wyświetl plik

@ -16,6 +16,12 @@ $( document ).ready(function() {
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").blur();
}