Dashboard - Add gradient background color settings (#6972)
* Dashboard - Add gradient background color setting
This commit is contained in:
parent
8657a68d7e
commit
66b57a7784
|
|
@ -102,12 +102,12 @@
|
|||
//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.";' ".($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";
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_call_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['header-call_forward']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
echo "<div style='width: 275px; height: 150px; padding-top: 7px'><canvas id='call_forward_chart'></canvas></div>\n";
|
||||
echo "<div class='hud_chart' style='width: 275px;'><canvas id='call_forward_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const call_forward_chart = new Chart(\n";
|
||||
|
|
@ -192,11 +192,12 @@
|
|||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$stats['call_forward']."</span>";
|
||||
echo " <span class='hud_stat'>".$stats['call_forward']."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_call_forward_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";
|
||||
|
|
@ -247,7 +248,8 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>\n";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_call_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>\n";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@
|
|||
$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.";' ".($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";
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_domain_limits_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['label-domain_limits']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
echo "<div style='width: 275px; height: 150px; padding-top: 7px;'><canvas id='domain_limits_chart'></canvas></div>\n";
|
||||
echo "<div class='hud_chart' style='width: 275px';><canvas id='domain_limits_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const domain_limits_chart = new Chart(\n";
|
||||
|
|
@ -174,11 +174,12 @@
|
|||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$hud_stat_used."</span>";
|
||||
echo " <span class='hud_stat'>".$hud_stat_used."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_domain_limits_details'>";
|
||||
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
|
|
@ -239,7 +240,8 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_domain_limits_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,12 +173,12 @@
|
|||
//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.";' ".($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";
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['label-caller_id_number']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
echo "<div style='width: 275px; height: 150px; padding-top: 7px;'><canvas id='caller_id_chart'></canvas></div>\n";
|
||||
echo "<div class='hud_chart' style='width: 275px;'><canvas id='caller_id_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const caller_id_chart = new Chart(\n";
|
||||
|
|
@ -238,11 +238,12 @@
|
|||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$stats['undefined']."</span>";
|
||||
echo " <span class='hud_stat'>".$stats['undefined']."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n";
|
||||
|
||||
echo "<div class='hud_details hud_box' id='hud_caller_id_details' style='text-align: right;'>";
|
||||
|
|
@ -310,7 +311,8 @@
|
|||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_caller_id_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,13 +153,12 @@
|
|||
//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.";' ".($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";
|
||||
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['header-ring-group-forward']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
echo " <div style='width: 275px; height: 150px; padding-top: 7px;'><canvas id='ring_group_forward_chart'></canvas></div>\n";
|
||||
echo " <div class='hud_chart' style='width: 275px;'><canvas id='ring_group_forward_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const ring_group_forward_chart = new Chart(\n";
|
||||
|
|
@ -223,11 +222,12 @@
|
|||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$stats['forwarding']."</span>";
|
||||
echo " <span class='hud_stat'>".$stats['forwarding']."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
if (permission_exists('ring_group_forward')) {
|
||||
echo "<form id='form_list_ring_group_forward' method='post' action='".$validated_path."'>\n";
|
||||
}
|
||||
|
|
@ -246,7 +246,7 @@
|
|||
echo "<th class='hud_heading'>".$text['label-destination']."</th>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
//data
|
||||
//data
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$x = 0;
|
||||
foreach ($result as $row) {
|
||||
|
|
@ -307,7 +307,8 @@
|
|||
echo "</form>\n";
|
||||
}
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -76,13 +76,14 @@
|
|||
$registrations = $registration->count();
|
||||
}
|
||||
|
||||
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";
|
||||
//show the content
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_switch_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['label-switch_status']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
//add doughnut chart
|
||||
?>
|
||||
<div style='height: 150px; padding-top: 7px;'><canvas id='switch_status_chart'></canvas></div>
|
||||
<div class='hud_chart'><canvas id='switch_status_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const switch_status_chart = new Chart(
|
||||
|
|
@ -123,11 +124,11 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='padding-bottom: 27px; color: ".$dashboard_number_text_color.";'>".$registrations."</span>";
|
||||
echo " <span class='hud_stat'>".$registrations."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//show the content
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_switch_status_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -175,7 +176,8 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_switch_status_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_switch_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -295,13 +295,13 @@
|
|||
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.";' ".($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";
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_counts_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_counts']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
//add doughnut chart
|
||||
?>
|
||||
<div style='height: 150px; padding-top: 7px;'><canvas id='system_counts_chart'></canvas></div>
|
||||
<div class='hud_chart'><canvas id='system_counts_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const system_counts_chart = new Chart(
|
||||
|
|
@ -355,11 +355,12 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$domain_total."</span>";
|
||||
echo " <span class='hud_stat'>".$domain_total."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
}
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_system_counts_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -499,6 +500,7 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_counts_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>\n";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_counts_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>\n";
|
||||
}
|
||||
echo "</div>\n";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -50,13 +50,14 @@
|
|||
|
||||
}
|
||||
|
||||
//add half doughnut chart
|
||||
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";
|
||||
//show the content
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-cpu_usage']."</span>\n";
|
||||
|
||||
//add half doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
?>
|
||||
<div style='width: 175px; height: 143px;'><canvas id='system_cpu_status_chart'></canvas></div>
|
||||
<div class='hud_chart' style='width: 175px;'><canvas id='system_cpu_status_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const system_cpu_status_chart = new Chart(
|
||||
|
|
@ -113,11 +114,11 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo "<span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".round($percent_cpu)."%</span>";
|
||||
echo "<span class='hud_stat'>".round($percent_cpu)."%</span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
//show the content
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_system_cpu_status_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -165,7 +166,8 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@
|
|||
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.";' ".($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";
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
?>
|
||||
<div style='width: 175px; height: 143px;'><canvas id='system_status_chart'></canvas></div>
|
||||
<div class='hud_chart' style='width: 175px;'><canvas id='system_status_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const system_status_chart = new Chart(
|
||||
|
|
@ -95,12 +95,13 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".round($percent_disk_usage)."%</span>";
|
||||
echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_system_status_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -227,6 +228,7 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_status_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
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>";
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_voicemail_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\">".$text['label-new_messages']."</span>";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
//add doughnut chart
|
||||
?>
|
||||
<div style='width: 150px; height: 150px; padding-top: 7px;'><canvas id='new_messages_chart'></canvas></div>
|
||||
<div class='hud_chart'><canvas id='new_messages_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const new_messages_chart = new Chart(
|
||||
|
|
@ -101,10 +101,11 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='padding-bottom: 27px; color: ".$dashboard_number_text_color.";'>".$messages['new']."</span>";
|
||||
echo " <span class='hud_stat'>".$messages['new']."</span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_voicemail_details'>";
|
||||
if (sizeof($voicemails) > 0) {
|
||||
echo "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>";
|
||||
|
|
@ -138,7 +139,9 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_voicemail_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_voicemail_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -90,13 +90,13 @@
|
|||
//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.";' ".($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>";
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_missed_calls_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' 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") {
|
||||
//add doughnut chart
|
||||
?>
|
||||
<div style='height: 150px; padding-top: 7px;'><canvas id='missed_calls_chart'></canvas></div>
|
||||
<div class='hud_chart'><canvas id='missed_calls_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const missed_calls_chart = new Chart(
|
||||
|
|
@ -139,10 +139,11 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo "<span class='hud_stat' style='padding-bottom: 27px; color: ".$dashboard_number_text_color.";'>".$num_rows."</span>";
|
||||
echo "<span class='hud_stat'>".$num_rows."</span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_missed_calls_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -203,7 +204,8 @@
|
|||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_missed_calls_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -87,14 +87,14 @@
|
|||
//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.";' ".($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";
|
||||
echo "<div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_recent_calls_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title' onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php';\">".$text['label-recent_calls']."</span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
//add doughnut chart
|
||||
?>
|
||||
|
||||
<div style='width: 150px; height: 150px; padding-top: 7px;'><canvas id='recent_calls_chart'></canvas></div>
|
||||
<div class='hud_chart'><canvas id='recent_calls_chart'></canvas></div>
|
||||
|
||||
<script>
|
||||
const recent_calls_chart = new Chart(
|
||||
|
|
@ -137,10 +137,11 @@
|
|||
<?php
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo "<span class='hud_stat' style='padding-bottom: 27px; color: ".$dashboard_number_text_color.";'>".$num_rows."</span>";
|
||||
echo "<span class='hud_stat'>".$num_rows."</span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_recent_calls_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -174,7 +175,6 @@
|
|||
|
||||
//determine name
|
||||
$cdr_name = ($row['direction'] == 'inbound' || ($row['direction'] == 'local' && !empty($assigned_extensions) && is_array($assigned_extensions) && in_array($row['destination_number'], $assigned_extensions))) ? $row['caller_id_name'] : $row['destination_number'];
|
||||
|
||||
//determine number to display
|
||||
if ($row['direction'] == 'inbound' || ($row['direction'] == 'local' && !empty($assigned_extensions) && is_array($assigned_extensions) && in_array($row['destination_number'], $assigned_extensions))) {
|
||||
$cdr_number = (is_numeric($row['caller_id_number'])) ? format_phone($row['caller_id_number']) : $row['caller_id_number'];
|
||||
|
|
@ -184,7 +184,6 @@
|
|||
$cdr_number = (is_numeric($row['destination_number'])) ? format_phone($row['destination_number']) : $row['destination_number'];
|
||||
$dest = $row['destination_number'];
|
||||
}
|
||||
|
||||
//set click-to-call variables
|
||||
if (permission_exists('click_to_call_call')) {
|
||||
$tr_link = "onclick=\"send_cmd('".PROJECT_PATH."/app/click_to_call/click_to_call.php".
|
||||
|
|
@ -200,19 +199,18 @@
|
|||
"');\" ".
|
||||
"style='cursor: pointer;'";
|
||||
}
|
||||
|
||||
//show the icon, caller details and date time
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."' style='cursor: help; padding: 0 0 0 6px;'>\n";
|
||||
//determine call result and appropriate icon
|
||||
echo "<td valign='middle' class='".$row_style[$c]."' style='cursor: help; padding: 0 0 0 6px;'>\n";
|
||||
if ($theme_cdr_images_exist) {
|
||||
$label_call_status = (isset($text['label-'.$row['status']])) ? $text['label-'.$row['status']] : '';
|
||||
$call_result = $row['status'];
|
||||
if (isset($row['direction'])) {
|
||||
echo " <img src='".PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_".$row['direction']."_".urlencode($row['status']).".png' width='16' style='border: none;' title='".$text['label-'.$row['direction']].": ".$label_call_status."'>\n";
|
||||
echo "<img src='".PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_".$row['direction']."_".$call_result.".png' width='16' style='border: none;' title='".$text['label-'.$row['direction']].": ".$text['label-'.$call_result]."'>\n";
|
||||
}
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text' nowrap='nowrap'><a href='javascript:void(0);' ".(!empty($cdr_name) ? "title=\"".$cdr_name."\"" : null).">".($cdr_number ?? '')."</a></td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text' nowrap='nowrap'>".$start_date_time."</td>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text' nowrap='nowrap'><a href='javascript:void(0);' ".(!empty($cdr_name) ? "title=\"".$cdr_name."\"" : null).">".($cdr_number ?? '')."</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text' nowrap='nowrap'>".$start_date_time."</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
unset($cdr_name, $cdr_number);
|
||||
|
|
@ -225,7 +223,8 @@
|
|||
echo "<span style='display: block; margin: 6px 0 7px 0;'><a href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php'>".$text['label-view_all']."</a></span>\n";
|
||||
echo "</div>";
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_recent_calls_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -72,43 +72,46 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard path.';
|
||||
$z++;
|
||||
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_url';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard url.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon.';
|
||||
$z++;
|
||||
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_url';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard url.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard icon.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_chart_type';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the chart type.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_heading_background_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the heading background color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_heading_text_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the heading text color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_background_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_heading_background_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number text color.';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the heading background color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_text_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number text color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the background color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_detail_background_color';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the detail background color.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_column_span';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
|
||||
|
|
|
|||
|
|
@ -364,8 +364,8 @@ $text['label-dashboard_heading_background_color']['zh-cn'] = "";
|
|||
$text['label-dashboard_heading_background_color']['ja-jp'] = "";
|
||||
$text['label-dashboard_heading_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['description-dashboard_heading_background_color']['en-us'] = "Enter the dashboard widget heading background color";
|
||||
$text['description-dashboard_heading_background_color']['en-gb'] = "Enter the dashboard widget heading background color";
|
||||
$text['description-dashboard_heading_background_color']['en-us'] = "Enter the dashboard widget heading background color.";
|
||||
$text['description-dashboard_heading_background_color']['en-gb'] = "Enter the dashboard widget heading background color.";
|
||||
$text['description-dashboard_heading_background_color']['ar-eg'] = "";
|
||||
$text['description-dashboard_heading_background_color']['de-at'] = "";
|
||||
$text['description-dashboard_heading_background_color']['de-ch'] = "";
|
||||
|
|
@ -442,58 +442,6 @@ $text['description-dashboard_heading_text_color']['zh-cn'] = "输入仪表板小
|
|||
$text['description-dashboard_heading_text_color']['ja-jp'] = "ダッシュボード ウィジェットの見出しのテキストの色を入力します。";
|
||||
$text['description-dashboard_heading_text_color']['ko-kr'] = "대시보드 위젯 제목 텍스트 색상을 입력합니다.";
|
||||
|
||||
$text['label-dashboard_number_background_color']['en-us'] = "Number Background Color";
|
||||
$text['label-dashboard_number_background_color']['en-gb'] = "Number Background Color";
|
||||
$text['label-dashboard_number_background_color']['ar-eg'] = "";
|
||||
$text['label-dashboard_number_background_color']['de-at'] = "";
|
||||
$text['label-dashboard_number_background_color']['de-ch'] = "";
|
||||
$text['label-dashboard_number_background_color']['de-de'] = "";
|
||||
$text['label-dashboard_number_background_color']['el-gr'] = "";
|
||||
$text['label-dashboard_number_background_color']['es-cl'] = "";
|
||||
$text['label-dashboard_number_background_color']['es-mx'] = "";
|
||||
$text['label-dashboard_number_background_color']['fr-ca'] = "";
|
||||
$text['label-dashboard_number_background_color']['fr-fr'] = "";
|
||||
$text['label-dashboard_number_background_color']['he-il'] = "";
|
||||
$text['label-dashboard_number_background_color']['it-it'] = "";
|
||||
$text['label-dashboard_number_background_color']['nl-nl'] = "";
|
||||
$text['label-dashboard_number_background_color']['pl-pl'] = "";
|
||||
$text['label-dashboard_number_background_color']['pt-br'] = "";
|
||||
$text['label-dashboard_number_background_color']['pt-pt'] = "";
|
||||
$text['label-dashboard_number_background_color']['ro-ro'] = "";
|
||||
$text['label-dashboard_number_background_color']['ru-ru'] = "";
|
||||
$text['label-dashboard_number_background_color']['sv-se'] = "";
|
||||
$text['label-dashboard_number_background_color']['uk-ua'] = "";
|
||||
$text['label-dashboard_number_background_color']['tr-tr'] = "";
|
||||
$text['label-dashboard_number_background_color']['zh-cn'] = "";
|
||||
$text['label-dashboard_number_background_color']['ja-jp'] = "";
|
||||
$text['label-dashboard_number_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['description-dashboard_number_background_color']['en-us'] = "Enter the dashboard widget number background color.";
|
||||
$text['description-dashboard_number_background_color']['en-gb'] = "Enter the dashboard widget number background color.";
|
||||
$text['description-dashboard_number_background_color']['ar-eg'] = "";
|
||||
$text['description-dashboard_number_background_color']['de-at'] = "";
|
||||
$text['description-dashboard_number_background_color']['de-ch'] = "";
|
||||
$text['description-dashboard_number_background_color']['de-de'] = "";
|
||||
$text['description-dashboard_number_background_color']['el-gr'] = "";
|
||||
$text['description-dashboard_number_background_color']['es-cl'] = "";
|
||||
$text['description-dashboard_number_background_color']['es-mx'] = "";
|
||||
$text['description-dashboard_number_background_color']['fr-ca'] = "";
|
||||
$text['description-dashboard_number_background_color']['fr-fr'] = "";
|
||||
$text['description-dashboard_number_background_color']['he-il'] = "";
|
||||
$text['description-dashboard_number_background_color']['it-it'] = "";
|
||||
$text['description-dashboard_number_background_color']['nl-nl'] = "";
|
||||
$text['description-dashboard_number_background_color']['pl-pl'] = "";
|
||||
$text['description-dashboard_number_background_color']['pt-br'] = "";
|
||||
$text['description-dashboard_number_background_color']['pt-pt'] = "";
|
||||
$text['description-dashboard_number_background_color']['ro-ro'] = "";
|
||||
$text['description-dashboard_number_background_color']['ru-ru'] = "";
|
||||
$text['description-dashboard_number_background_color']['sv-se'] = "";
|
||||
$text['description-dashboard_number_background_color']['uk-ua'] = "";
|
||||
$text['description-dashboard_number_background_color']['tr-tr'] = "";
|
||||
$text['description-dashboard_number_background_color']['zh-cn'] = "";
|
||||
$text['description-dashboard_number_background_color']['ja-jp'] = "";
|
||||
$text['description-dashboard_number_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['label-dashboard_number_text_color']['en-us'] = "Number Text Color";
|
||||
$text['label-dashboard_number_text_color']['en-gb'] = "Number Text Color";
|
||||
$text['label-dashboard_number_text_color']['ar-eg'] = "رقم لون النص";
|
||||
|
|
@ -546,6 +494,110 @@ $text['description-dashboard_number_text_color']['zh-cn'] = "输入仪表板小
|
|||
$text['description-dashboard_number_text_color']['ja-jp'] = "ダッシュボード ウィジェット番号のテキストの色を入力します。";
|
||||
$text['description-dashboard_number_text_color']['ko-kr'] = "대시보드 위젯 번호 텍스트 색상을 입력하세요.";
|
||||
|
||||
$text['label-dashboard_background_color']['en-us'] = "Background Color";
|
||||
$text['label-dashboard_background_color']['en-gb'] = "Background Color";
|
||||
$text['label-dashboard_background_color']['ar-eg'] = "";
|
||||
$text['label-dashboard_background_color']['de-at'] = "";
|
||||
$text['label-dashboard_background_color']['de-ch'] = "";
|
||||
$text['label-dashboard_background_color']['de-de'] = "";
|
||||
$text['label-dashboard_background_color']['el-gr'] = "";
|
||||
$text['label-dashboard_background_color']['es-cl'] = "";
|
||||
$text['label-dashboard_background_color']['es-mx'] = "";
|
||||
$text['label-dashboard_background_color']['fr-ca'] = "";
|
||||
$text['label-dashboard_background_color']['fr-fr'] = "";
|
||||
$text['label-dashboard_background_color']['he-il'] = "";
|
||||
$text['label-dashboard_background_color']['it-it'] = "";
|
||||
$text['label-dashboard_background_color']['nl-nl'] = "";
|
||||
$text['label-dashboard_background_color']['pl-pl'] = "";
|
||||
$text['label-dashboard_background_color']['pt-br'] = "";
|
||||
$text['label-dashboard_background_color']['pt-pt'] = "";
|
||||
$text['label-dashboard_background_color']['ro-ro'] = "";
|
||||
$text['label-dashboard_background_color']['ru-ru'] = "";
|
||||
$text['label-dashboard_background_color']['sv-se'] = "";
|
||||
$text['label-dashboard_background_color']['uk-ua'] = "";
|
||||
$text['label-dashboard_background_color']['tr-tr'] = "";
|
||||
$text['label-dashboard_background_color']['zh-cn'] = "";
|
||||
$text['label-dashboard_background_color']['ja-jp'] = "";
|
||||
$text['label-dashboard_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['description-dashboard_background_color']['en-us'] = "Enter the dashboard widget background color.";
|
||||
$text['description-dashboard_background_color']['en-gb'] = "Enter the dashboard widget background color.";
|
||||
$text['description-dashboard_background_color']['ar-eg'] = "";
|
||||
$text['description-dashboard_background_color']['de-at'] = "";
|
||||
$text['description-dashboard_background_color']['de-ch'] = "";
|
||||
$text['description-dashboard_background_color']['de-de'] = "";
|
||||
$text['description-dashboard_background_color']['el-gr'] = "";
|
||||
$text['description-dashboard_background_color']['es-cl'] = "";
|
||||
$text['description-dashboard_background_color']['es-mx'] = "";
|
||||
$text['description-dashboard_background_color']['fr-ca'] = "";
|
||||
$text['description-dashboard_background_color']['fr-fr'] = "";
|
||||
$text['description-dashboard_background_color']['he-il'] = "";
|
||||
$text['description-dashboard_background_color']['it-it'] = "";
|
||||
$text['description-dashboard_background_color']['nl-nl'] = "";
|
||||
$text['description-dashboard_background_color']['pl-pl'] = "";
|
||||
$text['description-dashboard_background_color']['pt-br'] = "";
|
||||
$text['description-dashboard_background_color']['pt-pt'] = "";
|
||||
$text['description-dashboard_background_color']['ro-ro'] = "";
|
||||
$text['description-dashboard_background_color']['ru-ru'] = "";
|
||||
$text['description-dashboard_background_color']['sv-se'] = "";
|
||||
$text['description-dashboard_background_color']['uk-ua'] = "";
|
||||
$text['description-dashboard_background_color']['tr-tr'] = "";
|
||||
$text['description-dashboard_background_color']['zh-cn'] = "";
|
||||
$text['description-dashboard_background_color']['ja-jp'] = "";
|
||||
$text['description-dashboard_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['label-dashboard_detail_background_color']['en-us'] = "Detail Background Color";
|
||||
$text['label-dashboard_detail_background_color']['en-gb'] = "Detail Background Color";
|
||||
$text['label-dashboard_detail_background_color']['ar-eg'] = "";
|
||||
$text['label-dashboard_detail_background_color']['de-at'] = "";
|
||||
$text['label-dashboard_detail_background_color']['de-ch'] = "";
|
||||
$text['label-dashboard_detail_background_color']['de-de'] = "";
|
||||
$text['label-dashboard_detail_background_color']['el-gr'] = "";
|
||||
$text['label-dashboard_detail_background_color']['es-cl'] = "";
|
||||
$text['label-dashboard_detail_background_color']['es-mx'] = "";
|
||||
$text['label-dashboard_detail_background_color']['fr-ca'] = "";
|
||||
$text['label-dashboard_detail_background_color']['fr-fr'] = "";
|
||||
$text['label-dashboard_detail_background_color']['he-il'] = "";
|
||||
$text['label-dashboard_detail_background_color']['it-it'] = "";
|
||||
$text['label-dashboard_detail_background_color']['nl-nl'] = "";
|
||||
$text['label-dashboard_detail_background_color']['pl-pl'] = "";
|
||||
$text['label-dashboard_detail_background_color']['pt-br'] = "";
|
||||
$text['label-dashboard_detail_background_color']['pt-pt'] = "";
|
||||
$text['label-dashboard_detail_background_color']['ro-ro'] = "";
|
||||
$text['label-dashboard_detail_background_color']['ru-ru'] = "";
|
||||
$text['label-dashboard_detail_background_color']['sv-se'] = "";
|
||||
$text['label-dashboard_detail_background_color']['uk-ua'] = "";
|
||||
$text['label-dashboard_detail_background_color']['tr-tr'] = "";
|
||||
$text['label-dashboard_detail_background_color']['zh-cn'] = "";
|
||||
$text['label-dashboard_detail_background_color']['ja-jp'] = "";
|
||||
$text['label-dashboard_detail_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['description-dashboard_detail_background_color']['en-us'] = "Enter the dashboard widget detail background color.";
|
||||
$text['description-dashboard_detail_background_color']['en-gb'] = "Enter the dashboard widget detail background color.";
|
||||
$text['description-dashboard_detail_background_color']['ar-eg'] = "";
|
||||
$text['description-dashboard_detail_background_color']['de-at'] = "";
|
||||
$text['description-dashboard_detail_background_color']['de-ch'] = "";
|
||||
$text['description-dashboard_detail_background_color']['de-de'] = "";
|
||||
$text['description-dashboard_detail_background_color']['el-gr'] = "";
|
||||
$text['description-dashboard_detail_background_color']['es-cl'] = "";
|
||||
$text['description-dashboard_detail_background_color']['es-mx'] = "";
|
||||
$text['description-dashboard_detail_background_color']['fr-ca'] = "";
|
||||
$text['description-dashboard_detail_background_color']['fr-fr'] = "";
|
||||
$text['description-dashboard_detail_background_color']['he-il'] = "";
|
||||
$text['description-dashboard_detail_background_color']['it-it'] = "";
|
||||
$text['description-dashboard_detail_background_color']['nl-nl'] = "";
|
||||
$text['description-dashboard_detail_background_color']['pl-pl'] = "";
|
||||
$text['description-dashboard_detail_background_color']['pt-br'] = "";
|
||||
$text['description-dashboard_detail_background_color']['pt-pt'] = "";
|
||||
$text['description-dashboard_detail_background_color']['ro-ro'] = "";
|
||||
$text['description-dashboard_detail_background_color']['ru-ru'] = "";
|
||||
$text['description-dashboard_detail_background_color']['sv-se'] = "";
|
||||
$text['description-dashboard_detail_background_color']['uk-ua'] = "";
|
||||
$text['description-dashboard_detail_background_color']['tr-tr'] = "";
|
||||
$text['description-dashboard_detail_background_color']['zh-cn'] = "";
|
||||
$text['description-dashboard_detail_background_color']['ja-jp'] = "";
|
||||
$text['description-dashboard_detail_background_color']['ko-kr'] = "";
|
||||
|
||||
$text['label-dashboard_column_span']['en-us'] = "Column Span";
|
||||
$text['label-dashboard_column_span']['en-gb'] = "Column Span";
|
||||
$text['label-dashboard_column_span']['ar-eg'] = "العمود سبان";
|
||||
|
|
|
|||
|
|
@ -70,10 +70,11 @@
|
|||
$dashboard_url = $_POST["dashboard_url"] ?? '';
|
||||
$dashboard_groups = $_POST["dashboard_groups"] ?? '';
|
||||
$dashboard_chart_type = $_POST["dashboard_chart_type"] ?? '';
|
||||
$dashboard_heading_background_color = $_POST["dashboard_heading_background_color"] ?? '';
|
||||
$dashboard_heading_text_color = $_POST["dashboard_heading_text_color"] ?? '';
|
||||
$dashboard_number_background_color = $_POST["dashboard_number_background_color"] ?? '';
|
||||
$dashboard_heading_background_color = $_POST["dashboard_heading_background_color"] ?? '';
|
||||
$dashboard_number_text_color = $_POST["dashboard_number_text_color"] ?? '';
|
||||
$dashboard_background_color = $_POST["dashboard_background_color"] ?? '';
|
||||
$dashboard_detail_background_color = $_POST["dashboard_detail_background_color"] ?? '';
|
||||
$dashboard_column_span = $_POST["dashboard_column_span"] ?? '';
|
||||
$dashboard_details_state = $_POST["dashboard_details_state"] ?? '';
|
||||
$dashboard_order = $_POST["dashboard_order"] ?? '';
|
||||
|
|
@ -169,14 +170,25 @@
|
|||
}
|
||||
|
||||
//remove empty values and convert to json
|
||||
if (!empty($dashboard_number_background_color)) {
|
||||
if (is_array($dashboard_number_background_color)) {
|
||||
$dashboard_number_background_color = array_filter($dashboard_number_background_color);
|
||||
if (count($dashboard_number_background_color) > 0) {
|
||||
$dashboard_number_background_color = json_encode($dashboard_number_background_color);
|
||||
if (!empty($dashboard_background_color)) {
|
||||
if (is_array($dashboard_background_color)) {
|
||||
$dashboard_background_color = array_filter($dashboard_background_color);
|
||||
if (count($dashboard_background_color) > 0) {
|
||||
$dashboard_background_color = json_encode($dashboard_background_color);
|
||||
}
|
||||
else {
|
||||
$dashboard_number_background_color = '';
|
||||
$dashboard_background_color = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($dashboard_detail_background_color)) {
|
||||
if (is_array($dashboard_detail_background_color)) {
|
||||
$dashboard_detail_background_color = array_filter($dashboard_detail_background_color);
|
||||
if (count($dashboard_detail_background_color) > 0) {
|
||||
$dashboard_detail_background_color = json_encode($dashboard_detail_background_color);
|
||||
}
|
||||
else {
|
||||
$dashboard_detail_background_color = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -188,10 +200,11 @@
|
|||
$array['dashboard'][0]['dashboard_icon'] = $dashboard_icon;
|
||||
$array['dashboard'][0]['dashboard_url'] = $dashboard_url;
|
||||
$array['dashboard'][0]['dashboard_chart_type'] = $dashboard_chart_type;
|
||||
$array['dashboard'][0]['dashboard_heading_background_color'] = $dashboard_heading_background_color;
|
||||
$array['dashboard'][0]['dashboard_heading_text_color'] = $dashboard_heading_text_color;
|
||||
$array['dashboard'][0]['dashboard_number_background_color'] = $dashboard_number_background_color;
|
||||
$array['dashboard'][0]['dashboard_heading_background_color'] = $dashboard_heading_background_color;
|
||||
$array['dashboard'][0]['dashboard_number_text_color'] = $dashboard_number_text_color;
|
||||
$array['dashboard'][0]['dashboard_background_color'] = $dashboard_background_color;
|
||||
$array['dashboard'][0]['dashboard_detail_background_color'] = $dashboard_detail_background_color;
|
||||
$array['dashboard'][0]['dashboard_column_span'] = $dashboard_column_span;
|
||||
$array['dashboard'][0]['dashboard_details_state'] = $dashboard_details_state;
|
||||
$array['dashboard'][0]['dashboard_order'] = $dashboard_order;
|
||||
|
|
@ -240,10 +253,11 @@
|
|||
$sql .= " dashboard_icon, ";
|
||||
$sql .= " dashboard_url, ";
|
||||
$sql .= " dashboard_chart_type, ";
|
||||
$sql .= " dashboard_heading_background_color, ";
|
||||
$sql .= " dashboard_heading_text_color, ";
|
||||
$sql .= " dashboard_number_background_color, ";
|
||||
$sql .= " dashboard_heading_background_color, ";
|
||||
$sql .= " dashboard_number_text_color, ";
|
||||
$sql .= " dashboard_background_color, ";
|
||||
$sql .= " dashboard_detail_background_color, ";
|
||||
$sql .= " dashboard_column_span, ";
|
||||
$sql .= " dashboard_details_state, ";
|
||||
$sql .= " dashboard_order, ";
|
||||
|
|
@ -260,10 +274,11 @@
|
|||
$dashboard_icon = $row["dashboard_icon"];
|
||||
$dashboard_url = $row["dashboard_url"];
|
||||
$dashboard_chart_type = $row["dashboard_chart_type"];
|
||||
$dashboard_heading_background_color = $row["dashboard_heading_background_color"];
|
||||
$dashboard_heading_text_color = $row["dashboard_heading_text_color"];
|
||||
$dashboard_number_background_color = $row["dashboard_number_background_color"];
|
||||
$dashboard_heading_background_color = $row["dashboard_heading_background_color"];
|
||||
$dashboard_number_text_color = $row["dashboard_number_text_color"];
|
||||
$dashboard_background_color = $row["dashboard_background_color"];
|
||||
$dashboard_detail_background_color = $row["dashboard_detail_background_color"];
|
||||
$dashboard_column_span = $row["dashboard_column_span"];
|
||||
$dashboard_details_state = $row["dashboard_details_state"];
|
||||
$dashboard_order = $row["dashboard_order"];
|
||||
|
|
@ -292,8 +307,11 @@
|
|||
}
|
||||
|
||||
//convert the json to an array
|
||||
if (!empty($dashboard_number_background_color) && is_json($dashboard_number_background_color)) {
|
||||
$dashboard_number_background_color = json_decode($dashboard_number_background_color, true);
|
||||
if (!empty($dashboard_background_color) && is_json($dashboard_background_color)) {
|
||||
$dashboard_background_color = json_decode($dashboard_background_color, true);
|
||||
}
|
||||
if (!empty($dashboard_detail_background_color) && is_json($dashboard_detail_background_color)) {
|
||||
$dashboard_detail_background_color = json_decode($dashboard_detail_background_color, true);
|
||||
}
|
||||
|
||||
//add a default value to $dashboard_details_state
|
||||
|
|
@ -382,7 +400,8 @@
|
|||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-dashboard_name']."\n";
|
||||
echo $text['label-dashboard_name'] ?? '';
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dashboard_name' maxlength='255' value='".escape($dashboard_name)."'>\n";
|
||||
|
|
@ -535,17 +554,6 @@
|
|||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $text['label-dashboard_heading_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_heading_background_color' value='".escape($dashboard_heading_background_color)."'><br />\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_heading_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $text['label-dashboard_heading_text_color']."\n";
|
||||
|
|
@ -559,24 +567,12 @@
|
|||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $text['label-dashboard_number_background_color']."\n";
|
||||
echo $text['label-dashboard_heading_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
/*
|
||||
if (!empty($dashboard_number_background_color)) {
|
||||
if (is_array($dashboard_number_background_color)) {
|
||||
foreach($dashboard_number_background_color as $background_color) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_number_background_color[]' value='".escape($background_color)."'>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($dashboard_number_background_color) || count($dashboard_number_background_color) < 2) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_number_background_color[]' value=''>\n";
|
||||
}
|
||||
*/
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_number_background_color' value='".escape($dashboard_number_background_color)."'>\n";
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_heading_background_color' value='".escape($dashboard_heading_background_color)."'><br />\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_number_background_color']."\n";
|
||||
echo $text['description-dashboard_heading_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
|
@ -591,6 +587,48 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $text['label-dashboard_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
if (!empty($dashboard_background_color)) {
|
||||
if (is_array($dashboard_background_color)) {
|
||||
foreach($dashboard_background_color as $background_color) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_background_color[]' value='".escape($background_color)."'><br />\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($dashboard_background_color) || count($dashboard_background_color) < 2) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_background_color[]' value='' onclick=\"document.getElementById('second_input').style.display = 'block';\">\n";
|
||||
echo " <input id='second_input' style='display: none;' type='text' class='formfld colorpicker' name='dashboard_background_color[]'>\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo $text['label-dashboard_detail_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
if (!empty($dashboard_detail_background_color)) {
|
||||
if (is_array($dashboard_detail_background_color)) {
|
||||
foreach($dashboard_detail_background_color as $detail_background_color) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_detail_background_color[]' value='".escape($detail_background_color)."'><br />\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($dashboard_detail_background_color) || count($dashboard_detail_background_color) < 2) {
|
||||
echo " <input type='text' class='formfld colorpicker' name='dashboard_detail_background_color[]' value='' onclick=\"document.getElementById('detail_second_input').style.display = 'block';\">\n";
|
||||
echo " <input id='detail_second_input' style='display: none;' type='text' class='formfld colorpicker' name='dashboard_detail_background_color[]'>\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_detail_background_color']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-dashboard_column_span']."\n";
|
||||
|
|
|
|||
|
|
@ -75,10 +75,11 @@
|
|||
$sql .= "dashboard_url, \n";
|
||||
$sql .= "dashboard_icon, \n";
|
||||
$sql .= "dashboard_chart_type, \n";
|
||||
$sql .= "dashboard_heading_background_color, \n";
|
||||
$sql .= "dashboard_heading_text_color, \n";
|
||||
$sql .= "dashboard_number_background_color, \n";
|
||||
$sql .= "dashboard_heading_background_color, \n";
|
||||
$sql .= "dashboard_number_text_color, \n";
|
||||
$sql .= "dashboard_background_color, \n";
|
||||
$sql .= "dashboard_detail_background_color, \n";
|
||||
$sql .= "dashboard_column_span, \n";
|
||||
$sql .= "dashboard_details_state, \n";
|
||||
$sql .= "dashboard_order, \n";
|
||||
|
|
@ -218,17 +219,54 @@
|
|||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-gap: 1rem;
|
||||
grid-column: auto;
|
||||
}
|
||||
|
||||
div.hud_container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding-bottom: 13px;
|
||||
}
|
||||
|
||||
div.hud_chart {
|
||||
height: 150px;
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
span.hud_stat { padding-bottom: 27px; }
|
||||
|
||||
/* Dashboard settings */
|
||||
<?php
|
||||
foreach($dashboard as $row) {
|
||||
$dashboard_name = str_replace(" ", "_", strtolower($row['dashboard_name']));
|
||||
$background_color = json_decode($row['dashboard_background_color'], true);
|
||||
$detail_background_color = json_decode($row['dashboard_detail_background_color'], true);
|
||||
echo "#".$dashboard_name." .hud_box .hud_container {";
|
||||
echo " background: ".$background_color[0].";";
|
||||
echo " background-image: linear-gradient(to right, ".$background_color[1]." 0%, ".$background_color[0]." 30%, ".$background_color[0]." 70%, ".$background_color[1]." 100%);";
|
||||
echo "}";
|
||||
echo "#".$dashboard_name." .hud_box .hud_title {";
|
||||
echo " color: ".$row['dashboard_heading_text_color'].";";
|
||||
echo " background-color: ".$row['dashboard_heading_background_color'].";";
|
||||
echo "}";
|
||||
echo "#".$dashboard_name." .hud_box .hud_stat {";
|
||||
echo " color: ".$row['dashboard_number_text_color'].";";
|
||||
echo "}";
|
||||
echo "#".$dashboard_name." .hud_box .hud_details {";
|
||||
echo " background: ".$detail_background_color[0].";";
|
||||
echo " background-image: linear-gradient(to right, ".$detail_background_color[1]." 0%, ".$detail_background_color[0]." 30%, ".$detail_background_color[0]." 70%, ".$detail_background_color[1]." 100%);";
|
||||
echo "}";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
/* Screen smaller than 575px? 1 columns */
|
||||
@media (max-width: 575px) {
|
||||
.widgets { grid-template-columns: repeat(1, minmax(100px, 1fr)); }
|
||||
.col-num { grid-column: span 1; }
|
||||
<?php
|
||||
foreach($dashboard as $row) {
|
||||
$dashboard_name = strtolower($row['dashboard_name']);
|
||||
$dashboard_name = str_replace(" ", "_", $dashboard_name);
|
||||
$dashboard_name = str_replace(" ", "_", strtolower($row['dashboard_name']));
|
||||
if (isset($dashboard_column_span) && is_numeric($dashboard_column_span)) {
|
||||
echo "#".$dashboard_name." {\n";
|
||||
echo " grid-column: span 1;\n";
|
||||
|
|
@ -244,13 +282,9 @@
|
|||
.col-num { grid-column: span 2; }
|
||||
<?php
|
||||
foreach($dashboard as $row) {
|
||||
$dashboard_name = strtolower($row['dashboard_name']);
|
||||
$dashboard_name = str_replace(" ", "_", $dashboard_name);
|
||||
$dashboard_column_span = 1;
|
||||
$dashboard_name = str_replace(" ", "_", strtolower($row['dashboard_name']));
|
||||
$dashboard_column_span = $row['dashboard_column_span'];
|
||||
if (is_numeric($dashboard_column_span)) {
|
||||
if ($row['dashboard_column_span'] > 2) {
|
||||
$dashboard_column_span = 2;
|
||||
}
|
||||
echo "#".$dashboard_name." {\n";
|
||||
echo " grid-column: span ".$dashboard_column_span.";\n";
|
||||
echo "}\n";
|
||||
|
|
@ -304,25 +338,31 @@
|
|||
.widgets { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
|
||||
.col-num { grid-column: span 2; }
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function toggle_grid_row_end(dashboard_name) {
|
||||
var widget = document.getElementById(dashboard_name);
|
||||
var current_row_end = widget.style.gridRowEnd;
|
||||
widget.style.gridRowEnd = (current_row_end == 'span 2') ? 'span 5' : 'span 2';
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
//include the dashboards
|
||||
echo "<div class='widgets' id='widgets' style='padding: 0 5px;'>\n";
|
||||
$x = 0;
|
||||
foreach($dashboard as $row) {
|
||||
$dashboard_name = $row['dashboard_name'];
|
||||
$dashboard_name = str_replace(" ", "_", strtolower($row['dashboard_name']));
|
||||
$dashboard_icon = $row['dashboard_icon'] ?? '';
|
||||
$dashboard_url = $row['dashboard_url'] ?? '';
|
||||
$dashboard_chart_type = $row['dashboard_chart_type'] ?? 'doughnut';
|
||||
$dashboard_heading_background_color = $row['dashboard_heading_background_color'] ?? $settings->get('theme', 'dashboard_heading_background_color');
|
||||
$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";
|
||||
$grid_row_end = ($dashboard_details_state == "expanded" || empty($dashboard_details_state)) ? "grid-row-end: span 5;" : "grid-row-end: span 2;";
|
||||
|
||||
echo "<div class='widget' style='".$grid_row_end."' id='".$dashboard_name."' draggable='false'>\n";
|
||||
include($row['dashboard_path']);
|
||||
echo "</div>\n";
|
||||
$x++;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,12 @@
|
|||
//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.";' ".($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 class='hud_container' ".($row['dashboard_details_state'] == "disabled" ?: "onclick=\"$('#hud_icon_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' 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'><i class=\"fas ".$dashboard_icon."\" style=\"font-size: 0.8em;\"></i></span></a>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($dashboard_detail_state != "disabled") {
|
||||
echo "<div class='hud_details hud_box' id='hud_icon_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
//echo "<span style='display: block; margin: 6px 0 7px 0;'><a href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?status=missed'>".$text['label-view_all']."</a></span>\n";
|
||||
echo "</div>";
|
||||
//$n++;
|
||||
}
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "</div>\n";
|
||||
|
|
|
|||
|
|
@ -2631,7 +2631,7 @@ else { //default: white
|
|||
$padding_top_bottom = (int) floor((100-$tmp) * 0.25);
|
||||
?>
|
||||
padding-top: <?php echo $padding_top_bottom.'px' ?>;
|
||||
padding-bottom: <?php echo ($padding_top_bottom).'px' ?>;
|
||||
padding-bottom: <?php echo $padding_top_bottom.'px' ?>;
|
||||
}
|
||||
|
||||
span.hud_stat:hover {
|
||||
|
|
|
|||
Loading…
Reference in New Issue