Moved DXCluster-Cache-Settings from config-file to Admin page
这个提交包含在:
		
							父节点
							
								
									1857151ba4
								
							
						
					
					
						当前提交
						9783cf0ec3
					
				
					共有  7 个文件被更改,包括 58 次插入 和 18 次删除
				
			
		|  | @ -598,16 +598,3 @@ $config['rewrite_short_tags'] = FALSE; | ||||||
| | Array:		array('10.0.1.200', '192.168.5.0/24') | | Array:		array('10.0.1.200', '192.168.5.0/24') | ||||||
| */ | */ | ||||||
| $config['proxy_ips'] = ''; | $config['proxy_ips'] = ''; | ||||||
| 
 |  | ||||||
| /* |  | ||||||
| |-------------------------------------------------------------------------- |  | ||||||
| | DXCluster-API Base-URL |  | ||||||
| |-------------------------------------------------------------------------- |  | ||||||
| | |  | ||||||
| | If you have access to a DXCluster-API ( see https://github.com/int2001/DXClusterAPI for running your own ) |  | ||||||
| | put the base-URL for that API here |  | ||||||
| | |  | ||||||
| | Example:			'https://log.jo30.de/dxcache' |  | ||||||
| | Leave blank to disable:	'' |  | ||||||
| */ |  | ||||||
| $config['dxcluster_provider']=''; |  | ||||||
|  |  | ||||||
|  | @ -136,6 +136,43 @@ class Options extends CI_Controller { | ||||||
| 		} | 		} | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | 	// function used to display the /dxcluster url
 | ||||||
|  | 	function dxcluster() { | ||||||
|  | 			$data['page_title'] = $this->lang->line('options_cloudlog_options'); | ||||||
|  | 			$data['sub_heading'] = $this->lang->line('options_dxcluster_settings'); | ||||||
|  | 
 | ||||||
|  | 			$this->load->view('interface_assets/header', $data); | ||||||
|  | 			$this->load->view('options/dxcluster'); | ||||||
|  | 			$this->load->view('interface_assets/footer'); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// Handles saving the DXCluster options to the options system.
 | ||||||
|  | 	function dxcluster_save() { | ||||||
|  | 
 | ||||||
|  | 		// Get Language Options
 | ||||||
|  | 
 | ||||||
|  | 		$data['page_title'] = $this->lang->line('options_cloudlog_options'); | ||||||
|  | 		$data['sub_heading'] = $this->lang->line('options_dxcluster_settings'); | ||||||
|  | 
 | ||||||
|  | 		$this->load->helper(array('form', 'url')); | ||||||
|  | 
 | ||||||
|  | 		$this->load->library('form_validation'); | ||||||
|  | 
 | ||||||
|  | 		$this->form_validation->set_rules('dxcache_url', 'URL of DXCache', 'valid_url'); | ||||||
|  | 
 | ||||||
|  | 		if ($this->form_validation->run() == FALSE) { | ||||||
|  | 			$this->load->view('interface_assets/header', $data); | ||||||
|  | 			$this->load->view('options/dxcluster'); | ||||||
|  | 			$this->load->view('interface_assets/footer'); | ||||||
|  | 		} else { | ||||||
|  | 			$dxcache_url_update = $this->optionslib->update('dxcache_url', $this->input->post('dxcache_url'), 'yes'); | ||||||
|  | 			if($dxcache_url_update == TRUE) { | ||||||
|  | 				$this->session->set_flashdata('success', $this->lang->line('options_dxcache_url_changed_to').$this->input->post('dxcache_url')); | ||||||
|  | 			} | ||||||
|  | 			redirect('/options/dxcluster'); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 		// function used to display the /radio url
 | 		// function used to display the /radio url
 | ||||||
| 		function radio() { | 		function radio() { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -58,4 +58,11 @@ $lang['options_grouped_search'] = 'Grouped search'; | ||||||
| $lang['options_when_this_is_on_all_station_locations_with_oqrs_active_will_be_searched_at_once'] = 'When this is on, all station locations with OQRS active, will be searched at once.'; | $lang['options_when_this_is_on_all_station_locations_with_oqrs_active_will_be_searched_at_once'] = 'When this is on, all station locations with OQRS active, will be searched at once.'; | ||||||
| $lang['options_oqrs_options_have_been_saved'] = 'OQRS options have been saved.'; | $lang['options_oqrs_options_have_been_saved'] = 'OQRS options have been saved.'; | ||||||
| 
 | 
 | ||||||
|  | $lang['options_dxcluster'] = 'DXCluster'; | ||||||
|  | $lang['options_dxcluster_provider'] = 'Provider of DXClusterCache'; | ||||||
|  | $lang['options_dxcluster_longtext'] = 'The Provider of the DXCluister-Cache. You can set up your own Cache with <a href="https://github.com/int2001/DXClusterAPI">DXClusterAPI</a> or use a public one'; | ||||||
|  | $lang['options_dxcluster_hint'] = 'URL of the DXCluster-Cache. e.g. https://dxc.jo30.de/dxcache'; | ||||||
|  | $lang['options_dxcluster_settings'] = 'DXCluster'; | ||||||
|  | $lang['options_dxcache_url_changed_to'] = 'DXCluster Cache URL changed to '; | ||||||
|  | 
 | ||||||
| $lang['options_save'] = 'Save'; | $lang['options_save'] = 'Save'; | ||||||
|  | @ -58,4 +58,12 @@ $lang['options_grouped_search'] = 'Gruppierte Suche'; | ||||||
| $lang['options_when_this_is_on_all_station_locations_with_oqrs_active_will_be_searched_at_once'] = 'Wenn aktiviert, werden alle Stationsstandorte auf einmal durchsucht.'; | $lang['options_when_this_is_on_all_station_locations_with_oqrs_active_will_be_searched_at_once'] = 'Wenn aktiviert, werden alle Stationsstandorte auf einmal durchsucht.'; | ||||||
| $lang['options_oqrs_options_have_been_saved'] = 'OQRS options have been saved.'; | $lang['options_oqrs_options_have_been_saved'] = 'OQRS options have been saved.'; | ||||||
| 
 | 
 | ||||||
|  | $lang['options_dxcluster'] = 'DXCluster'; | ||||||
|  | $lang['options_dxcluster_provider'] = 'Provider des DXClusterCache'; | ||||||
|  | $lang['options_dxcluster_longtext'] = 'Der Provider des  DXCluister-Caches. Du kannst Deinen eigenen Cache mit <a href="https://github.com/int2001/DXClusterAPI">DXClusterAPI</a> aufsetzen, oder einen öffentlichen nutzen'; | ||||||
|  | $lang['options_dxcluster_hint'] = 'URL des DXCluster-Caches. z.B. https://dxc.jo30.de/dxcache'; | ||||||
|  | $lang['options_dxcluster_settings'] = 'DXCluster'; | ||||||
|  | $lang['options_dxcache_url_changed_to'] = 'DXCluster Cache URL geänder zu '; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| $lang['options_save'] = 'Speichern'; | $lang['options_save'] = 'Speichern'; | ||||||
|  |  | ||||||
|  | @ -935,9 +935,9 @@ $(document).on('keypress',function(e) { | ||||||
| <script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script> | <script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script> | ||||||
| <?php | <?php | ||||||
| 
 | 
 | ||||||
| 	if ($this->config->item('dxcluster_provider') != ''){ ?>
 | 	if ($this->optionslib->get_option('dxcache_url') != ''){ ?>
 | ||||||
| 	<script type="text/javascript"> | 	<script type="text/javascript"> | ||||||
| 		var dxcluster_provider =' <?php echo $this->config->item('dxcluster_provider'); ?>'; | 		var dxcluster_provider =' <?php echo $this->optionslib->get_option('dxcache_url'); ?>'; | ||||||
| 		$(document).ready(function() { | 		$(document).ready(function() { | ||||||
| 			$("#check_cluster").on("click", function() { | 			$("#check_cluster").on("click", function() { | ||||||
| 				$.ajax({ url: dxcluster_provider+"/spot/"+$("#frequency").val()/1000, cache: false, dataType: "json" }).done( | 				$.ajax({ url: dxcluster_provider+"/spot/"+$("#frequency").val()/1000, cache: false, dataType: "json" }).done( | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
| 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/radio'); ?>"><?php echo lang('options_radios'); ?></a></li>
 | 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/radio'); ?>"><?php echo lang('options_radios'); ?></a></li>
 | ||||||
| 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/email'); ?>"><?php echo lang('options_email'); ?></a></li>
 | 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/email'); ?>"><?php echo lang('options_email'); ?></a></li>
 | ||||||
| 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/oqrs'); ?>"><?php echo lang('options_oqrs'); ?></a></li>
 | 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/oqrs'); ?>"><?php echo lang('options_oqrs'); ?></a></li>
 | ||||||
|  | 			<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/dxcluster'); ?>"><?php echo lang('options_dxcluster'); ?></a></li>
 | ||||||
| 		</ul> | 		</ul> | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
|  | @ -63,7 +63,7 @@ | ||||||
|               <!-- Callsign Input --> |               <!-- Callsign Input --> | ||||||
|               <div class="form-row"> |               <div class="form-row"> | ||||||
|                 <div class="form-group col-md-9"> |                 <div class="form-group col-md-9"> | ||||||
|                   <label for="callsign"><?php echo lang('gen_hamradio_callsign'); ?></label><?php if ($this->config->item('dxcluster_provider') != '') { ?> <i id="check_cluster" data-toggle="tooltip" data-original-title="Search DXCluster for latest Spot" class="fas fa-search"></i> <?php } ?>
 |                   <label for="callsign"><?php echo lang('gen_hamradio_callsign'); ?></label><?php if ($this->optionslib->get_option('dxcache_url') != '') { ?> <i id="check_cluster" data-toggle="tooltip" data-original-title="Search DXCluster for latest Spot" class="fas fa-search"></i> <?php } ?>
 | ||||||
|                   <input type="text" class="form-control" id="callsign" name="callsign" required> |                   <input type="text" class="form-control" id="callsign" name="callsign" required> | ||||||
|                   <small id="callsign_info" class="badge badge-secondary"></small> <small id="lotw_info" class="badge badge-success"></small> |                   <small id="callsign_info" class="badge badge-secondary"></small> <small id="lotw_info" class="badge badge-success"></small> | ||||||
|                 </div> |                 </div> | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用