mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
use global options for 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');
|
||||
|
||||
@@ -37,6 +37,8 @@ switch ($date_format) {
|
||||
var lang_invalid_ant_el = "<?= __("Invalid value for antenna elevation:"); ?>";
|
||||
var latlng=[<?php echo $lat.','.$lng;?>];
|
||||
var user_date_format = "<?php echo $date_format; ?>"; // Pass the user's date format to JavaScript
|
||||
var dxcluster_default_decont = "<?php echo $dxcluster_default_decont; ?>"; // used in dxwaterfall.js
|
||||
var dxcluster_default_maxage = "<?php echo $dxcluster_default_maxage; ?>"; // used in dxwaterfall.js
|
||||
</script>
|
||||
|
||||
<!--- DX Waterfall --->
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user