Operator Panel: Add permission to show or hide (default) unregistered extensions.
This commit is contained in:
parent
07f532afab
commit
3f6fa8d2f9
|
|
@ -75,6 +75,14 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set if extensions are grouped by call_group when viewing all extensions.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0d3b16b0-5cd6-4d0e-8b58-967972362ef8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "operator_panel";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "show_unregistered";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether unregistered extensions are displayed or not.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a9ccd174-5ae1-4f90-8ee2-b79a183a04f8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "operator_panel_main_background_color";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -338,10 +338,16 @@ if (is_array($activity)) {
|
|||
}
|
||||
if ($found_count > 0) {
|
||||
//determine block style by state (if any) and register status
|
||||
$style = !empty($ext_state) ? "op_ext op_state_".$ext_state : "op_ext";
|
||||
$css_class = !empty($ext_state) ? "op_ext op_state_".$ext_state : "op_ext";
|
||||
}
|
||||
else {
|
||||
$style = "off_ext";
|
||||
//unregistered extension
|
||||
if (!empty($_SESSION['operator_panel']['$css_class']['boolean']) && $_SESSION['operator_panel']['$css_class']['boolean'] == 'true') {
|
||||
$css_class = "ur_ext";
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
unset($extension_number, $found_count, $array);
|
||||
|
||||
|
|
@ -430,15 +436,15 @@ if (is_array($activity)) {
|
|||
}
|
||||
|
||||
//build the list of extensions
|
||||
$block = "<div id='".escape($extension)."' class='".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(((empty($ext_state) || $ext_state != 'active') && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
||||
$block .= "<table class='".$style."'>\n";
|
||||
$block = "<div id='".escape($extension)."' class='".$css_class."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(((empty($ext_state) || $ext_state != 'active') && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
||||
$block .= "<table class='".$css_class."'>\n";
|
||||
$block .= " <tr>\n";
|
||||
$block .= " <td class='op_ext_icon'>\n";
|
||||
$block .= " <span name='".escape($extension)."'>\n"; // DRAG FROM
|
||||
$block .= "<img id='".escape($call_identifier)."' class='op_ext_icon' src='resources/images/status_".$status_icon.".png' title='".$status_hover."' ".(($draggable) ? "draggable='true' ondragstart=\"drag(event, this.parentNode.getAttribute('name'));\" onclick=\"virtual_drag('".escape($call_identifier)."', '".escape($extension)."');\"" : "onfocus='this.blur();' draggable='false' style='cursor: not-allowed;'").">\n";
|
||||
$block .= "</span>\n";
|
||||
$block .= " </td>\n";
|
||||
$block .= " <td class='op_ext_info ".$style."'>\n";
|
||||
$block .= " <td class='op_ext_info ".$css_class."'>\n";
|
||||
if ($dir_icon ?? '') {
|
||||
$block .= " <img src='resources/images/".$dir_icon.".png' align='right' style='margin-top: 3px; margin-right: 1px; width: 12px; height: 12px; cursor: help;' draggable='false' alt=\"".$text['label-call_direction']."\" title=\"".$text['label-call_direction']."\">\n";
|
||||
}
|
||||
|
|
@ -554,19 +560,19 @@ if (sizeof($user_extensions) > 0) {
|
|||
foreach ($valet_array as $row) {
|
||||
$extension = $row['extension'];
|
||||
$ext_state = 'active';
|
||||
$style = "op_ext op_valet_park_active";
|
||||
$css_class = "op_ext op_valet_park_active";
|
||||
$draggable = false;
|
||||
|
||||
//build the list of park extensions
|
||||
$valet_block .= "<div id='".escape($extension)."' class='".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'>\n"; // DRAG TO
|
||||
$valet_block .= "<table class='".$style."'>\n";
|
||||
$valet_block .= "<div id='".escape($extension)."' class='".$css_class."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'>\n"; // DRAG TO
|
||||
$valet_block .= "<table class='".$css_class."'>\n";
|
||||
$valet_block .= " <tr>\n";
|
||||
$valet_block .= " <td class='op_ext_icon'>\n";
|
||||
$valet_block .= " <span name='".escape($extension)."'>"; // DRAG FROM
|
||||
$valet_block .= "<img id='".escape($call_identifier)."' class='op_ext_icon' src='resources/images/status_".$status_icon.".png' title='".$status_hover."' ".(($draggable) ? "draggable='true' ondragstart=\"drag(event, this.parentNode.getAttribute('name'));\" onclick=\"virtual_drag('".escape($call_identifier)."', '".escape($extension)."');\"" : "onfocus='this.blur();' draggable='false' style='cursor: not-allowed;'").">\n";
|
||||
$valet_block .= "</span>\n";
|
||||
$valet_block .= " </td>\n";
|
||||
$valet_block .= " <td class='op_ext_info ".$style."'>\n";
|
||||
$valet_block .= " <td class='op_ext_info ".$css_class."'>\n";
|
||||
if ($dir_icon != '') {
|
||||
$valet_block .= " <img src='resources/images/".$dir_icon.".png' align='right' style='margin-top: 3px; margin-right: 1px; width: 12px; height: 12px; cursor: help;' draggable='false' alt=\"".$text['label-call_direction']."\" title=\"".$text['label-call_direction']."\">\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2339,7 +2339,7 @@ else { //default: white
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
div.off_ext {
|
||||
div.ur_ext {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 235px;
|
||||
|
|
@ -2359,20 +2359,20 @@ else { //default: white
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
div.off_ext:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
z-index: 10;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: <?=$form_table_field_background_color?>;
|
||||
opacity: 0.5;
|
||||
div.ur_ext:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
z-index: 10;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: <?=$form_table_field_background_color?>;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
div.op_state_active {
|
||||
|
|
@ -2393,7 +2393,7 @@ else { //default: white
|
|||
border-color: #B9A6FC;
|
||||
}
|
||||
|
||||
table.op_ext, table.off_ext {
|
||||
table.op_ext, table.ur_ext {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
-moz-border-radius: 5px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue