当前提交
						b05ad202e1
					
				
					共有  5 个文件被更改,包括 73 次插入 和 9 次删除
				
			
		| 
						 | 
				
			
			@ -6,6 +6,10 @@
 | 
			
		|||
</script>
 | 
			
		||||
 | 
			
		||||
<style>
 | 
			
		||||
.spotted_call {
 | 
			
		||||
	cursor: alias;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.kHz::after {
 | 
			
		||||
	content: " kHz";
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 () {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		正在加载…
	
		在新工单中引用