diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index f3706049..50a339ad 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1553,92 +1553,7 @@ $(document).ready(function(){ - + uri->segment(1) == "qsl") { ?> diff --git a/assets/js/sections/timeplot.js b/assets/js/sections/timeplot.js new file mode 100644 index 00000000..8d1f1699 --- /dev/null +++ b/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('
' + tmp.qsocount + ' contacts were plotted.
'); + 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] + + "