mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2511 from HB9HIL/use_glop_dxwaterfall
This commit is contained in:
@@ -92,8 +92,14 @@ class QSO extends CI_Controller {
|
||||
$qkey_opt=$this->user_options_model->get_options('dxwaterfall',array('option_name'=>'enable','option_key'=>'boolean'))->result();
|
||||
if (count($qkey_opt)>0) {
|
||||
$data['user_dxwaterfall_enable'] = $qkey_opt[0]->option_value;
|
||||
$data['dxcluster_default_decont'] = $this->optionslib->get_option('dxcluster_decont') ?? 'EU';
|
||||
$data['dxcluster_default_maxage'] = $this->optionslib->get_option('dxcluster_maxage') ?? 60;
|
||||
} else {
|
||||
$data['user_dxwaterfall_enable'] = 0;
|
||||
|
||||
// default but not used, prevent unset variable, without the need of a db call
|
||||
$data['dxcluster_default_decont'] = 'EU';
|
||||
$data['dxcluster_default_maxage'] = 60;
|
||||
}
|
||||
|
||||
$data['qso_count'] = $this->session->userdata('qso_page_last_qso_count');
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
var lang_dxwaterfall_spotted_by = "<?= __("by:"); ?>";
|
||||
|
||||
// DX Waterfall Configuration from User Options
|
||||
let dxwaterfall_decont = '<?php echo $this->optionslib->get_option('dxcluster_decont'); ?>';
|
||||
let dxwaterfall_maxage = '<?php echo $this->optionslib->get_option('dxcluster_maxage'); ?>';
|
||||
let dxcluster_default_decont = "<?php echo $dxcluster_default_decont; ?>";
|
||||
let dxcluster_default_maxage = "<?php echo $dxcluster_default_maxage; ?>";
|
||||
|
||||
// Helper function to safely check if optional field exists
|
||||
window.DX_WATERFALL_HAS_FIELD = function(fieldName) {
|
||||
|
||||
@@ -1267,8 +1267,8 @@ var dxWaterfall = {
|
||||
spotInfoDiv: null,
|
||||
spotTooltipDiv: null,
|
||||
lastSpotInfoKey: null,
|
||||
currentContinent: 'NA',
|
||||
currentMaxAge: 60,
|
||||
currentContinent: dxcluster_default_decont,
|
||||
currentMaxAge: dxcluster_default_maxage,
|
||||
|
||||
// ========================================
|
||||
// SPOT NAVIGATION STATE
|
||||
@@ -3297,9 +3297,9 @@ var dxWaterfall = {
|
||||
var age = 60; // minutes
|
||||
var de = this.currentContinent; // Use current continent (may have been cycled)
|
||||
|
||||
// Check if dxwaterfall_maxage is defined
|
||||
if (typeof dxwaterfall_maxage !== "undefined" && dxwaterfall_maxage != null) {
|
||||
age = dxwaterfall_maxage;
|
||||
// Check if dxcluster_default_maxage is defined
|
||||
if (typeof dxcluster_default_maxage !== "undefined" && dxcluster_default_maxage != null) {
|
||||
age = dxcluster_default_maxage;
|
||||
}
|
||||
|
||||
// Store current settings
|
||||
|
||||
Reference in New Issue
Block a user