From 863675e5f04cbc4be3e089eef9ec99bfb9186fb2 Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 15 Aug 2023 13:55:53 +0000 Subject: [PATCH 1/2] Show Modals on DXCCMap --- assets/js/sections/dxccmap.js | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index 8a8a9f8f..b28682e8 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -155,5 +155,54 @@ function addMarker(L, D, mapColor, map) { function onClick(e) { var marker = e.target; - displayContacts(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); + displayContactsOnMap(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); } + +function displayContactsOnMap(searchphrase, band, mode, type, qsl) { + $.ajax({ + url: base_url + 'index.php/awards/qso_details_ajax', + type: 'post', + data: { + 'Searchphrase': searchphrase, + 'Band': band, + 'Mode': mode, + 'Type': type, + 'QSL' : qsl + }, + success: function (html) { + var dialog = new BootstrapDialog({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-dialog', + nl2br: false, + message: html, + onshown: function(dialog) { + $('[data-toggle="tooltip"]').tooltip(); + $('.contacttable').DataTable({ + "pageLength": 25, + responsive: false, + ordering: false, + "scrollY": "550px", + "scrollCollapse": true, + "paging": false, + "scrollX": true, + dom: 'Bfrtip', + buttons: [ + 'csv' + ] + }); + }, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + dialog.realize(); + $("#dxccmap").append(dialog.getModal()); + dialog.open(); + } + }); +} + From 48d34287030bab0112cb4d29609fc4f01f4cb79c Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 15 Aug 2023 14:27:26 +0000 Subject: [PATCH 2/2] Fixed Bug. QSO-PopUp wasn't working in Fullscreenmode --- application/views/interface_assets/footer.php | 47 +++++++++++++++++ assets/js/sections/cqmap.js | 2 +- assets/js/sections/dxccmap.js | 51 +------------------ assets/js/sections/iotamap.js | 2 +- 4 files changed, 50 insertions(+), 52 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 4c04751b..bd98aed7 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2366,6 +2366,53 @@ function viewEqsl(picture, callsign) { }); } + function displayContactsOnMap(target, searchphrase, band, mode, type, qsl) { + $.ajax({ + url: base_url + 'index.php/awards/qso_details_ajax', + type: 'post', + data: { + 'Searchphrase': searchphrase, + 'Band': band, + 'Mode': mode, + 'Type': type, + 'QSL' : qsl + }, + success: function (html) { + var dialog = new BootstrapDialog({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-dialog', + nl2br: false, + message: html, + onshown: function(dialog) { + $('[data-toggle="tooltip"]').tooltip(); + $('.contacttable').DataTable({ + "pageLength": 25, + responsive: false, + ordering: false, + "scrollY": "550px", + "scrollCollapse": true, + "paging": false, + "scrollX": true, + dom: 'Bfrtip', + buttons: [ + 'csv' + ] + }); + }, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + dialog.realize(); + target.append(dialog.getModal()); + dialog.open(); + } + }); + } function uploadQsl() { var baseURL= ""; var formdata = new FormData(document.getElementById("fileinfo")); diff --git a/assets/js/sections/cqmap.js b/assets/js/sections/cqmap.js index 1e688830..dba3eed4 100644 --- a/assets/js/sections/cqmap.js +++ b/assets/js/sections/cqmap.js @@ -190,5 +190,5 @@ function load_cq_map2(data) { function onClick(e) { var marker = e.target; - displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'CQZone'); + displayContactsOnMap($("#cqmap"),marker.options.title, $('#band2').val(), $('#mode').val(), 'CQZone'); } diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index b28682e8..73bde64e 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -155,54 +155,5 @@ function addMarker(L, D, mapColor, map) { function onClick(e) { var marker = e.target; - displayContactsOnMap(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); + displayContactsOnMap($("#dxccmap"),marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); } - -function displayContactsOnMap(searchphrase, band, mode, type, qsl) { - $.ajax({ - url: base_url + 'index.php/awards/qso_details_ajax', - type: 'post', - data: { - 'Searchphrase': searchphrase, - 'Band': band, - 'Mode': mode, - 'Type': type, - 'QSL' : qsl - }, - success: function (html) { - var dialog = new BootstrapDialog({ - title: 'QSO Data', - size: BootstrapDialog.SIZE_WIDE, - cssClass: 'qso-dialog', - nl2br: false, - message: html, - onshown: function(dialog) { - $('[data-toggle="tooltip"]').tooltip(); - $('.contacttable').DataTable({ - "pageLength": 25, - responsive: false, - ordering: false, - "scrollY": "550px", - "scrollCollapse": true, - "paging": false, - "scrollX": true, - dom: 'Bfrtip', - buttons: [ - 'csv' - ] - }); - }, - buttons: [{ - label: 'Close', - action: function (dialogItself) { - dialogItself.close(); - } - }] - }); - dialog.realize(); - $("#dxccmap").append(dialog.getModal()); - dialog.open(); - } - }); -} - diff --git a/assets/js/sections/iotamap.js b/assets/js/sections/iotamap.js index 5c579387..9df3a054 100644 --- a/assets/js/sections/iotamap.js +++ b/assets/js/sections/iotamap.js @@ -169,5 +169,5 @@ function addMarker(L, D, mapColor, map) { function onClick(e) { var marker = e.target; - displayContacts(marker.options.iota, $('#band2').val(), $('#mode').val(), 'IOTA'); + displayContactsOnMap($("#iotamap"), marker.options.iota,$('#band2').val(), $('#mode').val(), 'IOTA'); }