From c1ad629d95d80c83ab5ab3f482130715f7a05981 Mon Sep 17 00:00:00 2001 From: fusionate Date: Fri, 8 Dec 2023 01:41:01 +0000 Subject: [PATCH] Operator Panel - Consistify refresh button, minor adjustments. --- app/basic_operator_panel/index.php | 20 ++++++++----------- .../resources/content.php | 10 ++++++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/basic_operator_panel/index.php b/app/basic_operator_panel/index.php index 54d04a4763..153c6a9494 100644 --- a/app/basic_operator_panel/index.php +++ b/app/basic_operator_panel/index.php @@ -349,11 +349,11 @@ unset($refresh_default); //refresh controls function refresh_stop() { clearInterval(interval_timer_id); - if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "\"<?php\" title=\"\">"; } + if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "'button','title'=>$text['label-refresh_enable'],'icon'=>'pause','onclick'=>'refresh_start()']); ?>"; } } function refresh_start() { - if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "\"<?php\" title=\"\">"; } + if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()']); ?>"; } refresh_stop(); interval_timer_id = setInterval( function() { url = source_url; @@ -405,7 +405,7 @@ unset($refresh_default); if (ext != '' && chan_uuid != '') { cmd = get_eavesdrop_cmd(ext, chan_uuid, document.getElementById('eavesdrop_dest').value); if (cmd != '') { - send_cmd(cmd) + send_cmd(cmd); } } } @@ -430,7 +430,7 @@ unset($refresh_default); } xmlhttp.open("GET",url,false); xmlhttp.send(null); - document.getElementById('cmd_reponse').innerHTML=xmlhttp.responseText; + document.getElementById('cmd_response').innerHTML=xmlhttp.responseText; } //hide/show destination input field @@ -588,15 +588,11 @@ if (is_array($_SESSION['user']['extension'])) { } } -?> - -
- -

- -\n"; +echo "\n"; +echo "

\n"; //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/app/basic_operator_panel/resources/content.php b/app/basic_operator_panel/resources/content.php index bb220e1b64..7489dba58e 100644 --- a/app/basic_operator_panel/resources/content.php +++ b/app/basic_operator_panel/resources/content.php @@ -154,8 +154,8 @@ echo " \n"; echo " \n"; echo " \n"; echo " \n"; -echo " \n"; if (permission_exists('operator_panel_eavesdrop')) { @@ -164,8 +164,10 @@ if (permission_exists('operator_panel_eavesdrop')) { echo " \n"; echo " \n"; echo " \n"; }
\n"; -echo " \"".$text['label-refresh_pause']."\"\n"; +echo " \n"; +echo " ".button::create(['type'=>'button','title'=>$text['label-refresh_pause'],'icon'=>'sync-alt fa-spin','onclick'=>'refresh_stop()']).""; echo "