当前提交
86fdeaca45
共有 4 个文件被更改,包括 287 次插入 和 306 次删除
|
|
@ -1540,110 +1540,7 @@ $(document).ready(function(){
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($this->uri->segment(1) == "mode") { ?>
|
<?php if ($this->uri->segment(1) == "mode") { ?>
|
||||||
<script>
|
<script src="<?php echo base_url(); ?>assets/js/sections/mode.js"></script>
|
||||||
$('.modetable').DataTable({
|
|
||||||
"pageLength": 25,
|
|
||||||
responsive: false,
|
|
||||||
ordering: false,
|
|
||||||
"scrollY": "500px",
|
|
||||||
"scrollCollapse": true,
|
|
||||||
"paging": false,
|
|
||||||
"scrollX": true
|
|
||||||
});
|
|
||||||
|
|
||||||
function createModeDialog() {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/mode/create',
|
|
||||||
type: 'post',
|
|
||||||
success: function(html) {
|
|
||||||
BootstrapDialog.show({
|
|
||||||
title: 'Create mode',
|
|
||||||
size: BootstrapDialog.SIZE_WIDE,
|
|
||||||
cssClass: 'create-mode-dialog',
|
|
||||||
nl2br: false,
|
|
||||||
message: html,
|
|
||||||
buttons: [{
|
|
||||||
label: 'Close',
|
|
||||||
action: function (dialogItself) {
|
|
||||||
dialogItself.close();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createMode(form) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
if (form.mode.value != '') {
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/mode/create',
|
|
||||||
type: 'post',
|
|
||||||
data: {'mode': form.mode.value,
|
|
||||||
'submode': form.submode.value,
|
|
||||||
'qrgmode': form.qrgmode.value,
|
|
||||||
'active': form.active.value},
|
|
||||||
success: function(html) {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function deactivateMode(modeid) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/mode/deactivate',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': modeid },
|
|
||||||
success: function(html) {
|
|
||||||
$(".mode_" + modeid).text('not active');
|
|
||||||
$('.btn_'+modeid).html('Activate');
|
|
||||||
$('.btn_'+modeid).attr('onclick', 'activateMode('+modeid+')')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function activateMode(modeid) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/mode/activate',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': modeid },
|
|
||||||
success: function(html) {
|
|
||||||
$('.mode_'+modeid).text('active');
|
|
||||||
$('.btn_'+modeid).html('Deactivate');
|
|
||||||
$('.btn_'+modeid).attr('onclick', 'deactivateMode('+modeid+')')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteMode(id, mode) {
|
|
||||||
BootstrapDialog.confirm({
|
|
||||||
title: 'DANGER',
|
|
||||||
message: 'Warning! Are you sure you want to delete the following mode: ' + mode + '?' ,
|
|
||||||
type: BootstrapDialog.TYPE_DANGER,
|
|
||||||
closable: true,
|
|
||||||
draggable: true,
|
|
||||||
btnOKClass: 'btn-danger',
|
|
||||||
callback: function(result) {
|
|
||||||
if(result) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/mode/delete',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': id
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
$(".mode_" + id).parent("tr:first").remove(); // removes mode from table
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($this->uri->segment(1) == "accumulated") { ?>
|
<?php if ($this->uri->segment(1) == "accumulated") { ?>
|
||||||
|
|
@ -1656,92 +1553,7 @@ $(document).ready(function(){
|
||||||
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
|
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
|
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
|
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
|
||||||
<script>
|
<script src="<?php echo base_url(); ?>assets/js/sections/timeplot.js"></script>
|
||||||
|
|
||||||
function timeplot(form) {
|
|
||||||
$(".ld-ext-right").addClass('running');
|
|
||||||
$(".ld-ext-right").prop('disabled', true);
|
|
||||||
$(".alert").remove();
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL+'index.php/timeplotter/getTimes',
|
|
||||||
type: 'post',
|
|
||||||
data: {'band': form.band.value, 'dxcc': form.dxcc.value, 'cqzone': form.cqzone.value},
|
|
||||||
success: function(tmp) {
|
|
||||||
$(".ld-ext-right").removeClass('running');
|
|
||||||
$(".ld-ext-right").prop('disabled', false);
|
|
||||||
if (tmp.ok == 'OK') {
|
|
||||||
plotTimeplotterChart(tmp);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#container").remove();
|
|
||||||
$("#info").remove();
|
|
||||||
$("#timeplotter_div").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>\n' +
|
|
||||||
tmp.error +
|
|
||||||
'</div>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function plotTimeplotterChart(tmp) {
|
|
||||||
$("#container").remove();
|
|
||||||
$("#info").remove();
|
|
||||||
$("#timeplotter_div").append('<p id="info">' + tmp.qsocount + ' contacts were plotted.</p><div id="container" style="height: 600px;"></div>');
|
|
||||||
var options = {
|
|
||||||
chart: {
|
|
||||||
type: 'column',
|
|
||||||
zoomType: 'xy',
|
|
||||||
renderTo: 'container'
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
text: 'Time Distribution'
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
categories: [],
|
|
||||||
crosshair: true,
|
|
||||||
type: "category",
|
|
||||||
min:0,
|
|
||||||
max:47,
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
title: {
|
|
||||||
text: '# QSOs'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rangeSelector: {
|
|
||||||
selected: 1
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
formatter: function () {
|
|
||||||
if(this.point) {
|
|
||||||
return "Time: " + options.xAxis.categories[this.point.x] +
|
|
||||||
"<br />Callsign(s) worked (max 5): " + myComments[this.point.x] +
|
|
||||||
"<br />Number of QSOs: <strong>" + series.data[this.point.x] + "</strong>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
series: []
|
|
||||||
};
|
|
||||||
var myComments=[];
|
|
||||||
|
|
||||||
var series = {
|
|
||||||
data: []
|
|
||||||
};
|
|
||||||
|
|
||||||
$.each(tmp.qsodata, function(){
|
|
||||||
myComments.push(this.calls);
|
|
||||||
options.xAxis.categories.push(this.time);
|
|
||||||
series.name = 'Number of QSOs';
|
|
||||||
series.data.push(this.count);
|
|
||||||
});
|
|
||||||
|
|
||||||
options.series.push(series);
|
|
||||||
|
|
||||||
var chart = new Highcharts.Chart(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($this->uri->segment(1) == "qsl") { ?>
|
<?php if ($this->uri->segment(1) == "qsl") { ?>
|
||||||
|
|
@ -2173,122 +1985,7 @@ function deleteQsl(id) {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) == "add") { ?>
|
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) == "add") { ?>
|
||||||
<script>
|
<script src="<?php echo base_url() ;?>assets/js/sections/contestingnames.js"></script>
|
||||||
|
|
||||||
$('.contesttable').DataTable({
|
|
||||||
"pageLength": 25,
|
|
||||||
responsive: false,
|
|
||||||
ordering: false,
|
|
||||||
"scrollY": "400px",
|
|
||||||
"scrollCollapse": true,
|
|
||||||
"paging": false,
|
|
||||||
"scrollX": true,
|
|
||||||
dom: 'Bfrtip',
|
|
||||||
buttons: [
|
|
||||||
'csv'
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
// using this to change color of csv-button if dark mode is chosen
|
|
||||||
var background = $('body').css( "background-color");
|
|
||||||
|
|
||||||
if (background != ('rgb(255, 255, 255)')) {
|
|
||||||
$(".buttons-csv").css("color", "white");
|
|
||||||
}
|
|
||||||
|
|
||||||
function createContestDialog() {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/contesting/create',
|
|
||||||
type: 'post',
|
|
||||||
success: function(html) {
|
|
||||||
BootstrapDialog.show({
|
|
||||||
title: 'Add Contest',
|
|
||||||
size: BootstrapDialog.SIZE_WIDE,
|
|
||||||
cssClass: 'create-contest-dialog',
|
|
||||||
nl2br: false,
|
|
||||||
message: html,
|
|
||||||
buttons: [{
|
|
||||||
label: 'Close',
|
|
||||||
action: function (dialogItself) {
|
|
||||||
dialogItself.close();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createContest(form) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
if (form.contestname.value != '') {
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/contesting/create',
|
|
||||||
type: 'post',
|
|
||||||
data: {'name': form.contestname.value,
|
|
||||||
'adifname': form.adifcontestname.value},
|
|
||||||
success: function(html) {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function deactivateContest(contestid) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/contesting/deactivate',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': contestid },
|
|
||||||
success: function(html) {
|
|
||||||
$(".contest_" + contestid).text('not active');
|
|
||||||
$('.btn_'+contestid).html('Activate');
|
|
||||||
$('.btn_'+contestid).attr('onclick', 'activateContest('+contestid+')')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function activateContest(contestid) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/contesting/activate',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': contestid },
|
|
||||||
success: function(html) {
|
|
||||||
$('.contest_'+contestid).text('active');
|
|
||||||
$('.btn_'+contestid).html('Deactivate');
|
|
||||||
$('.btn_'+contestid).attr('onclick', 'deactivateContest('+contestid+')')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteContest(id, contest) {
|
|
||||||
BootstrapDialog.confirm({
|
|
||||||
title: 'DANGER',
|
|
||||||
message: 'Warning! Are you sure you want to delete the following contest: ' + contest + '?' ,
|
|
||||||
type: BootstrapDialog.TYPE_DANGER,
|
|
||||||
closable: true,
|
|
||||||
draggable: true,
|
|
||||||
btnOKClass: 'btn-danger',
|
|
||||||
callback: function(result) {
|
|
||||||
if(result) {
|
|
||||||
var baseURL= "<?php echo base_url();?>";
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + 'index.php/contesting/delete',
|
|
||||||
type: 'post',
|
|
||||||
data: {'id': id
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
$(".contest_" + id).parent("tr:first").remove(); // removes mode from table
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
$('.contesttable').DataTable({
|
||||||
|
"pageLength": 25,
|
||||||
|
responsive: false,
|
||||||
|
ordering: false,
|
||||||
|
"scrollY": "400px",
|
||||||
|
"scrollCollapse": true,
|
||||||
|
"paging": false,
|
||||||
|
"scrollX": true,
|
||||||
|
dom: 'Bfrtip',
|
||||||
|
buttons: [
|
||||||
|
'csv'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// using this to change color of csv-button if dark mode is chosen
|
||||||
|
var background = $('body').css( "background-color");
|
||||||
|
|
||||||
|
if (background != ('rgb(255, 255, 255)')) {
|
||||||
|
$(".buttons-csv").css("color", "white");
|
||||||
|
}
|
||||||
|
|
||||||
|
function createContestDialog() {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/contesting/create',
|
||||||
|
type: 'post',
|
||||||
|
success: function(html) {
|
||||||
|
BootstrapDialog.show({
|
||||||
|
title: 'Add Contest',
|
||||||
|
size: BootstrapDialog.SIZE_WIDE,
|
||||||
|
cssClass: 'create-contest-dialog',
|
||||||
|
nl2br: false,
|
||||||
|
message: html,
|
||||||
|
buttons: [{
|
||||||
|
label: 'Close',
|
||||||
|
action: function (dialogItself) {
|
||||||
|
dialogItself.close();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createContest(form) {
|
||||||
|
if (form.contestname.value != '') {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/contesting/create',
|
||||||
|
type: 'post',
|
||||||
|
data: {'name': form.contestname.value,
|
||||||
|
'adifname': form.adifcontestname.value},
|
||||||
|
success: function(html) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivateContest(contestid) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/contesting/deactivate',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': contestid },
|
||||||
|
success: function(html) {
|
||||||
|
$(".contest_" + contestid).text('not active');
|
||||||
|
$('.btn_'+contestid).html('Activate');
|
||||||
|
$('.btn_'+contestid).attr('onclick', 'activateContest('+contestid+')')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateContest(contestid) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/contesting/activate',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': contestid },
|
||||||
|
success: function(html) {
|
||||||
|
$('.contest_'+contestid).text('active');
|
||||||
|
$('.btn_'+contestid).html('Deactivate');
|
||||||
|
$('.btn_'+contestid).attr('onclick', 'deactivateContest('+contestid+')')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteContest(id, contest) {
|
||||||
|
BootstrapDialog.confirm({
|
||||||
|
title: 'DANGER',
|
||||||
|
message: 'Warning! Are you sure you want to delete the following contest: ' + contest + '?' ,
|
||||||
|
type: BootstrapDialog.TYPE_DANGER,
|
||||||
|
closable: true,
|
||||||
|
draggable: true,
|
||||||
|
btnOKClass: 'btn-danger',
|
||||||
|
callback: function(result) {
|
||||||
|
if(result) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/contesting/delete',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': id
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
$(".contest_" + id).parent("tr:first").remove(); // removes mode from table
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
97
assets/js/sections/mode.js
普通文件
97
assets/js/sections/mode.js
普通文件
|
|
@ -0,0 +1,97 @@
|
||||||
|
$('.modetable').DataTable({
|
||||||
|
"pageLength": 25,
|
||||||
|
responsive: false,
|
||||||
|
ordering: false,
|
||||||
|
"scrollY": "500px",
|
||||||
|
"scrollCollapse": true,
|
||||||
|
"paging": false,
|
||||||
|
"scrollX": true
|
||||||
|
});
|
||||||
|
|
||||||
|
function createModeDialog() {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/mode/create',
|
||||||
|
type: 'post',
|
||||||
|
success: function(html) {
|
||||||
|
BootstrapDialog.show({
|
||||||
|
title: 'Create mode',
|
||||||
|
size: BootstrapDialog.SIZE_WIDE,
|
||||||
|
cssClass: 'create-mode-dialog',
|
||||||
|
nl2br: false,
|
||||||
|
message: html,
|
||||||
|
buttons: [{
|
||||||
|
label: 'Close',
|
||||||
|
action: function (dialogItself) {
|
||||||
|
dialogItself.close();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createMode(form) {
|
||||||
|
if (form.mode.value != '') {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/mode/create',
|
||||||
|
type: 'post',
|
||||||
|
data: {'mode': form.mode.value,
|
||||||
|
'submode': form.submode.value,
|
||||||
|
'qrgmode': form.qrgmode.value,
|
||||||
|
'active': form.active.value},
|
||||||
|
success: function(html) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivateMode(modeid) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/mode/deactivate',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': modeid },
|
||||||
|
success: function(html) {
|
||||||
|
$(".mode_" + modeid).text('not active');
|
||||||
|
$('.btn_'+modeid).html('Activate');
|
||||||
|
$('.btn_'+modeid).attr('onclick', 'activateMode('+modeid+')')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateMode(modeid) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/mode/activate',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': modeid },
|
||||||
|
success: function(html) {
|
||||||
|
$('.mode_'+modeid).text('active');
|
||||||
|
$('.btn_'+modeid).html('Deactivate');
|
||||||
|
$('.btn_'+modeid).attr('onclick', 'deactivateMode('+modeid+')')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteMode(id, mode) {
|
||||||
|
BootstrapDialog.confirm({
|
||||||
|
title: 'DANGER',
|
||||||
|
message: 'Warning! Are you sure you want to delete the following mode: ' + mode + '?' ,
|
||||||
|
type: BootstrapDialog.TYPE_DANGER,
|
||||||
|
closable: true,
|
||||||
|
draggable: true,
|
||||||
|
btnOKClass: 'btn-danger',
|
||||||
|
callback: function(result) {
|
||||||
|
if(result) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/mode/delete',
|
||||||
|
type: 'post',
|
||||||
|
data: {'id': id
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
$(".mode_" + id).parent("tr:first").remove(); // removes mode from table
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
81
assets/js/sections/timeplot.js
普通文件
81
assets/js/sections/timeplot.js
普通文件
|
|
@ -0,0 +1,81 @@
|
||||||
|
function timeplot(form) {
|
||||||
|
$(".ld-ext-right").addClass('running');
|
||||||
|
$(".ld-ext-right").prop('disabled', true);
|
||||||
|
$(".alert").remove();
|
||||||
|
$.ajax({
|
||||||
|
url: base_url+'index.php/timeplotter/getTimes',
|
||||||
|
type: 'post',
|
||||||
|
data: {'band': form.band.value, 'dxcc': form.dxcc.value, 'cqzone': form.cqzone.value},
|
||||||
|
success: function(tmp) {
|
||||||
|
$(".ld-ext-right").removeClass('running');
|
||||||
|
$(".ld-ext-right").prop('disabled', false);
|
||||||
|
if (tmp.ok == 'OK') {
|
||||||
|
plotTimeplotterChart(tmp);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#container").remove();
|
||||||
|
$("#info").remove();
|
||||||
|
$("#timeplotter_div").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>\n' +
|
||||||
|
tmp.error +
|
||||||
|
'</div>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function plotTimeplotterChart(tmp) {
|
||||||
|
$("#container").remove();
|
||||||
|
$("#info").remove();
|
||||||
|
$("#timeplotter_div").append('<p id="info">' + tmp.qsocount + ' contacts were plotted.</p><div id="container" style="height: 600px;"></div>');
|
||||||
|
var options = {
|
||||||
|
chart: {
|
||||||
|
type: 'column',
|
||||||
|
zoomType: 'xy',
|
||||||
|
renderTo: 'container'
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: 'Time Distribution'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
categories: [],
|
||||||
|
crosshair: true,
|
||||||
|
type: "category",
|
||||||
|
min:0,
|
||||||
|
max:47,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: {
|
||||||
|
text: '# QSOs'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rangeSelector: {
|
||||||
|
selected: 1
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
formatter: function () {
|
||||||
|
if(this.point) {
|
||||||
|
return "Time: " + options.xAxis.categories[this.point.x] +
|
||||||
|
"<br />Callsign(s) worked (max 5): " + myComments[this.point.x] +
|
||||||
|
"<br />Number of QSOs: <strong>" + series.data[this.point.x] + "</strong>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: []
|
||||||
|
};
|
||||||
|
var myComments=[];
|
||||||
|
|
||||||
|
var series = {
|
||||||
|
data: []
|
||||||
|
};
|
||||||
|
|
||||||
|
$.each(tmp.qsodata, function(){
|
||||||
|
myComments.push(this.calls);
|
||||||
|
options.xAxis.categories.push(this.time);
|
||||||
|
series.name = 'Number of QSOs';
|
||||||
|
series.data.push(this.count);
|
||||||
|
});
|
||||||
|
|
||||||
|
options.series.push(series);
|
||||||
|
|
||||||
|
var chart = new Highcharts.Chart(options);
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用