mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #3001 from int2001/toggle_qso_map
Add option to disable Map at QSO-Window
This commit is contained in:
@@ -99,6 +99,13 @@ class QSO extends CI_Controller {
|
|||||||
$data['user_station_to_qso_tab'] = 0;
|
$data['user_station_to_qso_tab'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$qkey_opt = $this->user_options_model->get_options('qso_tab', array('option_name' => 'map', 'option_key' => 'show'))->result();
|
||||||
|
if (count($qkey_opt) > 0) {
|
||||||
|
$data['user_qso_show_map'] = $qkey_opt[0]->option_value;
|
||||||
|
} else {
|
||||||
|
$data['user_qso_show_map'] = 1; // default: show map
|
||||||
|
}
|
||||||
|
|
||||||
// Get status of DX Waterfall enable option
|
// Get status of DX Waterfall enable option
|
||||||
$qkey_opt=$this->user_options_model->get_options('dxwaterfall',array('option_name'=>'enable','option_key'=>'boolean'))->result();
|
$qkey_opt=$this->user_options_model->get_options('dxwaterfall',array('option_name'=>'enable','option_key'=>'boolean'))->result();
|
||||||
if (count($qkey_opt)>0) {
|
if (count($qkey_opt)>0) {
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ class User extends CI_Controller {
|
|||||||
$data['user_sig_to_qso_tab'] = $this->input->post('user_sig_to_qso_tab');
|
$data['user_sig_to_qso_tab'] = $this->input->post('user_sig_to_qso_tab');
|
||||||
$data['user_dok_to_qso_tab'] = $this->input->post('user_dok_to_qso_tab');
|
$data['user_dok_to_qso_tab'] = $this->input->post('user_dok_to_qso_tab');
|
||||||
$data['user_station_to_qso_tab'] = $this->input->post('user_station_to_qso_tab');
|
$data['user_station_to_qso_tab'] = $this->input->post('user_station_to_qso_tab');
|
||||||
|
$data['user_qso_show_map'] = $this->input->post('user_qso_show_map') ?? 1;
|
||||||
$data['user_language'] = $this->input->post('user_language');
|
$data['user_language'] = $this->input->post('user_language');
|
||||||
$data['global_oqrs_text'] = $this->input->post('global_oqrs_text') ?? '';
|
$data['global_oqrs_text'] = $this->input->post('global_oqrs_text') ?? '';
|
||||||
$data['oqrs_grouped_search'] = $this->input->post('oqrs_grouped_search') ?? 'off';
|
$data['oqrs_grouped_search'] = $this->input->post('oqrs_grouped_search') ?? 'off';
|
||||||
@@ -312,7 +313,8 @@ class User extends CI_Controller {
|
|||||||
$this->input->post('oqrs_grouped_search_show_station_name') ?? 'off',
|
$this->input->post('oqrs_grouped_search_show_station_name') ?? 'off',
|
||||||
$this->input->post('oqrs_auto_matching') ?? 'on',
|
$this->input->post('oqrs_auto_matching') ?? 'on',
|
||||||
$this->input->post('oqrs_direct_auto_matching') ?? 'on',
|
$this->input->post('oqrs_direct_auto_matching') ?? 'on',
|
||||||
$this->input->post('user_dxwaterfall_enable') ?? 'N',
|
$this->input->post('user_dxwaterfall_enable') ?? 'N',
|
||||||
|
$this->input->post('user_qso_show_map') ?? 1,
|
||||||
$this->input->post('clubstation') == '1' ? true : false)
|
$this->input->post('clubstation') == '1' ? true : false)
|
||||||
) {
|
) {
|
||||||
// Check for errors
|
// Check for errors
|
||||||
@@ -714,7 +716,7 @@ class User extends CI_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->input->post('user_dashboard_map')) {
|
if($this->input->post('user_dashboard_map')) {
|
||||||
$data['user_dashboard_map'] = $this->input->post('user_dashboard_map', false);
|
$data['user_dashboard_map'] = $this->input->post('user_dashboard_map', true);
|
||||||
} else {
|
} else {
|
||||||
$dkey_opt=$this->user_options_model->get_options('dashboard',array('option_name'=>'show_map','option_key'=>'boolean'), $this->uri->segment(3))->result();
|
$dkey_opt=$this->user_options_model->get_options('dashboard',array('option_name'=>'show_map','option_key'=>'boolean'), $this->uri->segment(3))->result();
|
||||||
if (count($dkey_opt)>0) {
|
if (count($dkey_opt)>0) {
|
||||||
@@ -822,6 +824,17 @@ class User extends CI_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->input->post('user_qso_show_map') !== false) {
|
||||||
|
$data['user_qso_show_map'] = $this->input->post('user_qso_show_map', true);
|
||||||
|
} else {
|
||||||
|
$qkey_opt = $this->user_options_model->get_options('qso_tab', array('option_name' => 'map', 'option_key' => 'show'), $this->uri->segment(3))->result();
|
||||||
|
if (count($qkey_opt) > 0) {
|
||||||
|
$data['user_qso_show_map'] = $qkey_opt[0]->option_value;
|
||||||
|
} else {
|
||||||
|
$data['user_qso_show_map'] = 1; // default: show
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($this->input->post('global_oqrs_text')) {
|
if($this->input->post('global_oqrs_text')) {
|
||||||
$data['global_oqrs_text'] = $this->input->post('global_oqrs_text', false);
|
$data['global_oqrs_text'] = $this->input->post('global_oqrs_text', false);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ class User_Model extends CI_Model {
|
|||||||
$user_lotw_name, $user_lotw_password, $user_eqsl_name, $user_eqsl_password, $user_clublog_name, $user_clublog_password,
|
$user_lotw_name, $user_lotw_password, $user_eqsl_name, $user_eqsl_password, $user_clublog_name, $user_clublog_password,
|
||||||
$user_winkey, $on_air_widget_enabled, $on_air_widget_display_last_seen, $on_air_widget_show_only_most_recent_radio,
|
$user_winkey, $on_air_widget_enabled, $on_air_widget_display_last_seen, $on_air_widget_show_only_most_recent_radio,
|
||||||
$qso_widget_display_qso_time, $dashboard_banner, $dashboard_solar, $global_oqrs_text, $oqrs_grouped_search,
|
$qso_widget_display_qso_time, $dashboard_banner, $dashboard_solar, $global_oqrs_text, $oqrs_grouped_search,
|
||||||
$oqrs_grouped_search_show_station_name, $oqrs_auto_matching, $oqrs_direct_auto_matching,$user_dxwaterfall_enable, $clubstation = 0) {
|
$oqrs_grouped_search_show_station_name, $oqrs_auto_matching, $oqrs_direct_auto_matching,$user_dxwaterfall_enable, $user_qso_show_map, $clubstation = 0) {
|
||||||
// Check that the user isn't already used
|
// Check that the user isn't already used
|
||||||
if(!$this->exists($username)) {
|
if(!$this->exists($username)) {
|
||||||
$data = array(
|
$data = array(
|
||||||
@@ -317,6 +317,7 @@ class User_Model extends CI_Model {
|
|||||||
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'widget','qso','display_qso_time','".(xss_clean($qso_widget_display_qso_time ?? 'false'))."');");
|
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'widget','qso','display_qso_time','".(xss_clean($qso_widget_display_qso_time ?? 'false'))."');");
|
||||||
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'qso_db_search_priority','enable','boolean','".(xss_clean($user_qso_db_search_priority ?? 'Y'))."');");
|
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'qso_db_search_priority','enable','boolean','".(xss_clean($user_qso_db_search_priority ?? 'Y'))."');");
|
||||||
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'dxwaterfall','enable','boolean','".xss_clean($user_dxwaterfall_enable ?? 'N')."');");
|
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'dxwaterfall','enable','boolean','".xss_clean($user_dxwaterfall_enable ?? 'N')."');");
|
||||||
|
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (?, 'qso_tab', 'map', 'show', ?)", [$insert_id, (int)(xss_clean($user_qso_show_map ?? 1))]);
|
||||||
return OK;
|
return OK;
|
||||||
} else {
|
} else {
|
||||||
return EUSERNAMEEXISTS;
|
return EUSERNAMEEXISTS;
|
||||||
@@ -382,6 +383,8 @@ class User_Model extends CI_Model {
|
|||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','sig','show',".(xss_clean($fields['user_sig_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','sig','show',".(xss_clean($fields['user_sig_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','dok','show',".(xss_clean($fields['user_dok_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','dok','show',".(xss_clean($fields['user_dok_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','station','show',".(xss_clean($fields['user_station_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','station','show',".(xss_clean($fields['user_station_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");");
|
||||||
|
$this->db->query("replace INTO user_options (user_id, option_type, option_name, option_key, option_value) VALUES (?, 'qso_tab', 'map', 'show', ?)", [$fields['id'], (int)(xss_clean($fields['user_qso_show_map'] ?? 1))]
|
||||||
|
);
|
||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','enabled','".(xss_clean($fields['on_air_widget_enabled'] ?? 'false'))."');");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','enabled','".(xss_clean($fields['on_air_widget_enabled'] ?? 'false'))."');");
|
||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_last_seen','".(xss_clean($fields['on_air_widget_display_last_seen'] ?? 'false'))."');");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_last_seen','".(xss_clean($fields['on_air_widget_display_last_seen'] ?? 'false'))."');");
|
||||||
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_only_most_recent_radio','".(xss_clean($fields['on_air_widget_show_only_most_recent_radio'] ?? 'true'))."');");
|
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_only_most_recent_radio','".(xss_clean($fields['on_air_widget_show_only_most_recent_radio'] ?? 'true'))."');");
|
||||||
|
|||||||
@@ -820,7 +820,7 @@ if (typeof window.DX_WATERFALL_FIELD_MAP === 'undefined') {
|
|||||||
<div id="radio_status"></div>
|
<div id="radio_status"></div>
|
||||||
|
|
||||||
<!-- QSO Map -->
|
<!-- QSO Map -->
|
||||||
<div class="card qso-map">
|
<div class="card qso-map"<?php if (!($user_qso_show_map ?? true)) { echo ' style="display:none;"'; } ?>>
|
||||||
<div id="qsomap" class="map-leaflet" style="width: 100%; height: 200px;"></div>
|
<div id="qsomap" class="map-leaflet" style="width: 100%; height: 200px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -688,6 +688,14 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><?= __("Show Fields on QSO Tab"); ?></div>
|
<div class="card-header"><?= __("Show Fields on QSO Tab"); ?></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="qsoShowMap"><?= __("Show map at QSO-Window"); ?></label>
|
||||||
|
<?php if(!isset($user_qso_show_map)) { $user_qso_show_map = 1; } ?>
|
||||||
|
<select class="form-select" id="qsoShowMap" name="user_qso_show_map">
|
||||||
|
<option value="1" <?php if ($user_qso_show_map == 1) { echo 'selected="selected"'; } ?>><?= __("Show"); ?></option>
|
||||||
|
<option value="0" <?php if ($user_qso_show_map == 0) { echo 'selected="selected"'; } ?>><?= __("Don't show"); ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="references_select"><?= __("The enabled items will be shown on the QSO tab rather than the General tab."); ?></label>
|
<label for="references_select"><?= __("The enabled items will be shown on the QSO tab rather than the General tab."); ?></label>
|
||||||
|
|||||||
Reference in New Issue
Block a user