From 2d835654dc0c59e12620dd0168adf477e7d567ac Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 19 Aug 2021 09:36:56 +0200 Subject: [PATCH 1/2] [Gridsquare Map popup] Changed so that we use the logbook view in the popup. This way, we can see the confirmed status on the QSOs, and we can also add them to the print queue if wanted. --- application/views/interface_assets/footer.php | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index bb931dd0..e79dd9aa 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -810,45 +810,42 @@ $(document).ready(function(){ console.log(map.getZoom()); if(map.getZoom() > 2) { + var band = ''; var search_type = "uri->segment(2); ?>"; if(search_type == "satellites") { - console.log("satellites search"); - var search_tags = "search_sat/" + loc_4char; + band = 'SAT'; } else { - var band = "uri->segment(3); ?>"; - console.log(band); - var search_tags = "search_band/" + band + "/" + loc_4char; + band = "uri->segment(3); ?>"; } + $(".modal-body").empty(); + $.ajax({ + url: base_url + 'index.php/awards/qso_details_ajax', + type: 'post', + data: { + 'Searchphrase': loc_4char, + 'Band': band, + 'Mode': 'All', + 'Type': 'VUCC' + }, + success: function (html) { + $(".modal-body").html(html); + $(".modal-body table").addClass('table-sm'); + $(".modal-body h5").empty(); + var count = $('.table tr').length; + count = count - 1; + $('#qso_count').text(count); + if (count > 1) { + $('#gt1_qso').text("s"); + } else { + $('#gt1_qso').text(""); + } - $.getJSON( "" + search_tags, function( data ) { - var count = Object.keys(data).length; - console.log("Count: " + count); - var items = []; - $.each( data, function( i, item ) { - console.log(item.COL_CALL + item.COL_SAT_NAME); - if(item.COL_SAT_NAME != undefined) { - items.push( "" + item.COL_TIME_ON + "" + item.COL_CALL + "" + item.COL_MODE + "" + item.COL_SAT_NAME + "" + item.COL_GRIDSQUARE + item.COL_VUCC_GRIDS + "" ); - } else { - items.push( "" + item.COL_TIME_ON + "" + item.COL_CALL + "" + item.COL_MODE + "" + item.COL_BAND + "" + item.COL_GRIDSQUARE + item.COL_VUCC_GRIDS + "" ); - } - }); - - $('#qso_count').text(count); - if (count > 1) { - $('#gt1_qso').text("s"); - } else { - $('#gt1_qso').text(""); - } - - $("#grid_results tbody").empty(); - if (count > 0) { - $("#grid_results tbody").append(items.join( "" )); - - $('#square_number').text(loc_4char); - $('#exampleModal').modal('show'); - } - - }); + if (count > 0) { + $('#square_number').text(loc_4char); + $('#exampleModal').modal('show'); + } + } + }); } }; From 7a6c2c2141622f89d717de4d9a132e0c49a54df8 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 19 Aug 2021 18:16:32 +0200 Subject: [PATCH 2/2] [Gridsquare Map popup] Only let popup work if logged. --- application/views/interface_assets/footer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index e79dd9aa..6e4a16a6 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -810,6 +810,7 @@ $(document).ready(function(){ console.log(map.getZoom()); if(map.getZoom() > 2) { + session->userdata('user_callsign')) { ?> var band = ''; var search_type = "uri->segment(2); ?>"; if(search_type == "satellites") { @@ -846,6 +847,7 @@ $(document).ready(function(){ } } }); + } };