Merge pull request #2406 from int2001/map_modal

Bugfix QSOList on Fullscreenmaps
This commit is contained in:
Andreas Kristiansen 2023-08-15 17:52:33 +02:00 committed by GitHub
commit 6e74dc1aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 3 deletions

View File

@ -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= "<?php echo base_url();?>";
var formdata = new FormData(document.getElementById("fileinfo"));

View File

@ -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');
}

View File

@ -155,5 +155,5 @@ function addMarker(L, D, mapColor, map) {
function onClick(e) {
var marker = e.target;
displayContacts(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2');
displayContactsOnMap($("#dxccmap"),marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2');
}

View File

@ -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');
}