mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
WebSocket RadioName
This commit is contained in:
@@ -173,7 +173,9 @@ class Logbook_model extends CI_Model {
|
||||
$tx_power = null;
|
||||
}
|
||||
|
||||
if (($this->input->post('radio',TRUE) ?? 0) != 0) {
|
||||
if (($this->input->post('radio',TRUE) ?? '') == 'ws') { // WebSocket
|
||||
$radio_name=$this->input->post('radio_ws_name',TRUE);
|
||||
} elseif (($this->input->post('radio',TRUE) ?? 0) != 0) {
|
||||
$this->load->model('cat');
|
||||
$radio_name=$this->cat->radio_status($this->input->post('radio',TRUE))->row()->radio ?? '';
|
||||
} else {
|
||||
|
||||
@@ -409,6 +409,7 @@ if (typeof window.DX_WATERFALL_FIELD_MAP === 'undefined') {
|
||||
<option value="<?php echo $row->id; ?>" <?php if($this->session->userdata('radio') == $row->id && $manual_mode == '0') { echo "selected=\"selected\""; } ?>><?= __("Polling - ") . $row->radio; ?> <?php if ($radio_last_updated->id == $row->id) { echo "(".__("last updated").")"; } else { echo ''; } ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="hidden" id="radio_ws_name" name="radio_ws_name" value="" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
@@ -593,6 +593,11 @@ $(document).ready(function() {
|
||||
// Build icon with Bootstrap color class and ID for animation
|
||||
var icon = '<i id="radio-status-icon" class="fas fa-radio ' + iconClass + '" style="margin-right: 10px; font-size: 1.2em;"></i>';
|
||||
var html = baseStyle + icon + content + '</div>';
|
||||
if (($(".radios option:selected").val() == 'ws') && (data.radio != undefined)) { // Are we on websocket? add hiddenfield with radioName
|
||||
$("#radio_ws_name").val(data.radio);
|
||||
} else {
|
||||
$("#radio_ws_name").val('');
|
||||
}
|
||||
|
||||
// Update DOM based on global CAT_COMPACT_MODE setting
|
||||
if (window.CAT_COMPACT_MODE === 'icon-only') {
|
||||
|
||||
Reference in New Issue
Block a user