Cloudlog/application/views/interface_assets/footer.php

3707 行
141 KiB
PHP

2023-01-26 01:43:47 +08:00
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
/*
*
* Define global javascript variables
*
*/
var base_url = "<?php echo base_url(); ?>"; // Base URL
var site_url = "<?php echo site_url(); ?>"; // Site URL
var icon_dot_url = "<?php echo base_url(); ?>assets/images/dot.png";
// get the user_callsign from session
var my_call = "<?php echo $this->session->userdata('user_callsign'); ?>".toUpperCase();
2023-01-26 01:43:47 +08:00
</script>
2023-10-08 16:41:24 +08:00
<script>
2023-11-30 03:16:53 +08:00
/*
2023-10-08 16:41:24 +08:00
General Language
*/
var lang_general_word_qso_data = "<?php echo lang('general_word_qso_data'); ?>";
2023-10-18 17:45:15 +08:00
var lang_general_word_danger = "<?php echo lang('general_word_danger'); ?>";
2023-10-31 06:50:56 +08:00
var lang_general_word_attention = "<?php echo lang('general_word_attention'); ?>";
var lang_general_word_warning = "<?php echo lang('general_word_warning'); ?>";
var lang_general_word_cancel = "<?php echo lang('general_word_cancel'); ?>";
var lang_general_word_ok = "<?php echo lang('general_word_ok'); ?>";
2023-10-18 17:45:15 +08:00
var lang_qso_delete_warning = "<?php echo lang('qso_delete_warning'); ?>";
2023-10-24 23:42:53 +08:00
var lang_general_word_colors = "<?php echo lang('general_word_colors'); ?>";
var lang_general_word_confirmed = "<?php echo lang('general_word_confirmed'); ?>";
var lang_general_word_worked_not_confirmed = "<?php echo lang('general_word_worked_not_confirmed'); ?>";
var lang_general_word_not_worked = "<?php echo lang('general_word_not_worked'); ?>";
2023-11-06 02:31:43 +08:00
var lang_admin_close = "<?php echo lang('admin_close'); ?>";
2023-10-08 16:41:24 +08:00
</script>
<!-- General JS Files used across Cloudlog -->
<script src="<?php echo base_url(); ?>assets/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/jquery.fancybox.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leaflet.js"></script>
2023-03-18 21:16:59 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/Control.FullScreen.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.qrb.js"></script>
2022-06-12 19:18:26 +08:00
<?php if ($this->uri->segment(1) == "activators") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.activators.js"></script>
2022-06-12 19:18:26 +08:00
<?php } ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leaflet.geodesic.js"></script>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/radiohelpers.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/darkmodehelpers.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrapdialog/js/bootstrap-dialog.min.js"></script>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/easyprint.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/common.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/eqslcharcounter.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/version_dialog.js"></script>
<script src="<?php echo base_url(); ?>assets/js/htmx.min.js"></script>
<script>
// Reinitialize tooltips after new content has been loaded
document.addEventListener('htmx:afterSwap', function(event) {
2023-11-14 20:35:53 +08:00
$('[data-bs-toggle="tooltip"]').tooltip();
});
2024-02-23 00:56:21 +08:00
</script>
2023-12-03 16:37:39 +08:00
<!-- Version Dialog START -->
2023-12-04 08:20:50 +08:00
2023-12-03 16:37:39 +08:00
<?php
2024-02-23 00:56:21 +08:00
if ($this->session->userdata('user_id') != null) {
2023-12-04 12:56:05 +08:00
$versionDialog = $this->optionslib->get_option('version_dialog');
2023-12-05 06:03:25 +08:00
if (empty($versionDialog)) {
$this->optionslib->update('version_dialog', 'release_notes', 'yes');
}
2023-12-05 03:44:26 +08:00
$versionDialogHeader = $this->optionslib->get_option('version_dialog_header');
if (empty($versionDialogHeader)) {
$this->optionslib->update('version_dialog_header', $this->lang->line('options_version_dialog'), 'yes');
}
2024-02-23 00:56:21 +08:00
if ($versionDialog != "disabled") {
$confirmed = $this->user_options_model->get_options('version_dialog', array('option_name' => 'confirmed'))->result();
$confirmation_value = (isset($confirmed[0]->option_value)) ? $confirmed[0]->option_value : 'false';
2023-12-04 12:56:05 +08:00
if ($confirmation_value != 'true') {
$this->user_options_model->set_option('version_dialog', 'confirmed', array('boolean' => $confirmation_value));
2024-02-23 00:56:21 +08:00
?><script>
2023-12-04 12:56:05 +08:00
displayVersionDialog();
</script><?php
2024-02-23 00:56:21 +08:00
}
}
}
?>
2023-12-03 16:37:39 +08:00
<!-- Version Dialog END -->
2022-11-16 01:29:33 +08:00
<?php if ($this->uri->segment(1) == "oqrs") { ?>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/oqrs.js"></script>
2022-11-16 01:29:33 +08:00
<?php } ?>
2023-11-21 19:13:09 +08:00
<?php if ($this->uri->segment(1) == "options") { ?>
<script>
$('#sendTestMailButton').click(function() {
$.ajax({
url: base_url + 'index.php/options/sendTestMail',
type: 'POST',
});
});
</script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "cq")) { ?>
2022-10-12 15:44:13 +08:00
<script src="<?php echo base_url(); ?>assets/js/Polyline.encoded.js"></script>
2024-02-23 00:56:21 +08:00
<script id="cqmapjs" type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/cqmap.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"></script>
2022-10-12 15:44:13 +08:00
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "iota")) { ?>
<script id="iotamapjs" type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/iotamap.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"></script>
2022-12-12 00:47:36 +08:00
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "dxcc")) { ?>
<script id="dxccmapjs" type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/dxccmap.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"></script>
2022-11-12 02:23:41 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "statistics") { ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chart.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chartjs-plugin-piechart-outlabels.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/statistics.js"></script>
<?php } ?>
2023-02-09 08:05:36 +08:00
<?php if ($this->uri->segment(1) == "continents") { ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chart.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chartjs-plugin-piechart-outlabels.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/continents.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "adif" || $this->uri->segment(1) == "qrz" || $this->uri->segment(1) == "hrdlog" || $this->uri->segment(1) == "webadif" || $this->uri->segment(1) == "sattimers") { ?>
<!-- Javascript used for ADIF Import and Export Areas -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "maintenance") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/maintenance.js"></script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "adif") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/adif.js"></script>
2023-11-20 00:04:19 +08:00
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "notes" && ($this->uri->segment(2) == "add" || $this->uri->segment(2) == "edit")) { ?>
<!-- Javascript used for Notes Area -->
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/plugins/quill/quill.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/sections/notes.js"></script>
<?php } ?>
2022-10-16 02:50:20 +08:00
<?php if ($this->uri->segment(1) == "logbooks" && $this->uri->segment(2) == "edit") { ?>
2024-02-23 00:56:21 +08:00
<script>
function removeSlug() {
var slugLink = document.getElementById("slugLink");
if (slugLink !== null) {
slugLink.style.display = "none";
}
document.getElementById('publicSlugInput').value = ''
2022-10-16 02:50:20 +08:00
}
2024-02-23 00:56:21 +08:00
</script>
2022-10-16 02:50:20 +08:00
<?php } ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datatables.min.js"></script>
2020-10-19 20:10:58 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/buttons.html5.min.js"></script>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/selectize.js"></script>
<?php if ($this->uri->segment(1) == "station") { ?>
2024-02-23 00:56:21 +08:00
<script language="javascript" src="<?php echo base_url(); ?>assets/js/HamGridSquare.js"></script>
<script src="<?php echo base_url(); ?>assets/js/sections/station_locations.js"></script>
<script>
var position;
2024-02-23 00:56:21 +08:00
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
2022-04-14 22:48:09 +08:00
console.log('Geolocation is not supported by this browser.');
}
}
function showPosition(position) {
2024-02-23 00:56:21 +08:00
gridsquare = latLonToGridSquare(position.coords.latitude, position.coords.longitude);
2022-04-14 22:49:02 +08:00
document.getElementById("stationGridsquareInput").value = gridsquare;
2024-02-23 00:56:21 +08:00
}
</script>
2022-01-20 22:50:42 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "logbooks") { ?>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/station_logbooks.js"></script>
<?php } ?>
2023-01-31 20:00:23 +08:00
<?php if ($this->uri->segment(1) == "debug") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript">
function copyURL(url) {
var urlField = $('#baseUrl');
navigator.clipboard.writeText(url).then(function() {});
urlField.addClass('flash-copy')
.delay('1000').queue(function() {
urlField.removeClass('flash-copy').dequeue();
});
}
2023-01-31 20:00:23 +08:00
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip({
'delay': {
show: 500,
hide: 0
},
'placement': 'right'
});
});
</script>
2023-01-31 20:00:23 +08:00
<?php } ?>
2022-09-28 21:41:08 +08:00
<?php if ($this->uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript">
function copyApiKey(apiKey) {
var apiKeyField = $('#' + apiKey);
navigator.clipboard.writeText(apiKey).then(function() {});
apiKeyField.addClass('flash-copy')
.delay('1000').queue(function() {
apiKeyField.removeClass('flash-copy').dequeue();
});
}
2022-09-28 21:41:08 +08:00
2024-02-23 00:56:21 +08:00
function copyApiUrl() {
var apiUrlField = $('#apiUrl');
navigator.clipboard.writeText("<?php echo base_url(); ?>").then(function() {});
apiUrlField.addClass('flash-copy')
.delay('1000').queue(function() {
apiUrlField.removeClass('flash-copy').dequeue();
});
}
2023-03-10 05:57:28 +08:00
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip({
'delay': {
show: 500,
hide: 0
},
'placement': 'right'
});
});
</script>
2022-09-28 21:41:08 +08:00
<?php } ?>
2022-01-20 22:50:42 +08:00
<?php if ($this->uri->segment(1) == "search" && $this->uri->segment(2) == "filter") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/query-builder.standalone.min.js"></script>
2024-02-23 00:56:21 +08:00
<script type="text/javascript">
$(".search-results-box").hide();
$('#builder').queryBuilder({
filters: [
<?php foreach ($get_table_names->result() as $row) {
$value_name = str_replace("COL_", "", $row->Field);
if ($value_name != "PRIMARY_KEY" && strpos($value_name, 'MY_') === false && strpos($value_name, '_INTL') == false) { ?> {
id: '<?php echo $row->Field; ?>',
label: '<?php echo $value_name; ?>',
<?php if (strpos($row->Type, 'int(') !== false) { ?>
type: 'integer',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif (strpos($row->Type, 'double') !== false) { ?>
type: 'double',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif (strpos($row->Type, 'datetime') !== false) { ?>
type: 'datetime',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } else { ?>
type: 'string',
operators: ['equal', 'not_equal', 'begins_with', 'contains', 'ends_with', 'is_empty', 'is_not_empty', 'is_null', 'is_not_null']
<?php } ?>
},
<?php } ?>
<?php } ?>
2024-02-23 00:56:21 +08:00
]
});
2024-02-23 00:56:21 +08:00
function export_search_result() {
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
var a;
if (xhttp.readyState === 4 && xhttp.status === 200) {
// Trick for making downloadable link
a = document.createElement('a');
a.href = window.URL.createObjectURL(xhttp.response);
// Give filename you wish to download
a.download = "advanced_search_export.adi";
a.style.display = 'none';
document.body.appendChild(a);
a.click();
}
};
// Post data to URL which handles post request
xhttp.open("POST", "<?php echo site_url('search/export_to_adif'); ?>", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You should set responseType as blob for binary responses
xhttp.responseType = 'blob';
xhttp.send("search=" + JSON.stringify(result, null, 2));
}
}
function export_stored_query(id) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
var a;
if (xhttp.readyState === 4 && xhttp.status === 200) {
// Trick for making downloadable link
a = document.createElement('a');
a.href = window.URL.createObjectURL(xhttp.response);
// Give filename you wish to download
a.download = "advanced_search_export.adi";
a.style.display = 'none';
document.body.appendChild(a);
a.click();
}
};
// Post data to URL which handles post request
2024-02-23 00:56:21 +08:00
xhttp.open("POST", "<?php echo site_url('search/export_stored_query_to_adif'); ?>", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You should set responseType as blob for binary responses
xhttp.responseType = 'blob';
2024-02-23 00:56:21 +08:00
xhttp.send("id=" + id);
}
2024-02-23 00:56:21 +08:00
$('#btn-save').on('click', function() {
var resultquery = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(resultquery)) {
let message = 'Description: <input class="form-control input-group-sm getqueryname">'
2024-02-23 00:56:21 +08:00
BootstrapDialog.confirm({
title: 'Query description',
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'description-dialog',
closable: true,
nl2br: false,
message: message,
btnCancelLabel: 'Cancel',
btnOKLabel: 'Save',
callback: function(result) {
if (result) {
$.post("<?php echo site_url('search/save_query'); ?>", {
search: JSON.stringify(resultquery, null, 2),
description: $(".getqueryname").val()
})
.done(function(data) {
$(".alert").remove();
$(".card-body.main").append('<div class="alert alert-success">Your query has been saved!</div>');
if ($("#querydropdown option").length == 0) {
var dropdowninfo = ' <button class="btn btn-sm btn-primary" onclick="edit_stored_query_dialog()" id="btn-edit">Edit queries</button></p>' +
'<div class="mb-3 row querydropdownform">' +
'<label class="col-md-2 control-label" for="querydropdown"> Stored queries:</label>' +
'<div class="col-md-3">' +
2023-11-14 20:35:53 +08:00
'<select id="querydropdown" name="querydropdown" class="form-select form-select-sm">' +
'</select>' +
2024-02-23 00:56:21 +08:00
'</div>' +
'<button class="btn btn-sm btn-primary ld-ext-right runbutton" onclick="run_query()">Run Query<div class="ld ld-ring ld-spin"></div></button>' +
'</div>';
$("#btn-save").after(dropdowninfo);
}
$('#querydropdown').append(new Option(data.description, data.id)); // We add the saved query to the dropdown
});
}
2024-01-04 11:03:11 +08:00
},
});
2024-02-23 00:56:21 +08:00
} else {
BootstrapDialog.show({
title: 'Stored Queries',
2024-02-23 00:56:21 +08:00
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
2024-02-23 00:56:21 +08:00
message: 'You need to make a query before you search!',
buttons: [{
2023-11-06 02:38:34 +08:00
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
2024-02-23 00:56:21 +08:00
function run_query() {
$(".alert").remove();
$(".runbutton").addClass('running');
$(".runbutton").prop('disabled', true);
let id = $('#querydropdown').val();
$.post("<?php echo site_url('search/run_query'); ?>", {
id: id
})
.done(function(data) {
2024-02-23 00:56:21 +08:00
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_stored_query(' + id + ')">Export to ADIF</button>');
$('.card-body.result').empty();
$(".search-results-box").show();
$('.card-body.result').append(data);
$('.table').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
2023-11-14 20:35:53 +08:00
$('[data-bs-toggle="tooltip"]').tooltip();
2024-02-23 00:56:21 +08:00
$(".runbutton").removeClass('running');
$(".runbutton").prop('disabled', false);
});
2024-02-23 00:56:21 +08:00
}
function delete_stored_query(id) {
BootstrapDialog.confirm({
title: 'DANGER',
message: 'Warning! Are you sure you want delete this stored query?',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
btnOKClass: 'btn-danger',
callback: function(result) {
if (result) {
$.ajax({
url: base_url + 'index.php/search/delete_query',
type: 'post',
data: {
'id': id
},
success: function(data) {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger">The stored query has been deleted!</div>');
$("#query_" + id).remove(); // removes query from table in dialog
$("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown
if ($("#querydropdown option").length == 0) {
$("#btn-edit").remove();
$('.querydropdownform').remove();
};
},
error: function() {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger">The stored query could not be deleted. Please try again!</div>');
},
});
}
2024-02-23 00:56:21 +08:00
}
});
}
2024-02-23 00:56:21 +08:00
function edit_stored_query(id) {
$('#description_' + id).attr('contenteditable', 'true');
$('#description_' + id).focus();
$('#edit_' + id).html('<a class="btn btn-primary btn-sm" href="javascript:save_edited_query(' + id + ');">Save</a>'); // Change to save button
}
2024-02-23 00:56:21 +08:00
function save_edited_query(id) {
$('#description_' + id).attr('contenteditable', 'false');
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>');
$.ajax({
url: base_url + 'index.php/search/save_edited_query',
type: 'post',
data: {
id: id,
description: $('#description_' + id).html(),
},
success: function(html) {
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>'); // Change to edit button
$(".bootstrap-dialog-message").prepend('<div class="alert alert-success">The query description has been updated!</div>');
$("#querydropdown option[value='" + id + "']").text($('#description_' + id).html()); // Change text in dropdown
},
error: function() {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger">Something went wrong with the save. Please try again!</div>');
},
});
}
function edit_stored_query_dialog() {
$(".alert").remove();
$.ajax({
url: base_url + 'index.php/search/get_stored_queries',
type: 'post',
success: function(html) {
BootstrapDialog.show({
title: 'Stored Queries',
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'queries-dialog',
nl2br: false,
message: html,
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
$('#btn-get').on('click', function() {
$(".alert").remove();
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
$(".searchbutton").addClass('running');
$(".searchbutton").prop('disabled', true);
$.post("<?php echo site_url('search/search_result'); ?>", {
search: JSON.stringify(result, null, 2),
temp: "testvar"
})
.done(function(data) {
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_search_result();">Export to ADIF</button>');
$('.card-body.result').empty();
$(".search-results-box").show();
$('.card-body.result').append(data);
$('.table').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
$('[data-bs-toggle="tooltip"]').tooltip();
$(".searchbutton").removeClass('running');
$(".searchbutton").prop('disabled', false);
$("#btn-save").show();
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
});
} else {
BootstrapDialog.show({
title: 'Stored Queries',
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
message: 'You need to make a query before you search!',
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
$('#btn-set').on('click', function() {
//$('#builder').queryBuilder('setRules', rules_basic);
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
rules_basic = result;
}
});
//When rules changed :
$('#builder').on('getRules.queryBuilder.filter', function(e) {
//$log.info(e.value);
});
</script>
<?php } ?>
<script>
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
$('#create_station_profile #country').val($("#dxcc_select option:selected").text());
$("#create_station_profile #dxcc_select").change(function() {
$('#country').val($("#dxcc_select option:selected").text());
2024-02-23 00:56:21 +08:00
});
});
</script>
2023-10-15 03:05:33 +08:00
<script>
2024-02-23 00:56:21 +08:00
function printWarning() {
if ($("#dxcc_select option:selected").text().includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>")) {
$('#warningMessageDXCC').show();
$('#dxcc_select').css('border', '2px solid rgb(217, 83, 79)');
$('#warningMessageDXCC').text("<?php echo lang('station_location_dxcc_warning'); ?>");
} else {
$('#dxcc_select').css('border', '');
$('#warningMessageDXCC').hide();
}
2023-10-15 03:05:33 +08:00
}
2024-02-23 00:56:21 +08:00
$('#dxcc_select').ready(function() {
printWarning();
});
2024-02-23 00:56:21 +08:00
$('#dxcc_select').on('change', function() {
printWarning();
});
2023-10-15 03:05:33 +08:00
</script>
2019-03-21 01:47:40 +08:00
<script>
2024-02-23 00:56:21 +08:00
var $ = jQuery.noConflict();
$('[data-fancybox]').fancybox({
toolbar: false,
smallBtn: true,
iframe: {
preload: false
}
});
// Here we capture ALT-L to invoke the Quick lookup
document.onkeyup = function(e) {
if (e.altKey && e.which == 76) {
spawnLookupModal();
}
if (e.altKey && e.which == 81) {
spawnQrbCalculator();
}
};
2024-02-23 00:56:21 +08:00
function newpath(latlng1, latlng2, locator1, locator2) {
// If map is already initialized
var container = L.DomUtil.get('mapqrbcontainer');
2024-02-23 00:56:21 +08:00
if (container != null) {
container._leaflet_id = null;
container.remove();
$("#mapqrb").append('<div id="mapqrbcontainer" style="Height: 500px"></div>');
}
var map = new L.Map('mapqrbcontainer', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
}).setView([30, 0], 1.5);
// Need to fix so that marker is placed at same place as end of line, but this only needs to be done when longitude is < -170
if (latlng2[1] < -170) {
latlng2[1] = parseFloat(latlng2[1]) + 360;
}
if (latlng1[1] < -170) {
latlng1[1] = parseFloat(latlng1[1]) + 360;
}
2024-02-23 00:56:21 +08:00
map.fitBounds([
[latlng1[0], latlng1[1]],
[latlng2[0], latlng2[1]]
]);
2024-02-23 00:56:21 +08:00
var maidenhead = L.maidenheadqrb().addTo(map);
2024-02-23 00:56:21 +08:00
var osmUrl = '<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>';
var osmAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {
minZoom: 1,
maxZoom: 12,
attribution: osmAttrib
});
2024-02-23 00:56:21 +08:00
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [10, 10], // size of the icon
});
2024-02-23 00:56:21 +08:00
map.addLayer(osm);
2024-02-23 00:56:21 +08:00
var marker = L.marker([latlng1[0], latlng1[1]], {
closeOnClick: false,
autoClose: false
}).addTo(map).bindPopup(locator1);
2024-02-23 00:56:21 +08:00
var marker2 = L.marker([latlng2[0], latlng2[1]], {
closeOnClick: false,
autoClose: false
}).addTo(map).bindPopup(locator2);
2024-02-23 00:56:21 +08:00
const multiplelines = [];
multiplelines.push(
new L.LatLng(latlng1[0], latlng1[1]),
new L.LatLng(latlng2[0], latlng2[1])
)
2024-02-23 00:56:21 +08:00
const geodesic = L.geodesic(multiplelines, {
weight: 3,
opacity: 1,
color: 'red',
wrap: false,
steps: 100
}).addTo(map);
}
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
function showActivatorsMap(call, count, grids) {
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
let re = /,/g;
grids = grids.replace(re, ', ');
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
var result = "Callsign: " + call.replace('0', '&Oslash;') + "<br />";
result += "Count: " + count + "<br/>";
result += "Grids: " + grids + "<br/><br />";
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
$(".activatorsmapResult").html(result);
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
// If map is already initialized
var container = L.DomUtil.get('mapactivators');
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
if (container != null) {
container._leaflet_id = null;
}
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
const map = new L.map('mapactivators').setView([30, 0], 1.5);
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
var grid_four = grids.split(', ');
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
var maidenhead = new L.maidenheadactivators(grid_four).addTo(map);
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
var osmUrl = '<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>';
var osmAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {
minZoom: 1,
maxZoom: 12,
attribution: osmAttrib
});
2022-06-12 19:18:26 +08:00
2024-02-23 00:56:21 +08:00
map.addLayer(osm);
}
2019-03-21 01:47:40 +08:00
</script>
2019-04-08 22:36:23 +08:00
<?php if ($this->uri->segment(1) == "map" && $this->uri->segment(2) == "custom") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"></script>
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
2024-02-23 00:56:21 +08:00
<?php if ($qra == "set") { ?>
var q_lat = <?php echo $qra_lat; ?>;
var q_lng = <?php echo $qra_lng; ?>;
<?php } else { ?>
2024-02-23 00:56:21 +08:00
var q_lat = 40.313043;
var q_lng = -32.695312;
<?php } ?>
2024-02-23 00:56:21 +08:00
var qso_loc = '<?php echo site_url('map/map_plot_json/'); ?>';
2022-03-10 02:01:04 +08:00
var q_zoom = 3;
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
2024-02-23 00:56:21 +08:00
var grid = "Yes";
<?php } else { ?>
2024-02-23 00:56:21 +08:00
var grid = "No";
<?php } ?>
2024-02-23 00:56:21 +08:00
initmap(grid, 'custommap', {
'initmap_only': true
});
// Check and change date if to < from //
$('.custom-map-QSOs input[name="to"]').off('change').on('change', function() {
2024-02-23 00:56:21 +08:00
if ($('.custom-map-QSOs input[name="to"]').val().replaceAll('-', '') < $('.custom-map-QSOs input[name="from"]').val().replaceAll('-', '')) {
$('.custom-map-QSOs input[name="from"]').val($('.custom-map-QSOs input[name="to"]').val());
}
});
$('.custom-map-QSOs input[name="from"]').off('change').on('change', function() {
2024-02-23 00:56:21 +08:00
if ($('.custom-map-QSOs input[name="from"]').val().replaceAll('-', '') > $('.custom-map-QSOs input[name="to"]').val().replaceAll('-', '')) {
$('.custom-map-QSOs input[name="to"]').val($('.custom-map-QSOs input[name="from"]').val());
}
});
2023-12-13 14:10:10 +08:00
// Form "submit" //
2024-02-23 00:56:21 +08:00
$('.custom-map-QSOs .btn_submit_map_custom').off('click').on('click', function() {
var customdata = {
'dataPost': {
'date_from': $('.custom-map-QSOs input[name="from"]').val(),
'date_to': $('.custom-map-QSOs input[name="to"]').val(),
'band': $('.custom-map-QSOs select[name="band"]').val(),
'mode': $('.custom-map-QSOs select[name="mode"]').val(),
'prop_mode': $('.custom-map-QSOs select[name="prop_mode"]').val(),
'isCustom': true
},
'map_id': '#custommap'
};
initplot(qso_loc, customdata);
2023-12-13 14:10:10 +08:00
})
2024-02-23 00:56:21 +08:00
});
function get_oldest_qso_date() {
$.ajax({
url: base_url + 'index.php/map/get_oldest_qso_date',
type: 'post',
success: function(data) {
document.getElementById('from').value = data;
document.getElementById('to').value = new Date().toISOString().split('T')[0];
},
2024-12-06 23:07:52 +08:00
error: function() {},
});
}
</script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard") { ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.js"></script>
2023-11-30 03:16:53 +08:00
<script>
var iconsList = {
'qso': {
'color': '#FF0000',
'icon': 'fas fa-dot-circle'
}
};
</script>
<script>
// jquery onready
$(document).ready(function() {
$.ajax({
url: base_url + 'index.php/user_options/get_map_custom',
type: 'GET',
dataType: 'json',
error: function() {
console.log('[ERROR] ajax get_map_custom() function return error.');
},
success: function(json_mapinfo) {
console.log(json_mapinfo);
if (typeof json_mapinfo.qso !== "undefined") {
iconsList = json_mapinfo;
}
}
});
});
console.log(iconsList);
</script>
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
2020-02-28 06:18:54 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($qra == "set") { ?>
var q_lat = <?php echo $qra_lat; ?>;
var q_lng = <?php echo $qra_lng; ?>;
<?php } else { ?>
2024-02-23 00:56:21 +08:00
var q_lat = 40.313043;
var q_lng = -32.695312;
<?php } ?>
2024-02-23 00:56:21 +08:00
var qso_loc = '<?php echo site_url('map/map_plot_json'); ?>';
var q_zoom = 3;
var osmUrl = '<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>';
var osmCopyright = '<?php echo $this->optionslib->get_option('map_tile_server_copyright'); ?>';
var redIconImg = L.icon({
iconUrl: icon_dot_url,
iconSize: [10, 10]
});
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
2024-05-16 22:10:09 +08:00
var ShowGrid = "Yes";
<?php } else { ?>
2024-05-16 22:10:09 +08:00
var ShowGrid = "No";
<?php } ?>
2024-05-20 00:50:10 +08:00
var layer = L.tileLayer(osmUrl, {
maxZoom: 18,
attribution: osmCopyright,
});
2024-05-16 22:10:09 +08:00
2024-05-20 00:50:10 +08:00
var map = L.map('map', {
layers: [layer],
center: [q_lat, q_lng],
zoom: q_zoom,
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
2024-05-16 22:10:09 +08:00
2024-05-20 00:50:10 +08:00
/*var printer = L.easyPrint({
sizeModes: ['Current'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
2024-05-20 00:50:10 +08:00
}).addTo(map);*/
var markers = {};
function loadMarkers() {
fetch(qso_loc)
.then(response => response.json())
.then(data => {
if (data.error !== "No QSOs found") {
var newMarkers = {};
data.markers.forEach(marker => {
var key = `${marker.lat},${marker.lng}`;
var html = `<h3>${marker.flag}${marker.label}</h3> ${marker.html}`;
newMarkers[key] = marker;
if (!markers[key]) {
var icon = L.divIcon({
className: 'custom-icon',
html: `<i class="${iconsList.qso.icon}" style="color:${iconsList.qso.color}"></i>`
2024-12-06 23:07:52 +08:00
});
L.marker([marker.lat, marker.lng], {
icon: icon
})
.addTo(map)
.bindPopup(html);
}
});
Object.keys(markers).forEach(key => {
if (!newMarkers[key]) {
map.removeLayer(markers[key]);
}
});
markers = newMarkers;
2024-12-06 23:07:52 +08:00
} else {
console.log("No QSOs found to populate dashboard map.");
}
});
}
loadMarkers();
setInterval(loadMarkers, 5000);
2024-02-23 00:56:21 +08:00
});
</script>
2019-04-08 22:36:23 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "radio") { ?>
2024-02-23 00:56:21 +08:00
<!-- If this is the admin/radio page run the JS -->
<script type="text/javascript">
$(document).ready(function() {
setInterval(function() {
// Get Mode
$.get('radio/status/', function(result) {
//$('.status').append(result);
$('.status').html(result);
2024-02-23 00:56:21 +08:00
});
}, 2000);
});
</script>
<?php } ?>
2019-05-14 18:52:11 +08:00
2022-10-31 22:27:54 +08:00
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
</script>
2022-10-31 22:27:54 +08:00
<?php if ($this->uri->segment(1) == "search") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript">
i = 0;
2019-09-05 05:11:55 +08:00
2024-02-23 00:56:21 +08:00
function findduplicates() {
event.preventDefault();
$('#partial_view').load(base_url + "index.php/logbook/search_duplicates/" + $("#station_id").val(), function() {
$('.qsolist').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
});
}
2024-02-23 00:56:21 +08:00
function findlotwunconfirmed() {
event.preventDefault();
$('#partial_view').load(base_url + "index.php/logbook/search_lotw_unconfirmed/" + $("#station_id").val(), function() {
$('.qsolist').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
});
}
2024-02-23 00:56:21 +08:00
function findincorrectcqzones() {
event.preventDefault();
$('#partial_view').load(base_url + "index.php/logbook/search_incorrect_cq_zones/" + $("#station_id").val(), function() {
$('.qsolist').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
});
}
2024-02-23 00:56:21 +08:00
function searchButtonPress() {
event.preventDefault()
if ($('#callsign').val()) {
let fixedcall = $('#callsign').val();
$('#partial_view').load("logbook/search_result/" + fixedcall.replace('Ø', '0'), function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
}
}
2019-09-05 05:11:55 +08:00
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
2019-05-14 18:52:11 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->input->post('callsign') != "") { ?>
$('#partial_view').load("logbook/search_result/<?php echo str_replace("Ø", "0", $this->input->post('callsign')); ?>", function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
<?php } ?>
2024-02-23 00:56:21 +08:00
$($('#callsign')).on('keypress', function(e) {
if (e.which == 13) {
2019-05-14 18:52:11 +08:00
2024-02-23 00:56:21 +08:00
if ($('#callsign').val()) {
let fixedcall = $('#callsign').val();
$('#partial_view').load("logbook/search_result/" + fixedcall.replace('Ø', '0'), function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
}
2019-05-14 18:52:11 +08:00
2024-02-23 00:56:21 +08:00
event.preventDefault();
return false;
}
});
2019-09-05 05:11:55 +08:00
2024-02-23 00:56:21 +08:00
});
</script>
2019-05-14 18:52:11 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "logbook" && $this->uri->segment(2) != "view") { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"></script>
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
$(function() {
$('[data-bs-toggle="tooltip"]').tooltip()
});
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
</script>
2019-05-14 23:46:16 +08:00
<script type="text/javascript">
2024-02-23 00:56:21 +08:00
<?php if ($qra == "set") { ?>
var q_lat = <?php echo $qra_lat; ?>;
var q_lng = <?php echo $qra_lng; ?>;
2019-05-14 23:46:16 +08:00
<?php } else { ?>
2024-02-23 00:56:21 +08:00
var q_lat = 40.313043;
var q_lng = -32.695312;
2019-05-14 23:46:16 +08:00
<?php } ?>
2023-12-12 15:18:42 +08:00
var qso_loc = '<?php echo site_url('map/map_plot_json'); ?>';
var q_zoom = 3;
2019-05-14 23:46:16 +08:00
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
2024-02-23 00:56:21 +08:00
var grid = "Yes";
<?php } else { ?>
2024-02-23 00:56:21 +08:00
var grid = "No";
<?php } ?>
2024-02-23 00:56:21 +08:00
initmap(grid, 'map', {
'dataPost': {
'nb_qso': '25',
'offset': '<?php echo $this->uri->segment(3); ?>'
}
});
2019-05-14 23:46:16 +08:00
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "qso") { ?>
2023-08-01 23:24:33 +08:00
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/qso.js"></script>
<?php if ($this->session->userdata('isWinkeyEnabled')) { ?>
<script src="<?php echo base_url(); ?>assets/js/winkey.js"></script>
<?php }
2023-08-01 23:24:33 +08:00
2024-02-23 00:56:21 +08:00
if ($this->optionslib->get_option('dxcache_url') != '') { ?>
<script type="text/javascript">
var dxcluster_provider = '<?php echo base_url(); ?>index.php/dxcluster';
$(document).ready(function() {
$("#check_cluster").on("click", function() {
$.ajax({
url: dxcluster_provider + "/qrg_lookup/" + $("#frequency").val() / 1000,
cache: false,
dataType: "json"
}).done(
function(dxspot) {
reset_fields();
$("#callsign").val(dxspot.spotted);
$("#callsign").trigger("blur");
}
);
});
});
</script>
<?php
}
$this->load->model('stations');
$active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id);
$active_station_info = $station_profile->row();
if (strpos($active_station_info->station_gridsquare, ',') !== false) {
$gridsquareArray = explode(',', $active_station_info->station_gridsquare);
$user_gridsquare = $gridsquareArray[0];
} else {
$user_gridsquare = $active_station_info->station_gridsquare;
}
2024-02-23 00:56:21 +08:00
?>
2019-06-14 07:14:39 +08:00
2024-02-23 00:56:21 +08:00
<script>
var markers = L.layerGroup();
var pos = [51.505, -0.09];
var mymap = L.map('qsomap').setView(pos, 12);
$.ajax({
url: base_url + 'index.php/logbook/qralatlngjson',
type: 'post',
data: {
<?php if ($active_station_info->station_gridsquare != "") { ?>
qra: '<?php echo $user_gridsquare; ?>',
<?php } else if (null !== $this->config->item('locator')) { ?>
qra: '<?php echo $this->config->item('locator'); ?>',
<?php } else { ?>
// Fallback to London in case all else fails
qra: 'IO91WM',
<?php } ?>
},
success: function(data) {
result = JSON.parse(data);
if (typeof result[0] !== "undefined" && typeof result[1] !== "undefined") {
mymap.panTo([result[0], result[1]]);
pos = result;
}
},
error: function() {},
});
2019-06-14 07:14:39 +08:00
2024-02-23 00:56:21 +08:00
L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
id: 'mapbox.streets'
}).addTo(mymap);
</script>
2024-02-23 00:56:21 +08:00
<script type="text/javascript">
var manual = <?php echo $_GET['manual']; ?>;
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
2024-02-23 00:56:21 +08:00
$('.callsign-suggest').hide();
2024-02-23 00:56:21 +08:00
setRst($(".mode").val());
2024-02-23 00:56:21 +08:00
/* On Page Load */
var catcher = function() {
var changed = false;
$('form').each(function() {
if ($(this).data('initialForm') != $(this).serialize()) {
changed = true;
$(this).addClass('changed');
} else {
$(this).removeClass('changed');
}
});
if (changed) {
return 'Unsaved QSO!';
}
};
2024-02-23 00:56:21 +08:00
$(function() {
$('form').each(function() {
$(this).data('initialForm', $(this).serialize());
}).submit(function(e) {
var formEl = this;
var changed = false;
$('form').each(function() {
if (this != formEl && $(this).data('initialForm') != $(this).serialize()) {
changed = true;
$(this).addClass('changed');
} else {
$(this).removeClass('changed');
}
});
if (changed && !confirm('You have an unsaved QSO. Continue with QSO?')) {
e.preventDefault();
} else {
$(window).unbind('beforeunload', catcher);
}
});
$(window).bind('beforeunload', catcher);
});
2024-02-23 00:56:21 +08:00
// Callsign always has focus on load
$("#callsign").focus();
2024-02-23 00:56:21 +08:00
if (!manual) {
$(function($) {
resetTimers(0);
});
}
2019-05-26 05:17:35 +08:00
});
2024-02-23 00:56:21 +08:00
<?php if ($this->session->userdata('user_qso_end_times') == 1) { ?>
$('#callsign').focusout(function() {
if (!manual && $('#callsign').val() != '') {
clearInterval(handleStart);
clearInterval(handleDate);
}
});
$('#start_time').focusout(function() {
if (manual && $('#start_time').val() != '') {
$('#end_time').val($('#start_time').val());
}
});
<?php } ?>
2024-02-23 00:56:21 +08:00
jQuery(function($) {
var input = $('#callsign');
input.on('keydown', function() {
var key = event.keyCode || event.charCode;
2024-02-23 00:56:21 +08:00
if (key == 8 || key == 46) {
reset_fields();
}
});
2023-05-02 03:14:30 +08:00
2024-02-23 00:56:21 +08:00
$(document).keyup(function(e) {
if (e.charCode === 0) {
let fixedcall = $('#callsign').val();
$('#callsign').val(fixedcall.replace('Ø', '0'));
}
if (e.key === "Escape") { // escape key maps to keycode `27`
reset_fields();
if (!manual) {
resetTimers(0)
}
$('#callsign').val("");
$("#callsign").focus();
updateFromCAT();
2024-02-23 00:59:21 +08:00
if (document.querySelector('#radio').value != '0') {
updateFromCAT();
}
2024-02-23 00:56:21 +08:00
}
});
});
2023-04-28 05:02:57 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->session->userdata('user_sota_lookup') == 1) { ?>
$('#sota_ref').change(function() {
var sota = $('#sota_ref').val();
if (sota.length > 0) {
$.ajax({
url: base_url + 'index.php/qso/get_sota_info',
type: 'post',
data: {
'sota': sota
},
success: function(res) {
$('#qth').val(res.name);
$('#locator').val(res.locator);
},
error: function() {
$('#qth').val('');
$('#locator').val('');
},
});
}
});
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->session->userdata('user_wwff_lookup') == 1) { ?>
$('#wwff_ref').change(function() {
var wwff = $('#wwff_ref').val();
if (wwff.length > 0) {
$.ajax({
url: base_url + 'index.php/qso/get_wwff_info',
type: 'post',
data: {
'wwff': wwff
},
success: function(res) {
$('#qth').val(res.name);
$('#locator').val(res.locator);
},
error: function() {
$('#qth').val('');
$('#locator').val('');
},
});
}
});
<?php } ?>
2023-08-14 22:10:24 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->session->userdata('user_pota_lookup') == 1) { ?>
$('#pota_ref').change(function() {
var pota = $('#pota_ref').val();
if (pota.length > 0) {
$.ajax({
url: base_url + 'index.php/qso/get_pota_info',
type: 'post',
data: {
'pota': pota
},
success: function(res) {
$('#qth').val(res.name);
$('#locator').val(res.grid6);
},
error: function() {
$('#qth').val('');
$('#locator').val('');
},
});
}
});
<?php } ?>
Add option to log QSO end times separately Squashed commit of the following: commit 595f620d9ea32cde52cd8094c9ba928b2242ebce Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:58:05 2023 +0100 Update languages commit f670a0605923e3e3e50548cdc6872afce620d2bb Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:55:04 2023 +0100 Added user option for enabling QSO end time logging commit 36d9a95ebbebb6cdcdd382d1460dd858b425e1c7 Merge: 54d5bb53 352931b1 Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 12:18:39 2023 +0100 Merge branch 'dev' into qsoTime commit 54d5bb535bfe820feb617b2c7205733af7b9f91d Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:58 2023 +0200 start/end times for other languages commit c5f6bb0cab5dd3b38d1d74ec1a666c82a71929d6 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:42 2023 +0200 Hide end time if only differs in seconds as we only display minutes anyway ... commit d519d88604bf1730a1c2e0631a6047326fa57a56 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:29 2023 +0200 use start as end time if end is not set separately commit f2588ad1321df63d6840f33c05700f55eb681f9c Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:43 2023 +0200 reset timers on form reset commit 2b7ee4e48c27d0373e74a362f5c5d18d3616cd1e Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:27 2023 +0200 Strip seconds from session time variable commit e0c35aa0cfaf2569c1e9254d287a98251a771593 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:11 2023 +0200 Adapt contest logging commit 5368ef25f3a59756654092767c863684775f4483 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:50 2023 +0200 Make date field a little smaller commit ad2d7e756c101a387b4449ee0fcbfcbaac286d28 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:30 2023 +0200 Add button to reset start time commit f56e031946ef80978857da4f49629a51bb98ad57 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:11:09 2023 +0200 Copy start to end time on focus out commit b741d0428deac43efe33f8bf22943c09a994c271 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:10:45 2023 +0200 Only min and sec for post QSO template commit 77314edd31be56469d1355b95287e580e8414d8b Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:08:49 2023 +0200 Basics for QSO end time logging
2023-11-01 21:24:13 +08:00
2024-02-23 00:56:21 +08:00
$('#stationProfile').change(function() {
var stationProfile = $('#stationProfile').val();
$.ajax({
url: base_url + 'index.php/qso/get_station_power',
type: 'post',
data: {
'stationProfile': stationProfile
},
success: function(res) {
$('#transmit_power').val(res.station_power);
},
error: function() {
$('#transmit_power').val('');
},
});
// [eQSL default msg] change value on change station profle //
qso_set_eqsl_qslmsg(stationProfile, false, '.qso_panel');
});
// [eQSL default msg] change value on clic //
$('.qso_panel .qso_eqsl_qslmsg_update').off('click').on('click', function() {
qso_set_eqsl_qslmsg($('.qso_panel #stationProfile').val(), true, '.qso_panel');
$('#charsLeft').text(" ");
});
Add option to log QSO end times separately Squashed commit of the following: commit 595f620d9ea32cde52cd8094c9ba928b2242ebce Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:58:05 2023 +0100 Update languages commit f670a0605923e3e3e50548cdc6872afce620d2bb Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:55:04 2023 +0100 Added user option for enabling QSO end time logging commit 36d9a95ebbebb6cdcdd382d1460dd858b425e1c7 Merge: 54d5bb53 352931b1 Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 12:18:39 2023 +0100 Merge branch 'dev' into qsoTime commit 54d5bb535bfe820feb617b2c7205733af7b9f91d Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:58 2023 +0200 start/end times for other languages commit c5f6bb0cab5dd3b38d1d74ec1a666c82a71929d6 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:42 2023 +0200 Hide end time if only differs in seconds as we only display minutes anyway ... commit d519d88604bf1730a1c2e0631a6047326fa57a56 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:29 2023 +0200 use start as end time if end is not set separately commit f2588ad1321df63d6840f33c05700f55eb681f9c Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:43 2023 +0200 reset timers on form reset commit 2b7ee4e48c27d0373e74a362f5c5d18d3616cd1e Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:27 2023 +0200 Strip seconds from session time variable commit e0c35aa0cfaf2569c1e9254d287a98251a771593 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:11 2023 +0200 Adapt contest logging commit 5368ef25f3a59756654092767c863684775f4483 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:50 2023 +0200 Make date field a little smaller commit ad2d7e756c101a387b4449ee0fcbfcbaac286d28 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:30 2023 +0200 Add button to reset start time commit f56e031946ef80978857da4f49629a51bb98ad57 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:11:09 2023 +0200 Copy start to end time on focus out commit b741d0428deac43efe33f8bf22943c09a994c271 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:10:45 2023 +0200 Only min and sec for post QSO template commit 77314edd31be56469d1355b95287e580e8414d8b Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:08:49 2023 +0200 Basics for QSO end time logging
2023-11-01 21:24:13 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->session->userdata('user_qth_lookup') == 1) { ?>
$('#qth').focusout(function() {
if ($('#locator').val() === '') {
var lat = 0;
var lon = 0;
$.ajax({
async: false,
type: 'GET',
dataType: "json",
url: "https://nominatim.openstreetmap.org/?city=" + $(this).val() + "&format=json&addressdetails=1&limit=1",
data: {},
success: function(data) {
if (typeof data[0].lat !== 'undefined') {
lat = parseFloat(data[0].lat);
}
if (typeof data[0].lon !== 'undefined') {
lon = parseFloat(data[0].lon);
}
},
});
if (lat !== 0 && lon !== 0) {
var qthloc = LatLng2Loc(lat, lon, 10);
if (qthloc.length > 0) {
$('#locator').val(qthloc.substr(0, 6)).trigger('focusout');
}
}
}
});
LatLng2Loc = function(y, x, num) {
if (x < -180) {
x = x + 360;
}
if (x > 180) {
x = x - 360;
}
var yqth, yi, yk, ydiv, yres, ylp, y;
var ycalc = new Array(0, 0, 0);
var yn = new Array(0, 0, 0, 0, 0, 0, 0);
var ydiv_arr = new Array(10, 1, 1 / 24, 1 / 240, 1 / 240 / 24);
ycalc[0] = (x + 180) / 2;
ycalc[1] = y + 90;
for (yi = 0; yi < 2; yi++) {
for (yk = 0; yk < 5; yk++) {
ydiv = ydiv_arr[yk];
yres = ycalc[yi] / ydiv;
ycalc[yi] = yres;
if (ycalc[yi] > 0) ylp = Math.floor(yres);
else ylp = Math.ceil(yres);
ycalc[yi] = (ycalc[yi] - ylp) * ydiv;
yn[2 * yk + yi] = ylp;
}
}
Add option to log QSO end times separately Squashed commit of the following: commit 595f620d9ea32cde52cd8094c9ba928b2242ebce Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:58:05 2023 +0100 Update languages commit f670a0605923e3e3e50548cdc6872afce620d2bb Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:55:04 2023 +0100 Added user option for enabling QSO end time logging commit 36d9a95ebbebb6cdcdd382d1460dd858b425e1c7 Merge: 54d5bb53 352931b1 Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 12:18:39 2023 +0100 Merge branch 'dev' into qsoTime commit 54d5bb535bfe820feb617b2c7205733af7b9f91d Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:58 2023 +0200 start/end times for other languages commit c5f6bb0cab5dd3b38d1d74ec1a666c82a71929d6 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:42 2023 +0200 Hide end time if only differs in seconds as we only display minutes anyway ... commit d519d88604bf1730a1c2e0631a6047326fa57a56 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:29 2023 +0200 use start as end time if end is not set separately commit f2588ad1321df63d6840f33c05700f55eb681f9c Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:43 2023 +0200 reset timers on form reset commit 2b7ee4e48c27d0373e74a362f5c5d18d3616cd1e Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:27 2023 +0200 Strip seconds from session time variable commit e0c35aa0cfaf2569c1e9254d287a98251a771593 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:11 2023 +0200 Adapt contest logging commit 5368ef25f3a59756654092767c863684775f4483 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:50 2023 +0200 Make date field a little smaller commit ad2d7e756c101a387b4449ee0fcbfcbaac286d28 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:30 2023 +0200 Add button to reset start time commit f56e031946ef80978857da4f49629a51bb98ad57 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:11:09 2023 +0200 Copy start to end time on focus out commit b741d0428deac43efe33f8bf22943c09a994c271 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:10:45 2023 +0200 Only min and sec for post QSO template commit 77314edd31be56469d1355b95287e580e8414d8b Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:08:49 2023 +0200 Basics for QSO end time logging
2023-11-01 21:24:13 +08:00
2024-02-23 00:56:21 +08:00
var qthloc = "";
if (num >= 2) qthloc += String.fromCharCode(yn[0] + 0x41) + String.fromCharCode(yn[1] + 0x41);
if (num >= 4) qthloc += String.fromCharCode(yn[2] + 0x30) + String.fromCharCode(yn[3] + 0x30);
if (num >= 6) qthloc += String.fromCharCode(yn[4] + 0x41) + String.fromCharCode(yn[5] + 0x41);
if (num >= 8) qthloc += ' ' + String.fromCharCode(yn[6] + 0x30) + String.fromCharCode(yn[7] + 0x30);
if (num >= 10) qthloc += String.fromCharCode(yn[8] + 0x61) + String.fromCharCode(yn[9] + 0x61);
return qthloc;
}
<?php } ?>
</script>
2024-02-23 00:56:21 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "qso" || ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add")) { ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
<script>
2024-02-23 00:56:21 +08:00
$('#notice-alerts').delay(1000).fadeOut(5000);
function setRst(mode) {
if (mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS') {
$('#rst_sent').val('-5');
$('#rst_rcvd').val('-5');
} else if (mode == 'FSK441' || mode == 'JT6M') {
$('#rst_sent').val('26');
$('#rst_rcvd').val('26');
} else if (mode == 'CW' || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') {
$('#rst_sent').val('599');
$('#rst_rcvd').val('599');
} else {
$('#rst_sent').val('59');
$('#rst_rcvd').val('59');
}
}
2024-02-23 00:56:21 +08:00
function getUTCTimeStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCHours()).slice(-2) + ':' + ("0" + now.getUTCMinutes()).slice(-2) + ':' + ("0" + now.getUTCSeconds()).slice(-2));
}
2024-02-23 00:56:21 +08:00
function getUTCDateStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCDate()).slice(-2) + '-' + ("0" + (now.getUTCMonth() + 1)).slice(-2) + '-' + now.getUTCFullYear());
}
</script>
2024-02-23 00:56:21 +08:00
<script>
2024-12-06 23:07:52 +08:00
// Helper function to update a UI element with CAT data
const cat2UI = (ui, cat, allowEmpty = true, allowZero = true, callbackOnUpdate) => {
if (
cat == null ||
(!allowEmpty && cat === '') ||
(!allowZero && cat === '0')
) return;
if (ui.data('catValue') != cat) {
ui.val(cat).data('catValue', cat);
if (typeof callbackOnUpdate === 'function') callbackOnUpdate(cat);
2024-02-23 00:56:21 +08:00
}
2024-12-06 23:07:52 +08:00
};
2024-02-23 00:56:21 +08:00
2024-12-06 23:07:52 +08:00
// Update UI from CAT data
const updateFromCAT = (radioID) => {
if (radioID === '0') return;
$.getJSON(`radio/json/${radioID}`, (data) => {
if (data.error) {
if (data.error === 'not_logged_in') {
handleLoginError();
2024-02-23 00:56:21 +08:00
}
2024-12-06 23:07:52 +08:00
return;
}
clearLoginError();
updateUIWithCATData(data);
});
};
// Handle login error display
const handleLoginError = () => {
$(".radio_cat_state").remove();
if ($('.radio_login_error').length === 0) {
$('.qso_panel').prepend(
'<div class="alert alert-danger radio_login_error" role="alert">' +
'<i class="fas fa-broadcast-tower"></i> You\'re not logged in. ' +
'Please <a href="<?php echo base_url(); ?>">login</a></div>'
);
2024-02-23 00:56:21 +08:00
}
};
2024-12-06 23:07:52 +08:00
// Clear login error
const clearLoginError = () => {
$(".radio_login_error").remove();
};
// Update UI elements with CAT data
const updateUIWithCATData = (data) => {
cat2UI($('#frequency'), data.frequency, false, true, (d) => {
$("#band").val(frequencyToBand(d));
});
cat2UI($('#frequency_rx'), data.frequency_rx, false, true, (d) => {
$("#band_rx").val(frequencyToBand(d));
});
cat2UI($('.mode'), data.mode, false, false, () => {
setRst($(".mode").val());
});
cat2UI($('#sat_name'), data.satname, false, false);
cat2UI($('#sat_mode'), data.satmode, false, false);
cat2UI($('#transmit_power'), data.power, false, false);
cat2UI($('#selectPropagation'), data.prop_mode, false, false);
handleCATTimeout(data);
};
// Handle CAT timeout
const handleCATTimeout = (data) => {
const minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
if (data.updated_minutes_ago > minutes) {
$(".radio_cat_state").remove();
const errorText = `Radio connection timed-out: ${$('select.radios option:selected').text()} data is ${data.updated_minutes_ago} minutes old.`;
if ($('.radio_timeout_error').length === 0) {
$('#radio_status').prepend(
`<div class="alert alert-danger radio_timeout_error" role="alert"><i class="fas fa-broadcast-tower"></i> ${errorText}</div>`
);
} else {
$('.radio_timeout_error').html(errorText);
}
} else {
2024-02-23 00:56:21 +08:00
$(".radio_timeout_error").remove();
2024-12-06 23:07:52 +08:00
updateCATStatusDisplay(data);
}
};
// Update the status display
const updateCATStatusDisplay = (data) => {
let text = `<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> ${(Math.round(parseInt(data.frequency) / 100) / 10000).toFixed(4)} MHz`;
if (data.mode) text += `<span style="margin-left:10px"></span>${data.mode}`;
if (data.power && data.power !== 0) text += `<span style="margin-left:10px"></span>${data.power} W`;
let ptext = '';
if (data.prop_mode) {
ptext = data.prop_mode;
if (data.prop_mode === 'SAT') ptext += ` ${data.satname}`;
2024-02-23 00:56:21 +08:00
}
2024-12-06 23:07:52 +08:00
if (data.frequency_rx && data.frequency_rx !== 0) {
ptext += `<span style="margin-left:10px"></span><b>RX:</b> ${(Math.round(parseInt(data.frequency_rx) / 1000) / 1000).toFixed(3)} MHz`;
}
if (ptext) text += `<span style="margin-left:10px"></span>(${ptext})`;
if (!$('#radio_cat_state').length) {
$('#radio_status').prepend(
`<div aria-hidden="true"><div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">${text}</div></div>`
);
} else {
$('#radio_cat_state').html(text);
}
};
// Reset UI when no radio is selected
const resetUI = () => {
$("#sat_name, #sat_mode, #frequency, #frequency_rx, #band_rx").val("");
$("#selectPropagation").val($("#selectPropagation option:first").val());
$(".radio_timeout_error").remove();
};
// Event listeners
$(document).ready(() => {
// Update frequency every three seconds for the selected radio
setInterval(() => {
const selectedRadioID = $('select.radios option:selected').val();
if (selectedRadioID !== '0') {
updateFromCAT(selectedRadioID);
}
}, 3000);
// Trigger updateFromCAT when any <select> with class 'radios' changes
$('.radios').on('change', function() {
const selectedRadioID = $(this).val();
if (selectedRadioID === '0') {
resetUI();
} else {
updateFromCAT(selectedRadioID);
}
});
2024-02-23 00:56:21 +08:00
});
</script>
2024-12-06 23:07:52 +08:00
<script>
$(document).ready(function () {
// Synchronize the two selects
$('.radios').on('change', function () {
const selectedValue = $(this).val(); // Get the selected value
$('.radios').not(this).val(selectedValue); // Update other selects to match
});
});
</script>
2024-02-23 00:56:21 +08:00
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "logbook" && $this->uri->segment(2) == "view") { ?>
<script>
var mymap = L.map('map').setView([lat, long], 5);
2024-02-23 00:56:21 +08:00
L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
id: 'mapbox.streets'
}).addTo(mymap);
2020-06-17 21:37:17 +08:00
2024-02-23 00:56:21 +08:00
var printer = L.easyPrint({
tileLayer: tiles,
sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
}).addTo(mymap);
2020-06-17 21:37:17 +08:00
2024-02-23 00:56:21 +08:00
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
2024-02-23 00:56:21 +08:00
L.marker([lat, long], {
icon: redIcon
}).addTo(mymap)
.bindPopup(callsign);
2024-02-23 00:56:21 +08:00
mymap.on('click', onMapClick);
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "update") { ?>
2024-02-23 00:56:21 +08:00
<script>
$(document).ready(function() {
$('#btn_update_dxcc').bind('click', function() {
$('#dxcc_update_status').show();
$.ajax({
url: "update/dxcc"
});
setTimeout(update_stats, 5000);
2024-02-23 00:56:21 +08:00
});
2024-02-23 00:56:21 +08:00
function update_stats() {
$('#dxcc_update_status').load('<?php echo base_url() ?>updates/status.html', function(val) {
$('#dxcc_update_staus').html(val);
2024-02-23 00:56:21 +08:00
if ((val === null) || (val.substring(0, 4) != "DONE")) {
setTimeout(update_stats, 5000);
}
});
}
});
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "awards" && $this->uri->segment(2) == "wab") { ?>
<script>
var WorkedSquaresObject = <?php echo json_encode($worked_squares); ?>;
var WorkedSquaresArray = Object.values(WorkedSquaresObject);
var ConfirmedSquaresObject = <?php echo json_encode($confirmed_squares); ?>;
var ConfirmedSquaresArray = Object.values(ConfirmedSquaresObject);
var wab_squares = $.ajax({
url: "<?php echo base_url(); ?>assets/json/WABSquares.geojson",
dataType: "json",
success: console.log("WAB data successfully loaded."),
error: function(xhr) {
alert(xhr.statusText)
}
})
// Load the external GeoJSON file
$.when(wab_squares).done(function() {
var layer = L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
id: 'mapbox.streets'
});
var map = L.map('map', {
layers: [layer],
center: [54.970901, -2.457140],
zoom: 8,
minZoom: 8,
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
var printer = L.easyPrint({
tileLayer: layer,
sizeModes: ['Current'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
}).addTo(map);
/*Legend specific*/
var legend = L.control({
position: "topright"
});
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span> Confirmed Square</span><br>";
div.innerHTML += "<i style='background: orange'></i><span> Unconfirmed Square</span><br>";
return div;
};
legend.addTo(map);
//console.log(wab_squares.responseJSON);
// Add requested external GeoJSON to map
var kywab_squares = L.geoJSON(wab_squares.responseJSON, {
style: function(feature) {
if (WorkedSquaresArray.indexOf(feature.properties.name) !== -1) {
if (ConfirmedSquaresArray.indexOf(feature.properties.name) !== -1) {
return {
fillColor: 'green',
fill: true,
fillOpacity: 1,
};
} else {
return {
fillColor: 'orange',
fill: true,
fillOpacity: 1,
};
}
} else {
return {};
}
},
pointToLayer: function(feature, latlng) {
if (feature.properties && feature.properties.name) {
// Create a custom icon that displays the name from the GeoJSON data
var labelIcon = L.divIcon({
className: 'text-labels', // Set class for CSS styling
html: feature.properties.name
});
// Create a marker at the location of the point
return L.marker(latlng, {
icon: labelIcon
});
}
},
onEachFeature: function(feature, layer) {
layer.on('click', function() {
// Code to execute when the area is clicked
displaywabcontacts(feature.properties.name);
});
}
}).addTo(map);
// Function to update labels based on zoom level
function updateLabels() {
var currentZoom = map.getZoom();
kywab_squares.eachLayer(function(layer) {
if (currentZoom >= 8) {
// Show labels if zoom level is 10 or higher
layer.getElement().style.display = 'block';
} else {
// Hide labels if zoom level is less than 10
layer.getElement().style.display = 'none';
}
});
}
// Update labels when the map zoom changes
map.on('zoomend', updateLabels);
// Update labels immediately after adding the GeoJSON data to the map
updateLabels();
});
function displaywabcontacts(wabsquare) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/awards/wab_details_ajax',
type: 'post',
data: {
'Wab': wabsquare,
},
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-counties-dialog',
nl2br: false,
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
},
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "gridsquares" && !empty($this->uri->segment(2))) { ?>
2024-02-23 00:56:21 +08:00
<script>
var gridsquaremap = true;
</script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.MaidenheadColoured.js"></script>
2024-02-23 00:56:21 +08:00
<script>
var layer = L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
id: 'mapbox.streets'
});
2024-02-23 00:56:21 +08:00
var map = L.map('gridsquare_map', {
layers: [layer],
center: [19, 0],
zoom: 2,
minZoom: 1,
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
var printer = L.easyPrint({
tileLayer: layer,
sizeModes: ['Current'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
}).addTo(map);
var grid_two = <?php echo $grid_2char; ?>;
var grid_four = <?php echo $grid_4char; ?>;
var grid_six = <?php echo $grid_6char; ?>;
var grid_two_count = grid_two.length;
var grid_four_count = grid_four.length;
var grid_six_count = grid_six.length;
var grid_two_confirmed = <?php echo $grid_2char_confirmed; ?>;
var grid_four_confirmed = <?php echo $grid_4char_confirmed; ?>;
var grid_six_confirmed = <?php echo $grid_6char_confirmed; ?>;
var grid_two_confirmed_count = grid_two_confirmed.length;
var grid_four_confirmed_count = grid_four_confirmed.length;
var grid_six_confirmed_count = grid_six_confirmed.length;
if (grid_four_confirmed_count > 0) {
var span = document.getElementById('confirmed_grids');
span.innerText = span.textContent = '(' + grid_four_confirmed_count + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_confirmed_count != 1 ? 's' : '') + ') ';
}
if ((grid_four_count - grid_four_confirmed_count) > 0) {
var span = document.getElementById('worked_grids');
span.innerText = span.textContent = '(' + (grid_four_count - grid_four_confirmed_count) + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_count - grid_four_confirmed_count != 1 ? 's' : '') + ') ';
}
var span = document.getElementById('sum_grids');
span.innerText = span.textContent = ' <?php echo lang('gridsquares_total_count'); ?>' + ': ' + grid_four_count + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_count != 1 ? 's' : '');
var maidenhead = L.maidenhead().addTo(map);
map.on('click', onMapClick);
function onMapClick(event) {
var LatLng = event.latlng;
var lat = LatLng.lat;
var lng = LatLng.lng;
var locator = LatLng2Loc(lat, lng, 10);
var loc_4char = locator.substring(0, 4);
if (map.getZoom() > 2) {
<?php if ($this->session->userdata('user_callsign')) { ?>
spawnGridsquareModal(loc_4char);
<?php } ?>
}
};
function spawnGridsquareModal(loc_4char) {
var band = '';
var search_type = "<?php echo $this->uri->segment(2); ?>";
if (search_type == "satellites") {
band = 'SAT';
} else {
band = "<?php echo $this->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("");
}
if (count > 0) {
$('#square_number').text(loc_4char);
$('#exampleModal').modal('show');
$('[data-bs-toggle="tooltip"]').tooltip({
boundary: 'window'
});
}
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
2024-02-23 00:56:21 +08:00
}
});
}
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
2024-02-23 00:56:21 +08:00
var bands_available = <?php echo $bands_available; ?>;
$('#gridsquare_bands').append('<option value="All">All</option>')
$.each(bands_available, function(key, value) {
$('#gridsquare_bands')
.append($("<option></option>")
.attr("value", value)
.text(value));
});
var num = "<?php echo $this->uri->segment(3); ?>";
$("#gridsquare_bands option").each(function() {
if ($(this).val() == num) { // EDITED THIS LINE
$(this).attr("selected", "selected");
}
});
$(function() {
// bind change event to select
$('#gridsquare_bands').on('change', function() {
var url = $(this).val(); // get selected value
if (url) { // require a URL
window.location = "<?php echo site_url('gridsquares/band/'); ?>" + url
}
return false;
});
});
<?php } ?>
</script>
2020-02-18 17:49:27 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "activated_grids" && !empty($this->uri->segment(2))) { ?>
2024-02-23 00:56:21 +08:00
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.MaidenheadColoured.js"></script>
2024-02-23 00:56:21 +08:00
<script>
var layer = L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
id: 'mapbox.streets'
});
var map = L.map('gridsquare_map', {
layers: [layer],
center: [19, 0],
zoom: 2,
minZoom: 1,
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
var grid_two = <?php echo $grid_2char; ?>;
var grid_four = <?php echo $grid_4char; ?>;
var grid_six = <?php echo $grid_6char; ?>;
var grid_two_count = grid_two.length;
var grid_four_count = grid_four.length;
var grid_six_count = grid_six.length;
var grid_two_confirmed = <?php echo $grid_2char_confirmed; ?>;
var grid_four_confirmed = <?php echo $grid_4char_confirmed; ?>;
var grid_six_confirmed = <?php echo $grid_6char_confirmed; ?>;
var grid_two_confirmed_count = grid_two_confirmed.length;
var grid_four_confirmed_count = grid_four_confirmed.length;
var grid_six_confirmed_count = grid_six_confirmed.length;
if (grid_four_confirmed_count > 0) {
var span = document.getElementById('confirmed_grids');
span.innerText = span.textContent = '(' + grid_four_confirmed_count + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_confirmed_count != 1 ? 's' : '') + ') ';
}
2024-02-23 00:56:21 +08:00
if ((grid_four_count - grid_four_confirmed_count) > 0) {
var span = document.getElementById('activated_grids');
span.innerText = span.textContent = '(' + (grid_four_count - grid_four_confirmed_count) + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_count - grid_four_confirmed_count != 1 ? 's' : '') + ') ';
}
var span = document.getElementById('sum_grids');
span.innerText = span.textContent = ' <?php echo lang('gridsquares_total_count'); ?>' + ': ' + grid_four_count + ' <?php echo lang('gridsquares_grid_squares'); ?>' + (grid_four_count != 1 ? 's' : '');
var maidenhead = L.maidenhead().addTo(map);
map.on('click', onMapClick);
function onMapClick(event) {
var LatLng = event.latlng;
var lat = LatLng.lat;
var lng = LatLng.lng;
var locator = LatLng2Loc(lat, lng, 10);
var loc_4char = locator.substring(0, 4);
if (map.getZoom() > 2) {
<?php if ($this->session->userdata('user_callsign')) { ?>
var band = '';
var search_type = "<?php echo $this->uri->segment(2); ?>";
if (search_type == "satellites") {
band = 'SAT';
} else {
band = "<?php echo $this->uri->segment(3); ?>";
}
$(".modal-body").empty();
$.ajax({
url: base_url + 'index.php/activated_grids/qso_details_ajax',
type: 'post',
data: {
'Searchphrase': loc_4char,
'Band': band,
'Mode': 'All',
},
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("");
}
2024-02-23 00:56:21 +08:00
if (count > 0) {
$('#square_number').text(loc_4char);
$('#exampleModal').modal('show');
$('[data-bs-toggle="tooltip"]').tooltip({
boundary: 'window'
});
}
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
}
});
<?php } ?>
}
};
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "activated_grids" && $this->uri->segment(2) == "band") { ?>
var bands_available = <?php echo $bands_available; ?>;
$('#gridsquare_bands').append('<option value="All">All</option>')
$.each(bands_available, function(key, value) {
$('#gridsquare_bands')
.append($("<option></option>")
.attr("value", value)
.text(value));
});
var num = "<?php echo $this->uri->segment(3); ?>";
$("#gridsquare_bands option").each(function() {
if ($(this).val() == num) { // EDITED THIS LINE
$(this).attr("selected", "selected");
}
});
$(function() {
// bind change event to select
$('#gridsquare_bands').on('change', function() {
var url = $(this).val(); // get selected value
if (url) { // require a URL
window.location = "<?php echo site_url('activated_grids/band/'); ?>" + url
}
return false;
});
});
<?php } ?>
</script>
2020-02-18 17:49:27 +08:00
<?php } ?>
<?php if ($this->uri->segment(1) == "dayswithqso") { ?>
<script src="<?php echo base_url(); ?>assets/js/chart.js"></script>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/dayswithqso.js"></script>
<?php } ?>
2020-02-18 17:49:27 +08:00
<?php if ($this->uri->segment(1) == "distances") { ?>
<script src="<?php echo base_url(); ?>assets/js/highstock.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/distances.js"></script>
2019-05-14 23:46:16 +08:00
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "hrdlog") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/hrdlog.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "qrz") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/qrzlogbook.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "webadif") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/webadif.js"></script>
<?php } ?>
<script>
2024-02-23 00:56:21 +08:00
function displayQso(id) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/logbook/view/' + id,
type: 'post',
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
cssClass: 'qso-dialog',
size: BootstrapDialog.SIZE_WIDE,
nl2br: false,
message: html,
onshown: function(dialog) {
var qsoid = $("#qsoid").text();
$(".editButton").html('<a class="btn btn-primary" id="edit_qso" href="javascript:qso_edit(' + qsoid + ')"><i class="fas fa-edit"></i><?php echo lang('general_edit_qso'); ?></a>');
var lat = $("#lat").text();
var long = $("#long").text();
var callsign = $("#callsign").text();
var mymap = L.map('mapqso').setView([lat, long], 5);
var tiles = L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>', {
maxZoom: 18,
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright'); ?>',
}).addTo(mymap);
var printer = L.easyPrint({
tileLayer: tiles,
sizeModes: ['Current'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
}).addTo(mymap);
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
2023-11-30 03:16:53 +08:00
2024-02-23 00:56:21 +08:00
L.marker([lat, long], {
icon: redIcon
}).addTo(mymap)
.bindPopup(callsign);
2023-11-30 03:16:53 +08:00
2024-02-23 00:56:21 +08:00
},
});
2023-11-30 03:16:53 +08:00
2024-02-23 00:56:21 +08:00
}
});
2023-11-30 03:16:53 +08:00
}
2024-02-23 00:56:21 +08:00
</script>
2020-09-20 20:09:46 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(2) == "dxcc") { ?>
<script>
2024-02-23 00:56:21 +08:00
$('.tabledxcc').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"scrollY": "400px",
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
2020-10-20 01:16:42 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2020-10-20 01:16:42 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
});
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"paging": false,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2020-10-20 01:16:42 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2020-09-20 17:09:22 +08:00
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2020-10-20 01:16:42 +08:00
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
2020-09-20 17:02:29 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(2) == "waja") { ?>
<script>
2024-02-23 00:56:21 +08:00
$('.tablewaja').DataTable({
2020-10-07 04:01:29 +08:00
"pageLength": 25,
responsive: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"scrollY": "400px",
2020-10-07 04:01:29 +08:00
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
2020-10-20 01:16:42 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2020-10-20 01:16:42 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
2020-10-07 04:01:29 +08:00
});
2020-10-20 01:16:42 +08:00
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"paging": false,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2020-10-20 01:16:42 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2020-10-20 01:16:42 +08:00
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
2020-09-20 17:02:29 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(2) == "vucc_band") { ?>
<script>
2024-02-23 00:56:21 +08:00
$('.tablevucc').DataTable({
2020-10-07 04:01:29 +08:00
"pageLength": 25,
responsive: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"scrollY": "400px",
2020-10-07 04:01:29 +08:00
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
2020-10-20 01:16:42 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2020-10-20 01:16:42 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
<?php if ($this->uri->segment(2) == "iota") { ?>
<script>
$('.tableiota').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
"paging": false,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
2020-10-07 04:01:29 +08:00
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2020-10-20 01:16:42 +08:00
$(".buttons-csv").css("color", "white");
}
</script>
2024-02-23 00:56:21 +08:00
<?php } ?>
2020-09-20 17:02:29 +08:00
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(2) == "cq") { ?>
<script>
$('.tablecq').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
"paging": false,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
2020-08-19 13:57:35 +08:00
}
2024-02-23 00:56:21 +08:00
</script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(2) == "was") { ?>
<script>
$('.tablewas').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
"paging": false,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
2020-10-20 01:16:42 +08:00
2024-02-23 00:56:21 +08:00
<script>
function selectize_usa_county() {
var baseURL = "<?php echo base_url(); ?>";
$('#stationCntyInputEdit').selectize({
delimiter: ';',
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
valueField: 'name',
labelField: 'name',
searchField: 'name',
options: [],
create: false,
load: function(query, callback) {
var state = $("#input_usa_state_edit option:selected").text();
if (!query || state == "") return callback();
2020-09-26 00:22:13 +08:00
$.ajax({
2024-02-23 00:56:21 +08:00
url: baseURL + 'index.php/qso/get_county',
type: 'GET',
dataType: 'json',
data: {
query: query,
state: state,
2020-09-26 00:22:13 +08:00
},
2024-02-23 00:56:21 +08:00
error: function() {
callback();
},
success: function(res) {
callback(res);
}
});
}
2024-02-23 00:56:21 +08:00
});
}
function qso_save() {
var baseURL = "<?php echo base_url(); ?>";
var myform = document.getElementById("qsoform");
var fd = new FormData(myform);
$.ajax({
url: baseURL + 'index.php/qso/qso_save_ajax',
data: fd,
cache: false,
processData: false,
contentType: false,
type: 'POST',
success: function(dataofconfirm) {
$(".edit-dialog").modal('hide');
$(".qso-dialog").modal('hide');
<?php if ($this->uri->segment(1) != "search" && $this->uri->segment(2) != "filter" && $this->uri->segment(1) != "qso" && $this->uri->segment(1) != "logbookadvanced") { ?>location.reload();
<?php } ?>
},
error: function(xhr, status, error) {
console.log(xhr.responseText);
}
});
}
</script>
<?php if ($this->uri->segment(1) == "timeline") { ?>
<script>
$('.timelinetable').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
function displayTimelineContacts(querystring, band, mode, type) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/timeline/details',
type: 'post',
data: {
'Querystring': querystring,
'Band': band,
'Mode': mode,
'Type': type
2024-01-04 11:03:11 +08:00
},
2024-02-23 00:56:21 +08:00
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-was-dialog',
nl2br: false,
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
},
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
2024-02-23 00:56:21 +08:00
}
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "activators") { ?>
<script>
$('.activatorstable').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
$('#band').change(function() {
if ($(this).val() == "SAT") {
$('#leogeo').show();
} else {
$('#leogeo').hide();
}
});
<?php if ($this->input->post('band') != "SAT") { ?>
$('#leogeo').hide();
<?php } ?>
});
2020-09-26 00:22:13 +08:00
2024-02-23 00:56:21 +08:00
function displayActivatorsContacts(call, band, leogeo) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/activators/details',
type: 'post',
data: {
'Callsign': call,
'Band': band,
'LeoGeo': leogeo
},
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-was-dialog',
nl2br: false,
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
},
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
</script>
<?php } ?>
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "mode") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/mode.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "band") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/bands.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "accumulated") { ?>
<script src="<?php echo base_url(); ?>assets/js/chart.js"></script>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/accumulatedstatistics.js"></script>
<?php } ?>
2020-10-18 06:00:01 +08:00
<?php if ($this->uri->segment(1) == "timeplotter") { ?>
<script src="<?php echo base_url(); ?>assets/js/highstock.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/timeplot.js"></script>
2020-10-18 06:00:01 +08:00
<?php } ?>
2023-05-10 22:03:30 +08:00
<?php if ($this->uri->segment(1) == "qsl" || $this->uri->segment(1) == "eqsl") {
2024-02-23 00:56:21 +08:00
// Get Date format
if ($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
switch ($custom_date_format) {
2024-02-23 00:56:21 +08:00
case 'd/m/y':
$usethisformat = 'D/MM/YY';
break;
case 'd/m/Y':
$usethisformat = 'D/MM/YYYY';
break;
case 'm/d/y':
$usethisformat = 'MM/D/YY';
break;
case 'm/d/Y':
$usethisformat = 'MM/D/YYYY';
break;
case 'd.m.Y':
$usethisformat = 'D.MM.YYYY';
break;
case 'y/m/d':
$usethisformat = 'YY/MM/D';
break;
case 'Y-m-d':
$usethisformat = 'YYYY-MM-D';
break;
case 'M d, Y':
$usethisformat = 'MMM D, YYYY';
break;
case 'M d, y':
$usethisformat = 'MMM D, YY';
break;
}
2024-02-23 00:56:21 +08:00
?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
2020-10-29 06:20:03 +08:00
<script>
2022-05-28 05:10:19 +08:00
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
2024-02-23 00:56:21 +08:00
action: function(e, dt, node, config) {
dt.search('').draw();
}
};
2024-02-23 00:56:21 +08:00
<?php if ($this->uri->segment(1) == "qsl") { ?>
$('.qsltable').DataTable({
<?php } else if ($this->uri->segment(1) == "eqsl") { ?>
$('.eqsltable').DataTable({
<?php } ?> "pageLength": 25,
responsive: false,
ordering: true,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
"order": [2, 'desc'],
dom: 'Bfrtip',
buttons: [{
extend: 'clear',
text: 'Clear'
}]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
</script>
<?php } ?>
2020-10-29 06:20:03 +08:00
<script>
2024-02-23 00:56:21 +08:00
function viewQsl(picture, callsign) {
let title = '';
const baseURL = "<?php echo base_url(); ?>";
const textAndPic = $('<div></div>').append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="' + baseURL + '/assets/qslcard/' + picture + '" /><center>');
2024-02-23 00:56:21 +08:00
if (callsign == null) {
title = 'QSL Card';
} else {
title = 'QSL Card for ' + callsign.replace('0', '&Oslash;');
2020-10-29 06:20:03 +08:00
}
2024-02-23 00:56:21 +08:00
BootstrapDialog.show({
title: title,
size: BootstrapDialog.SIZE_WIDE,
message: textAndPic,
2024-02-23 00:56:21 +08:00
buttons: [{
label: lang_admin_close,
action: function(dialogRef) {
dialogRef.close();
}
}]
});
}
</script>
2020-10-29 06:20:03 +08:00
<script>
2024-02-23 00:56:21 +08:00
function deleteQsl(id) {
const baseURL = "<?php echo base_url(); ?>";
2024-02-23 00:56:21 +08:00
BootstrapDialog.confirm({
title: 'DANGER',
message: 'Warning! Are you sure you want to delete this QSL card?',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
btnOKClass: 'btn-danger',
callback: function(result) {
if (result) {
$.ajax({
url: baseURL + 'index.php/qsl/delete',
type: 'post',
data: {
'id': id
},
success: function(data) {
$("#" + id).parent("tr:first").remove(); // removes qsl from table
2024-02-23 00:56:21 +08:00
// remove qsl from carousel
$(".carousel-indicators li:last-child").remove();
$(".carouselimageid_" + id).remove();
$('#carouselExampleIndicators').find('.carousel-item').first().addClass('active');
2024-02-23 00:56:21 +08:00
// remove table and hide tab if all qsls are deleted
if ($('.qsltable tr').length == 1) {
$('.qsltable').remove();
$('.qslcardtab').attr('hidden', '');
2020-10-29 06:20:03 +08:00
}
2024-02-23 00:56:21 +08:00
}
});
2020-10-29 06:20:03 +08:00
}
2024-02-23 00:56:21 +08:00
}
});
}
2020-10-29 06:20:03 +08:00
</script>
<script>
function viewSstv(picture) {
const title = 'SSTV Image';
const baseURL = "<?php echo base_url(); ?>";
const textAndPic = $('<div></div>').append(`<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="${baseURL}/assets/sstvimages/${picture}" /><center>`);
BootstrapDialog.show({
title: title,
size: BootstrapDialog.SIZE_WIDE,
message: textAndPic,
buttons: [{
label: lang_admin_close,
action: function(dialogRef) {
dialogRef.close();
}
}]
});
}
function deleteSstv(id) {
const baseURL = "<?php echo base_url(); ?>";
BootstrapDialog.confirm({
title: 'DANGER',
message: 'Warning! Are you sure you want to delete this SSTV Image?',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
btnOKClass: 'btn-danger',
callback: function(result) {
if (result) {
$.ajax({
url: baseURL + 'index.php/sstv/delete',
type: 'post',
data: {
'id': id
},
success: function(data) {
// remove selected sstv image from table
$("#" + id).parent("tr:first").remove();
// remove sstv image from carousel
$("#sstvCarouselIndicators .carousel-indicators li:last-child").remove();
$("#sstvCarouselIndicators .carouselimageid_" + id).remove();
$('#sstvCarouselIndicators').find('.carousel-item').first().addClass('active');
// remove table and hide tab if all sstv images are deleted
if ($('.sstvtable tr').length == 1) {
$('.sstvtable').remove();
$('.sstvimagetab').attr('hidden', '');
}
}
});
}
}
});
}
</script>
2023-05-10 22:03:30 +08:00
<script>
2024-02-23 00:56:21 +08:00
function viewEqsl(picture, callsign) {
var baseURL = "<?php echo base_url(); ?>";
var $textAndPic = $('<div></div>');
$textAndPic.append('<img class="img-fluid" style="height:auto;width:auto;"src="' + baseURL + 'images/eqsl_card_images/' + picture + '" />');
var title = '';
if (callsign == null) {
title = 'eQSL Card';
} else {
title = 'eQSL Card for ' + callsign.replace('0', '&Oslash;');
2023-05-10 22:03:30 +08:00
}
2024-02-23 00:56:21 +08:00
BootstrapDialog.show({
title: title,
size: BootstrapDialog.SIZE_WIDE,
message: $textAndPic,
buttons: [{
label: lang_admin_close,
action: function(dialogRef) {
dialogRef.close();
}
}]
});
}
2023-05-10 22:03:30 +08:00
</script>
2023-10-20 21:44:34 +08:00
<script>
2024-02-23 00:56:21 +08:00
$('#displayAwardInfo').click(function(event) {
2023-10-20 21:44:34 +08:00
var awardInfoLines = [
lang_award_info_ln2,
lang_award_info_ln3,
lang_award_info_ln4
];
var awardInfoContent = "";
2024-02-23 00:56:21 +08:00
awardInfoLines.forEach(function(line) {
2023-10-20 21:44:34 +08:00
awardInfoContent += line + "<br><br>";
});
BootstrapDialog.alert({
2024-02-23 00:56:21 +08:00
title: "<h4>" + lang_award_info_ln1 + "</h4>",
2023-10-20 21:44:34 +08:00
message: awardInfoContent,
});
2024-02-23 00:56:21 +08:00
});
</script>
<script>
/*
* Used to fetch QSOs from the logbook in the awards
*/
function displayContacts(searchphrase, band, mode, type, qsl) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/awards/qso_details_ajax',
type: 'post',
data: {
'Searchphrase': searchphrase,
'Band': band,
'Mode': mode,
'Type': type,
'QSL': qsl
},
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-dialog',
nl2br: false,
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
$('.contacttable').DataTable({
"pageLength": 7,
responsive: false,
ordering: false,
"scrollY": "550px",
"scrollCollapse": true,
"paging": true,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
},
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
function displayContactsOnMap(target, searchphrase, band, mode, type, qsl) {
$.ajax({
2024-02-23 00:56:21 +08:00
url: base_url + 'index.php/awards/qso_details_ajax',
type: 'post',
data: {
'Searchphrase': searchphrase,
'Band': band,
'Mode': mode,
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
'Type': type,
2024-02-23 00:56:21 +08:00
'QSL': qsl
},
2024-02-23 00:56:21 +08:00
success: function(html) {
var dialog = new BootstrapDialog({
2023-10-08 16:41:24 +08:00
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-dialog',
nl2br: false,
message: html,
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
onshown: function(dialog) {
2024-02-23 00:56:21 +08:00
$('[data-bs-toggle="tooltip"]').tooltip();
$('.contacttable').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"scrollY": "550px",
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
$('.table-responsive .dropdown-toggle').off('mouseenter').on('mouseenter', function() {
showQsoActionsMenu($(this).closest('.dropdown'));
});
This PR adds some eye candy tooltips to QSLs icons as well as contest exchanges on various sections within cloudlog Squashed commit of the following: commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 20:47:17 2022 +0100 Fix flicker issue on gridmaps page (by LA8AJA) commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:36:31 2022 +0100 Also show tooltips for contest name commit 88e091f65ace6bdbae3d605839665fdd457ea943 Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 12 19:08:31 2022 +0100 Enable QSL tooltips also for QSO list in qslprint section commit 91b81a0b2ba531e867f82197fe1b201e24785dd2 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:46:38 2022 +0100 Prevent display of empty date values commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 17:12:43 2022 +0100 Make tooltip work also for gridsquares section Tnx @AndreasK79 commit 92c13483b9c71d55fa3d863d426b300cf008dd31 Author: phl0 <florian@florian-wolters.de> Date: Tue Jan 11 15:37:21 2022 +0100 Implement tooltip hints also for other awards sections commit 625c0e73c5dd5823301d888be4d0b3419a76f1db Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 19:28:47 2022 +0100 Implement tooltip for awards section commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:57:35 2022 +0100 Fix bug with extra quotes if manager defined commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 16:18:44 2022 +0100 Small bugix commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 15:42:31 2022 +0100 Add missing translations for electronic QSL commit 617f58a6217aa385225eab27bfe577ad55b7ff37 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:40:32 2022 +0100 Enable tooltips also for search results commit 432a1b283a19196618d4c809545d01cef4f630d3 Author: phl0 <florian@florian-wolters.de> Date: Mon Jan 10 00:18:33 2022 +0100 Also QSL method/manager info commit b43e7a1419c75a199c0a28c9849f2b09e0c62288 Author: phl0 <florian@florian-wolters.de> Date: Sun Jan 9 23:28:54 2022 +0100 Show details for paper QSLs commit 1759d94d8af7299684265700cec51fe0591623dc Author: phl0 <florian@florian-wolters.de> Date: Fri Jan 7 17:51:17 2022 +0100 Add tooltip hints for QSL sent/rcvd dates
2022-01-13 03:51:24 +08:00
},
buttons: [{
2023-11-06 02:38:34 +08:00
label: lang_admin_close,
2024-02-23 00:56:21 +08:00
action: function(dialogItself) {
dialogItself.close();
}
}]
});
2024-02-23 00:56:21 +08:00
dialog.realize();
target.append(dialog.getModal());
dialog.open();
}
});
}
function createTable(title, type) {
const tableClass = type === 'sstv' ? 'sstvtable' : 'qsltable';
return `<table style="width:100%" class="${tableClass} table table-sm table-bordered table-hover table-striped table-condensed">` +
'<thead>' +
'<tr>' +
'<th style="text-align: center">' + title + '</th>' +
'<th style="text-align: center"></th>' +
'<th style="text-align: center"></th>' +
'</tr>' +
'</thead>' +
'<tbody></tbody>' +
'</table>'
}
function createTableRow(image, type) {
const viewFunction = type === 'sstv' ? 'viewSstv' : 'viewQsl';
const deleteFunction = type === 'sstv' ? 'deleteSstv' : 'deleteQsl';
return '<tr><td style="text-align: center">' + image.filename + '</td>' +
`<td id="${image.insertid}" style="text-align: center"><button onclick="${deleteFunction}(${image.insertid});" class="btn btn-sm btn-danger">Delete</button></td>` +
`<td style="text-align: center"><button onclick="${viewFunction}('${image.filename}')" class="btn btn-sm btn-success">View</button></td>` +
'</tr>'
}
function handleSSTVImageUpload(sstvImage) {
const baseURL = "<?php echo base_url(); ?>";
const numCarouselItems = $('#sstv-carousel-indicators li').length;
// Next, append card to the table
$('.sstvtable').length === 0 ? $("#sstvupload").prepend(createTable("SSTV image file", "sstv")) : null;
$('.sstvtable tbody:last').append(createTableRow(sstvImage, "sstv"));
// Append card to the carousel
const newCarouselItem = '<div class="' + (numCarouselItems === 0 ? 'active ' : '') + 'carousel-item carouselimageid_' + sstvImage.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/sstvimages/' + sstvImage.filename + '" alt="QSL picture"></div>';
$("#sstv-carousel-inner").append(newCarouselItem);
// Append new carousel indicator
const newCarouselIndicator = '<li class="' + (numCarouselItems === 0 ? 'active ' : '') + '" data-bs-target="#sstvCarouselIndicators" data-bs-slide-to="' + numCarouselItems + '"></li>';
$("#sstv-carousel-indicators").append(newCarouselIndicator);
// Initialize the bootstrap carousel
$("#sstvCarouselIndicators").carousel();
}
function uploadSSTV() {
const baseURL = "<?php echo base_url(); ?>";
const formdata = new FormData(document.getElementById("sstvinfo"));
$.ajax({
url: baseURL + 'index.php/sstv/uploadsstv',
type: 'post',
data: formdata,
enctype: 'multipart/form-data',
processData: false,
contentType: false,
success: function(data) {
// Iterate over each SSTV image and handle it
data.forEach((sstvImage) => {
if (sstvImage.status == 'Success') {
// Show the SSTV image tab
$('.sstvimagetab').removeAttr('hidden');
// Handle the SSTV image upload
handleSSTVImageUpload(sstvImage);
} else if (sstvImage.status != '') {
$("#sstvupload").append('<div class="alert alert-danger">SSTV image:' +
sstvImage.error +
'</div>');
}
// Reset the image inputs
$("#sstvimages").val(null);
})
}
});
}
function handleQslCardUpload(qslCard) {
const baseURL = "<?php echo base_url(); ?>";
const numCarouselItems = $('#qsl-carousel-indicators li').length;
// append card to the qsl management table
$('.qsltable').length === 0 ? $("#qslupload").prepend(createTable("QSL image file", "qsl")) : null;
$('.qsltable tbody:last').append(createTableRow(qslCard, "qsl"));
// Append card image to the carousel
const newCarouselItem = '<div class="' + (numCarouselItems === 0 ? 'active ' : '') + 'carousel-item carouselimageid_' + qslCard.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + qslCard.filename + '" alt="QSL picture"></div>';
$("#qsl-carousel-inner").append(newCarouselItem);
// Append carousel indicator for the new card
const newCarouselIndicator = '<li class="' + (numCarouselItems === 0 ? 'active ' : '') + '" data-bs-target="#qslCarouselIndicators" data-bs-slide-to="' + numCarouselItems + '"></li>';
$("#qsl-carousel-indicators").append(newCarouselIndicator);
// Initialize the bootstrap carousel
$("#qslCarouselIndicators").carousel();
}
function uploadQsl() {
const baseURL = "<?php echo base_url(); ?>";
const formdata = new FormData(document.getElementById("fileinfo"));
$.ajax({
url: baseURL + 'index.php/qsl/uploadqsl',
type: 'post',
data: formdata,
enctype: 'multipart/form-data',
processData: false,
contentType: false,
success: function(data) {
const qslCard = data.status || {}
if (data.status.front.status == 'Success') {
handleQslCardUpload(qslCard.front);
} else if (qslCard.front.status != '') {
2023-12-07 08:20:39 +08:00
$("#qslupload").append('<div class="alert alert-danger">Front QSL Card:' +
qslCard.front.error +
'</div>');
}
if (qslCard.back.status == 'Success') {
handleQslCardUpload(qslCard.back);
} else if (qslCard.back.status != '') {
2023-12-07 08:20:39 +08:00
$("#qslupload").append('<div class="alert alert-danger">\nBack QSL Card: ' +
qslCard.back.error +
'</div>');
}
// Show the QSL card tab
$('.qslcardtab').removeAttr('hidden');
// Reset the image inputs
$("#qslcardfront").val(null);
$("#qslcardback").val(null);
}
});
}
</script>
<script>
2024-02-23 00:56:21 +08:00
function addQsosToQsl(filename) {
var title = 'Add additional QSOs to a QSL Card';
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/qsl/loadSearchForm',
type: 'post',
data: {
'filename': filename
},
success: function(html) {
BootstrapDialog.show({
title: title,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-search_results',
nl2br: false,
message: html,
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
2024-02-23 00:56:21 +08:00
function addQsoToQsl(qsoid, filename, id) {
var title = 'Add additional QSOs to a QSL Card';
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/qsl/addQsoToQsl',
type: 'post',
data: {
'filename': filename,
'qsoid': qsoid
},
success: function(html) {
if (html.status == 'Success') {
location.reload();
} else {
$(".alert").remove();
$('#searchresult').prepend('<div class="alert alert-danger">Something went wrong. Please try again!</div>');
}
}
});
}
function searchAdditionalQsos(filename) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/qsl/searchQsos',
type: 'post',
data: {
'callsign': $('#callsign').val(),
'filename': filename
},
success: function(html) {
$('#searchresult').empty();
$('#searchresult').append(html);
}
});
}
</script>
<?php if ($this->uri->segment(1) == "contesting" && ($this->uri->segment(2) != "add" && $this->uri->segment(2) != "edit")) { ?>
<script>
var manual = <?php echo $_GET['manual']; ?>;
</script>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/contesting.js?v2"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "station") { ?>
2024-02-23 00:56:21 +08:00
<script>
var baseURL = "<?php echo base_url(); ?>";
$(document).ready(function() {
function checkSelectedValue() {
var selectedValue = $('#dxcc_select').val();
var valuesToShow = [223, 279, 294, 265, 106, 122];
if (valuesToShow.includes(Number(selectedValue))) {
$('#WABbox').show();
} else {
$('#WABbox').hide();
}
}
// Call on page load
checkSelectedValue();
// Call on change event
$('#dxcc_select').change(checkSelectedValue);
});
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
2024-02-23 00:56:21 +08:00
station_profile_selectize_usa_county();
}
2024-02-23 00:56:21 +08:00
$('#StateHelp').change(function() {
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
station_profile_selectize_usa_county();
} else {
$("#stationCntyInput").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
}
});
function station_profile_selectize_usa_county() {
$('#stationCntyInput').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
valueField: 'name',
labelField: 'name',
searchField: 'name',
options: [],
create: false,
load: function(query, callback) {
var state = $("#StateHelp option:selected").text();
if (!query || state == "") return callback();
$.ajax({
url: baseURL + 'index.php/station/get_county',
type: 'GET',
dataType: 'json',
data: {
query: query,
state: state,
},
error: function() {
callback();
},
success: function(res) {
callback(res);
}
});
}
});
}
</script>
<?php } ?>
<?php if ($this->uri->segment(2) == "counties" || $this->uri->segment(2) == "counties_details") { ?>
2024-02-23 00:56:21 +08:00
<script>
$('.countiestable').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "390px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
2024-02-23 00:56:21 +08:00
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
2024-02-23 00:56:21 +08:00
function displayCountyContacts(state, county) {
var baseURL = "<?php echo base_url(); ?>";
$.ajax({
url: baseURL + 'index.php/awards/counties_details_ajax',
type: 'post',
data: {
'State': state,
'County': county
},
success: function(html) {
BootstrapDialog.show({
title: lang_general_word_qso_data,
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-counties-dialog',
nl2br: false,
message: html,
onshown: function(dialog) {
$('[data-bs-toggle="tooltip"]').tooltip();
},
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
</script>
<?php } ?>
<?php if ($this->uri->segment(2) == "sig_details") { ?>
2024-02-23 00:56:21 +08:00
<script>
$('.tablesig').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2024-02-23 00:56:21 +08:00
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) == "add") { ?>
2024-02-23 00:56:21 +08:00
<script src="<?php echo base_url(); ?>assets/js/sections/contestingnames.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "themes") { ?>
<script>
2024-02-23 00:56:21 +08:00
function deleteTheme(id, name) {
BootstrapDialog.confirm({
title: 'DANGER',
message: 'Warning! Are you sure you want to delete the following theme: ' + name + '?',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
btnOKClass: 'btn-danger',
callback: function(result) {
if (result) {
$.ajax({
url: base_url + 'index.php/themes/delete',
type: 'post',
data: {
'id': id
},
success: function(data) {
$(".theme_" + id).parent("tr:first").remove(); // removes mode from table
}
});
}
}
});
}
function addThemeDialog() {
$.ajax({
url: base_url + 'index.php/themes/add',
type: 'post',
success: function(html) {
BootstrapDialog.show({
title: 'Create Theme',
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'create-theme-dialog',
nl2br: false,
message: html,
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
2024-02-23 00:56:21 +08:00
});
}
2024-02-23 00:56:21 +08:00
function addTheme(form) {
if (form.name.value != '') {
$.ajax({
url: base_url + 'index.php/themes/add',
type: 'post',
data: {
'name': form.name.value,
'foldername': form.foldername.value,
},
success: function(html) {
location.reload();
}
});
}
}
</script>
<?php } ?>
2023-05-05 18:00:23 +08:00
<?php if ($this->uri->segment(1) == "eqsl") { ?>
2024-02-23 00:56:21 +08:00
<script>
$('.qsotable').DataTable({
"stateSave": true,
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
"ordering": true,
"order": [0, 'desc'],
});
</script>
2023-05-05 18:00:23 +08:00
<?php } ?>
2022-12-01 00:17:19 +08:00
<?php if ($this->uri->segment(1) == "awards") {
2024-02-23 00:56:21 +08:00
// Get Date format
if ($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
switch ($custom_date_format) {
2024-02-23 00:56:21 +08:00
case 'd/m/y':
$usethisformat = 'D/MM/YY';
break;
case 'd/m/Y':
$usethisformat = 'D/MM/YYYY';
break;
case 'm/d/y':
$usethisformat = 'MM/D/YY';
break;
case 'm/d/Y':
$usethisformat = 'MM/D/YYYY';
break;
case 'd.m.Y':
$usethisformat = 'D.MM.YYYY';
break;
case 'y/m/d':
$usethisformat = 'YY/MM/D';
break;
case 'Y-m-d':
$usethisformat = 'YYYY-MM-D';
break;
case 'M d, Y':
$usethisformat = 'MMM D, YYYY';
break;
case 'M d, y':
$usethisformat = 'MMM D, YY';
break;
}
2024-02-23 00:56:21 +08:00
?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
2022-12-01 00:17:19 +08:00
<?php if ($this->uri->segment(2) == "wwff") { ?>
<script>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
2024-02-23 00:56:21 +08:00
action: function(e, dt, node, config) {
dt.search('').draw();
2022-12-01 00:17:19 +08:00
}
};
$('#wwfftable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
2024-02-23 00:56:21 +08:00
"scrollY": "500px",
2022-12-01 00:17:19 +08:00
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
2022-12-01 00:17:19 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2024-02-23 00:56:21 +08:00
"order": [0, 'asc'],
2022-12-01 00:17:19 +08:00
dom: 'Bfrtip',
2024-02-23 00:56:21 +08:00
buttons: [{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
2022-12-01 00:17:19 +08:00
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2024-02-23 00:56:21 +08:00
$('[class*="buttons"]').css("color", "white");
}
2022-12-01 00:17:19 +08:00
</script>
<?php } else if ($this->uri->segment(2) == "pota") { ?>
<script>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
2024-02-23 00:56:21 +08:00
action: function(e, dt, node, config) {
dt.search('').draw();
2022-12-01 00:17:19 +08:00
}
};
$('#potatable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
2024-02-23 00:56:21 +08:00
"scrollY": "500px",
2022-12-01 00:17:19 +08:00
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
2022-12-01 00:17:19 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
2024-02-23 00:56:21 +08:00
"order": [0, 'asc'],
2022-12-01 00:17:19 +08:00
dom: 'Bfrtip',
2024-02-23 00:56:21 +08:00
buttons: [{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
2022-12-01 00:17:19 +08:00
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2024-02-23 00:56:21 +08:00
$('[class*="buttons"]').css("color", "white");
2022-12-01 00:17:19 +08:00
}
</script>
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
<?php } else if ($this->uri->segment(2) == "dok") { ?>
<script>
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
2024-02-23 00:56:21 +08:00
action: function(e, dt, node, config) {
dt.search('').draw();
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
}
};
$('#doktable').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
2024-02-23 00:56:21 +08:00
"scrollY": "500px",
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
"scrollCollapse": true,
2024-02-23 00:56:21 +08:00
"paging": false,
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
"scrollX": true,
2024-01-04 11:03:11 +08:00
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
},
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
dom: 'Bfrtip',
2024-02-23 00:56:21 +08:00
buttons: [{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
2024-02-23 00:56:21 +08:00
$('[class*="buttons"]').css("color", "white");
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-17 00:08:27 +08:00
}
</script>
2022-12-01 00:17:19 +08:00
<?php } ?>
<?php } ?>
2023-12-18 16:01:45 +08:00
<?php if ($this->uri->segment(1) == "user") { ?>
2023-12-01 01:11:22 +08:00
<!-- [MAP Custom] select list with icons -->
<script>
2024-02-23 00:56:21 +08:00
$(document).ready(function() {
$('.icon_selectBox').off('click').on('click', function() {
2023-12-01 01:11:22 +08:00
var boxcontent = $(this).attr('data-boxcontent');
2024-02-23 00:56:21 +08:00
if ($('.icon_selectBox_data[data-boxcontent="' + boxcontent + '"]').is(":hidden")) {
$('.icon_selectBox_data[data-boxcontent="' + boxcontent + '"]').show();
} else {
$('.icon_selectBox_data[data-boxcontent="' + boxcontent + '"]').hide();
}
});
$('.icon_selectBox_data').off('mouseleave').on('mouseleave', function() {
if ($(this).is(":visible")) {
$(this).hide();
}
2023-12-01 01:11:22 +08:00
});
2024-02-23 00:56:21 +08:00
$('.icon_selectBox_data label').off('click').on('click', function() {
2023-12-01 01:11:22 +08:00
var boxcontent = $(this).closest('.icon_selectBox_data').attr('data-boxcontent');
2024-02-23 00:56:21 +08:00
$('input[name="user_map_' + boxcontent + '_icon"]').attr('value', $(this).attr('data-value'));
2023-12-13 04:41:23 +08:00
if ($(this).attr('data-value') != "0") {
2024-02-23 00:56:21 +08:00
$('.user_icon_color[data-icon="' + boxcontent + '"]').show();
$('.icon_selectBox[data-boxcontent="' + boxcontent + '"] .icon_overSelect').html($(this).html());
2023-12-01 01:11:22 +08:00
} else {
2024-02-23 00:56:21 +08:00
$('.user_icon_color[data-icon="' + boxcontent + '"]').hide();
$('.icon_selectBox[data-boxcontent="' + boxcontent + '"] .icon_overSelect').html($(this).html().substring(0, 10) + '.');
2023-12-01 01:11:22 +08:00
}
2024-02-23 00:56:21 +08:00
$('.icon_selectBox_data[data-boxcontent="' + boxcontent + '"]').hide();
2023-12-13 04:41:23 +08:00
});
2023-12-18 16:01:45 +08:00
$('.collapse').on('shown.bs.collapse', function(e) {
var $card = $(this).closest('.accordion-item');
var $open = $($(this).data('parent')).find('.collapse.show');
2024-02-23 00:56:21 +08:00
2023-12-18 16:01:45 +08:00
var additionalOffset = 0;
2024-02-23 00:56:21 +08:00
if ($card.prevAll().filter($open.closest('.accordion-item')).length !== 0) {
additionalOffset = $open.height();
2023-12-18 16:01:45 +08:00
}
$('html,body').animate({
scrollTop: $card.offset().top - additionalOffset
}, 300);
});
2023-12-01 01:11:22 +08:00
});
</script>
2023-12-13 04:41:23 +08:00
<?php } ?>
2023-12-01 01:11:22 +08:00
<?php
2024-02-23 00:56:21 +08:00
if (isset($scripts) && is_array($scripts)) {
foreach ($scripts as $script) {
?><script type="text/javascript" src="<?php echo base_url() . $script; ?>"></script>
<?php
}
}
?>
2024-02-23 00:56:21 +08:00
<script>
<?php
echo "var lang_datatables_language = '" . lang("datatables_language") . "';"
?>
</script>
</body>
</html>