Merge pull request #236 from g0wfv/SingleFileLogging
Combines the Live/Manual QSO Interfaces into a single file which is easier for maintenance.
这个提交包含在:
当前提交
0d988a1b45
共有 7 个文件被更改,包括 475 次插入 和 439 次删除
|
|
@ -2,9 +2,8 @@
|
||||||
class Frequency {
|
class Frequency {
|
||||||
|
|
||||||
const modes = array('SSB','FM','AM','CW','DSTAR','F4M','DMR','DIGITALVOICE',
|
const modes = array('SSB','FM','AM','CW','DSTAR','F4M','DMR','DIGITALVOICE',
|
||||||
'PSK31','PSK63','RTTY',
|
'PSK31','PSK63','RTTY','JT65','JT65B','JT6C','JT9-1',
|
||||||
'JT65','JT65B','JT6C','JT9-1','JT9','FT8',
|
'JT9','FT8','FSK441','JTMS','ISCAT','MSK144','JTMSK',
|
||||||
'FSK441','JTMS','ISCAT','MSK144','JTMSK',
|
|
||||||
'QRA64','PKT','SSTV','HELL','HELL80');
|
'QRA64','PKT','SSTV','HELL','HELL80');
|
||||||
|
|
||||||
public $defaultFrequencies = array(
|
public $defaultFrequencies = array(
|
||||||
|
|
@ -55,7 +54,7 @@ class Frequency {
|
||||||
'2m'=>array(
|
'2m'=>array(
|
||||||
'SSB'=>"144300000",
|
'SSB'=>"144300000",
|
||||||
'DATA'=>"144370000",
|
'DATA'=>"144370000",
|
||||||
'CW'=>"144.050000"),
|
'CW'=>"144050000"),
|
||||||
'70cm'=>array(
|
'70cm'=>array(
|
||||||
'SSB'=>"432200000",
|
'SSB'=>"432200000",
|
||||||
'DATA'=>"432088000",
|
'DATA'=>"432088000",
|
||||||
|
|
@ -105,7 +104,6 @@ class Frequency {
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->defaultFrequencies[$band][$mode];
|
return $this->defaultFrequencies[$band][$mode];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetBand($Frequency) {
|
public function GetBand($Frequency) {
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,9 @@
|
||||||
<li class="dropdown" data-dropdown="dropdown" >
|
<li class="dropdown" data-dropdown="dropdown" >
|
||||||
<a href="#" class="dropdown-toggle">QSOs</a>
|
<a href="#" class="dropdown-toggle">QSOs</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="<?php echo site_url('qso');?>" title="qso">Live QSOs</a></li>
|
<li><a href="<?php echo site_url('qso?manual=0');?>" title="Live QSOs">Live QSOs</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="<?php echo site_url('qso/manual');?>" title="Notes">Post QSOs</a></li>
|
<li><a href="<?php echo site_url('qso?manual=1');?>" title="Post QSOs">Post QSOs</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var manual = <?php echo $_GET['manual']; ?>;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".qsobox").fancybox({
|
$(".qsobox").fancybox({
|
||||||
'autoDimensions' : false,
|
'autoDimensions' : false,
|
||||||
|
|
@ -19,12 +21,15 @@
|
||||||
'type' : 'iframe'
|
'type' : 'iframe'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ( ! manual ) {
|
||||||
$(function($) {
|
$(function($) {
|
||||||
var options = {
|
var options = {
|
||||||
utc: true
|
utc: true,
|
||||||
|
format: '%H:%M'
|
||||||
}
|
}
|
||||||
$('.input_time').jclock(options);
|
$('.input_time').jclock(options);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -48,9 +53,9 @@
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
|
|
||||||
<h2>Add QSO</h2>
|
<h2>Add QSO <?php echo ($_GET['manual'] == 1 ? "(post entry)" : "") ?></h2>
|
||||||
|
|
||||||
<form id="qso_input" method="post" action="<?php echo site_url('qso'); ?>" name="qsos">
|
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos">
|
||||||
<input type="hidden" id="dxcc_id" name="dxcc_id" value=""/>
|
<input type="hidden" id="dxcc_id" name="dxcc_id" value=""/>
|
||||||
<input type="hidden" id="cqz" name="cqz" value=""/>
|
<input type="hidden" id="cqz" name="cqz" value=""/>
|
||||||
|
|
||||||
|
|
@ -58,7 +63,16 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="title">Date</td>
|
<td class="title">Date</td>
|
||||||
<td><input class="input_date" type="text" name="start_date" value="<?php echo date('d-m-Y'); ?>" size="10" /> <input class="input_time" type="text" name="start_time" value="" size="7" /></td>
|
<td>
|
||||||
|
<input class="input_date" type="text" name="start_date" value="<?php echo date('d-m-Y'); ?>" size="10" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> />
|
||||||
|
<input class="input_time" type="text" id="start_date" name="start_time" value="<?php echo date('H:i'); ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> />
|
||||||
|
|
||||||
|
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||||
|
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
||||||
|
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -245,8 +259,7 @@
|
||||||
|
|
||||||
<table class="zebra-striped" width="100%">
|
<table class="zebra-striped" width="100%">
|
||||||
<tr class="log_title titles">
|
<tr class="log_title titles">
|
||||||
<td>Date</td>
|
<td>Date/Time</td>
|
||||||
<td>Time</td>
|
|
||||||
<td>Call</td>
|
<td>Call</td>
|
||||||
<td>Mode</td>
|
<td>Mode</td>
|
||||||
<td>Sent</td>
|
<td>Sent</td>
|
||||||
|
|
@ -257,8 +270,7 @@
|
||||||
<?php $i = 0;
|
<?php $i = 0;
|
||||||
foreach ($query->result() as $row) { ?>
|
foreach ($query->result() as $row) { ?>
|
||||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
|
<td><?php echo $row->COL_TIME_ON; ?></td>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
|
||||||
<td><a class="qsobox" href="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>"><?php echo strtoupper($row->COL_CALL); ?></a></td>
|
<td><a class="qsobox" href="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>"><?php echo strtoupper($row->COL_CALL); ?></a></td>
|
||||||
<td><?php echo $row->COL_MODE; ?></td>
|
<td><?php echo $row->COL_MODE; ?></td>
|
||||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||||
|
|
@ -281,13 +293,28 @@
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function delay(callback, ms) {
|
||||||
|
var timer = 0;
|
||||||
|
return function() {
|
||||||
|
var context = this, args = arguments;
|
||||||
|
clearTimeout(timer);
|
||||||
|
timer = setTimeout(function () {
|
||||||
|
callback.apply(context, args);
|
||||||
|
}, ms || 0);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
|
typeDelay=1000;
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
// Set the focus input to the callsign field
|
// Set the focus input to the callsign field
|
||||||
$("#callsign").focus();
|
$("#callsign").focus();
|
||||||
/* Javascript for controlling rig frequency. */
|
|
||||||
|
|
||||||
|
/* Javascript for controlling rig frequency. */
|
||||||
|
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||||
var updateFromCAT = function() {
|
var updateFromCAT = function() {
|
||||||
if($('select.radios option:selected').val() != '0') {
|
if($('select.radios option:selected').val() != '0') {
|
||||||
// Get frequency
|
// Get frequency
|
||||||
|
|
@ -336,6 +363,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
/* On Page Load */
|
/* On Page Load */
|
||||||
var catcher = function() {
|
var catcher = function() {
|
||||||
var changed = false;
|
var changed = false;
|
||||||
|
|
@ -402,11 +431,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
/* On Callsign Change */
|
/* On Callsign Change */
|
||||||
$("#callsign").focusout(function(){
|
$("#callsign").keyup(delay(function(){
|
||||||
if ($(this).val()) {
|
if ($(this).val()) {
|
||||||
/* Find Callsign Matches */
|
|
||||||
$('#partial_view').load("logbook/partial/" + $(this).val()).fadeIn("slow");
|
|
||||||
|
|
||||||
/* Find and populate DXCC */
|
/* Find and populate DXCC */
|
||||||
$.get('logbook/find_dxcc/' + $(this).val(), function(result) {
|
$.get('logbook/find_dxcc/' + $(this).val(), function(result) {
|
||||||
//$('#country').val(result);
|
//$('#country').val(result);
|
||||||
|
|
@ -445,8 +471,21 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find Callsign Matches */
|
||||||
|
$('#partial_view').load("logbook/partial/" + $(this).val()).fadeIn("slow");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/* Reset fields ... */
|
||||||
|
$('#country').val("");
|
||||||
|
$('#dxcc_id').val("");
|
||||||
|
$('#cqz').val("");
|
||||||
|
$('#name').val("");
|
||||||
|
$('#qth').val("");
|
||||||
|
$('#locator').val("");
|
||||||
|
$('#iota_ref').val("");
|
||||||
|
$('#partial_view').load("logbook/partial/");
|
||||||
}
|
}
|
||||||
});
|
}, typeDelay));
|
||||||
|
|
||||||
|
|
||||||
// Change report based on mode
|
// Change report based on mode
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<table width="100%">
|
<table class="zebra-striped" width="100%">
|
||||||
<tr class="titles">
|
<tr class="titles">
|
||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td>Time</td>
|
<td>Time</td>
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ td.item { padding-bottom: 5px; }
|
||||||
.title { padding-top: 5px; padding-bottom: 5px; color: #0073EA; font-weight: bold; }
|
.title { padding-top: 5px; padding-bottom: 5px; color: #0073EA; font-weight: bold; }
|
||||||
#qso_input { border: 1px solid #dddddd; margin: 5px; padding: 2px; }
|
#qso_input { border: 1px solid #dddddd; margin: 5px; padding: 2px; }
|
||||||
.input_date { width: 70px; }
|
.input_date { width: 70px; }
|
||||||
.input_time { width: 54px; }
|
.input_time { width: 32px; }
|
||||||
#locator { width: 55px; text-transform: uppercase; }
|
#locator { width: 55px; text-transform: uppercase; }
|
||||||
#country { border: none; }
|
#country { border: none; }
|
||||||
#locator_info { font-size: 13px; }
|
#locator_info { font-size: 13px; }
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ table .title { font-weight: bold; color: #439BF6; }
|
||||||
/* Add QSO CSS */
|
/* Add QSO CSS */
|
||||||
.rst { width: 50px !important; }
|
.rst { width: 50px !important; }
|
||||||
.input_date { width: 70px !important; }
|
.input_date { width: 70px !important; }
|
||||||
.input_time { width: 55px !important; }
|
.input_time { width: 32px !important; }
|
||||||
.band { width: 80px; }
|
.band { width: 80px; }
|
||||||
.mode { width: 80px; }
|
.mode { width: 80px; }
|
||||||
#callsign { text-transform: uppercase; }
|
#callsign { text-transform: uppercase; }
|
||||||
|
|
|
||||||
文件差异因一行或多行过长而隐藏
正在加载…
在新工单中引用