Dashboard - Add disabled option to details state (#6962)
* Dashboard - Add disabled option to details state
This commit is contained in:
parent
64e3a6792d
commit
5eead0d88a
|
|
@ -102,7 +102,7 @@
|
|||
//begin widget
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\">\n";
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_call_forward_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['header-call_forward']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
$hud_stat_title = $text['label-destinations'];
|
||||
}
|
||||
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\">\n";
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['label-domain_limits']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@
|
|||
//caller id
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_caller_id_details').slideToggle('fast');\">\n";
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['label-caller_id_number']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
//ring group forward
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\">\n";
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['header-ring-group-forward']."</span>\n";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
$registrations = $registration->count();
|
||||
}
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_switch_status_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_switch_status_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['label-switch_status']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@
|
|||
echo "<div class='hud_box'>\n";
|
||||
if ($show_stat) {
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_system_counts_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_counts_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_counts']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
|
||||
//add half doughnut chart
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-cpu_usage']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
if (!empty($percent_disk_usage)) {
|
||||
|
||||
//add half doughnut chart
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_system_status_details').slideToggle('fast');\">\n";
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_voicemail_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_voicemail_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\">".$text['label-new_messages']."</span>";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
//missed calls
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\">".$text['label-missed_calls']."</span>";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
//recent calls
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php';\">".$text['label-recent_calls']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
|
|
|
|||
|
|
@ -584,12 +584,6 @@
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <select name='dashboard_details_state' class='formfld'>\n";
|
||||
if ($dashboard_details_state == "hidden") {
|
||||
echo " <option value='hidden' selected='selected'>".$text['option-hidden']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='hidden'>".$text['option-hidden']."</option>\n";
|
||||
}
|
||||
if ($dashboard_details_state == "expanded") {
|
||||
echo " <option value='expanded' selected='selected'>".$text['option-expanded']."</option>\n";
|
||||
}
|
||||
|
|
@ -602,6 +596,18 @@
|
|||
else {
|
||||
echo " <option value='contracted'>".$text['option-contracted']."</option>\n";
|
||||
}
|
||||
if ($dashboard_details_state == "hidden") {
|
||||
echo " <option value='hidden' selected='selected'>".$text['option-hidden']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='hidden'>".$text['option-hidden']."</option>\n";
|
||||
}
|
||||
if ($dashboard_details_state == "disabled" || empty($dashboard_details_state)) {
|
||||
echo " <option value='disabled' selected='selected'>".$text['label-disabled']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='disabled'>".$text['label-disabled']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_details_state']."\n";
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
$expanded_all = true;
|
||||
if (is_array($dashboard) && @sizeof($dashboard) != 0) {
|
||||
foreach ($dashboard as $row) {
|
||||
if ($row['dashboard_details_state'] == 'contracted' || $row['dashboard_details_state'] == 'hidden') { $expanded_all = false; }
|
||||
if ($row['dashboard_details_state'] == 'contracted' || $row['dashboard_details_state'] == 'hidden' || $row['dashboard_details_state'] == 'disabled') { $expanded_all = false; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -266,6 +266,12 @@
|
|||
echo " display: none;\n";
|
||||
echo "}\n";
|
||||
}
|
||||
if ($row['dashboard_details_state'] == "disabled") {
|
||||
echo "#".$dashboard_name." .hud_box .hud_expander, \n";
|
||||
echo "#".$dashboard_name." .hud_box .hud_details {\n";
|
||||
echo " display: none;\n";
|
||||
echo "}\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
|
@ -315,6 +321,7 @@
|
|||
$dashboard_heading_text_color = $row['dashboard_heading_text_color'] ?? $settings->get('theme', 'dashboard_heading_text_color');
|
||||
$dashboard_number_background_color = $row['dashboard_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color');
|
||||
$dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color');
|
||||
$dashboard_details_state = $row['dashboard_details_state'];
|
||||
echo "<div class='widget' id='".str_replace(" ", "_", strtolower($dashboard_name))."' draggable='false'>\n";
|
||||
include($row['dashboard_path']);
|
||||
echo "</div>\n";
|
||||
|
|
@ -421,4 +428,4 @@
|
|||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
//dashboard icon
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' onclick=\"$('#hud_icon_details').slideToggle('fast');\">\n";
|
||||
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($row['dashboard_details_state'] == "disabled" ?: "onclick=\"$('#hud_icon_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".$dashboard_url."'\">". $dashboard_name . "</span>"; // (isset($text['label-'.$dashboard_name])) ? $text['label-'.$dashboard_name] : $dashboard_name
|
||||
echo " <a href='".$dashboard_url."'><span class='hud_stat' style='height: 150px; padding-bottom: 27px; color: ".$dashboard_number_text_color.";'><i class=\"fas ".$dashboard_icon."\" style=\"color: ".$dashboard_number_text_color."; font-size: 0.8em;\"></i></span></a>\n";
|
||||
echo "</div>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue