From 2d961d812e646d0eb47fe9d0634334d26ed842b0 Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 23 Jan 2024 08:02:12 +0000 Subject: [PATCH] Added QSO-Count for SATs (JS-Part) --- assets/js/sections/statistics.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/assets/js/sections/statistics.js b/assets/js/sections/statistics.js index d376ff342..8f0cfdca9 100644 --- a/assets/js/sections/statistics.js +++ b/assets/js/sections/statistics.js @@ -24,6 +24,12 @@ $("a[href='#qsotab']").on('shown.bs.tab', function(e) { } }); +$("a[href='#satqsostab']").on('shown.bs.tab', function(e) { + if (!($('.satqsostab').length > 0)) { + totalSatQsosC(); + } +}); + $("a[href='#uniquetab']").on('shown.bs.tab', function(e) { if (!($('.uniquetable').length > 0)) { uniqueCallsigns(); @@ -72,6 +78,18 @@ function totalQsos() { }); } +function totalSatQsosC() { + $.ajax({ + url: base_url+'index.php/statistics/get_total_sat_qsos', + type: 'post', + success: function (data) { + if (data.length > 0) { + $(".satqsos").html(data); + } + } + }); +} + function totalQsosPerYear() { // using this to change color of legend and label according to background color var color = ifDarkModeThemeReturn('white', 'grey');