kopia lustrzana https://github.com/magicbug/Cloudlog
commit
6f098c13a8
|
|
@ -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 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_oqrs_options_have_been_saved'] = 'OQRS options have been saved.';
|
||||
|
||||
$lang['options_save'] = 'Save';
|
||||
$lang['options_dxcluster'] = 'DXCluster';
|
||||
$lang['options_dxcluster_provider'] = 'Provider of DXClusterCache';
|
||||
$lang['options_dxcluster_longtext'] = 'The Provider of the DXCluster-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';
|
||||
|
|
|
|||
|
|
@ -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_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 DXCluster-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';
|
||||
|
|
|
|||
|
|
@ -933,9 +933,26 @@ $(document).on('keypress',function(e) {
|
|||
|
||||
<?php if ($this->uri->segment(1) == "qso") { ?>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
if ($this->optionslib->get_option('dxcache_url') != ''){ ?>
|
||||
<script type="text/javascript">
|
||||
var dxcluster_provider =' <?php echo $this->optionslib->get_option('dxcache_url'); ?>';
|
||||
$(document).ready(function() {
|
||||
$("#check_cluster").on("click", function() {
|
||||
$.ajax({ url: dxcluster_provider+"/spot/"+$("#frequency").val()/1000, cache: false, dataType: "json" }).done(
|
||||
function(dxspot) {
|
||||
$("#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);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
<div class="container settings">
|
||||
|
||||
<div class="row">
|
||||
<!-- Nav Start -->
|
||||
<?php $this->load->view('options/sidebar') ?>
|
||||
<!-- Nav End -->
|
||||
|
||||
<!-- Content -->
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-header"><h2><?php echo $page_title; ?> - <?php echo $sub_heading; ?></h2></div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('success')) { ?>
|
||||
<!-- Display Success Message -->
|
||||
<div class="alert alert-success">
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->session->flashdata('message')) { ?>
|
||||
<!-- Display Message -->
|
||||
<div class="alert-message error">
|
||||
<?php echo $this->session->flashdata('message'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(validation_errors()) { ?>
|
||||
<div class="alert alert-danger">
|
||||
<a class="close" data-dismiss="alert">x</a>
|
||||
<?php echo validation_errors(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo form_open('options/dxcluster_save'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="globalSearch"><?php echo lang('options_dxcluster_provider'); ?></label>
|
||||
<p><?php echo lang('options_dxcluster_longtext'); ?></p>
|
||||
<input type="text" name="dxcache_url" class="form-control" id="dxcache_url" aria-describedby="dxcache_urlHelp" value="<?php echo $this->optionslib->get_option('dxcache_url'); ?>">
|
||||
<small id="dxcache_urlHelp" class="form-text text-muted"><?php echo lang('options_dxcluster_hint'); ?></small>
|
||||
</div>
|
||||
|
||||
<!-- Save the Form -->
|
||||
<input class="btn btn-primary" type="submit" value="<?php echo lang('options_save'); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -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/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/dxcluster'); ?>"><?php echo lang('options_dxcluster'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<!-- Callsign Input -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-9">
|
||||
<label for="callsign"><?php echo lang('gen_hamradio_callsign'); ?></label>
|
||||
<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>
|
||||
<small id="callsign_info" class="badge badge-secondary"></small> <small id="lotw_info" class="badge badge-success"></small>
|
||||
</div>
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue