From 37943912177b0d3277de3d2415c0df256f4762d6 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Tue, 19 Aug 2025 15:18:28 -0700 Subject: [PATCH] Dashboard Edit - Replace chart type dropdown with icon buttons (#7462) * Dashboard Edit - Replace chart type dropdown with buttons with icons * Update css.php * Update template.php --- core/dashboard/dashboard_edit.php | 37 ++++++++++++++++++++++--------- themes/default/css.php | 24 ++++++++++++++++++++ themes/default/template.php | 2 +- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/core/dashboard/dashboard_edit.php b/core/dashboard/dashboard_edit.php index 69c59fa0c6..cd371954fd 100644 --- a/core/dashboard/dashboard_edit.php +++ b/core/dashboard/dashboard_edit.php @@ -826,20 +826,37 @@ echo $text['label-dashboard_chart_type']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; if ($dashboard_chart_type == "icon" || in_array($dashboard_path, ['active_calls/active_calls', 'domains/domains', 'xml_cdr/missed_calls', 'voicemails/voicemails', 'xml_cdr/recent_calls', 'registrations/registrations'])) { - echo " \n"; + echo " \n"; + } + if ($dashboard_chart_type == 'line' || $dashboard_path == 'system/system_cpu_status') { + echo " \n"; } - echo " \n"; if ($dashboard_chart_type == "progress_bar" || $dashboard_path == "system/system_status") { - echo " \n"; + echo " \n"; } - echo " \n"; - echo "
\n"; + echo " \n"; echo $text['description-dashboard_chart_type']."\n"; echo "\n"; echo "\n"; diff --git a/themes/default/css.php b/themes/default/css.php index 15ddbdc50a..d5335f5caf 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -3206,6 +3206,30 @@ else { //default: white cursor: pointer; } +/* DASHBOARD EDIT **********************************************************************/ + + .chart_type_button { + padding: 8px 16px; + border: 1px solid rgba(0,0,0,0.1); + border-radius: 5px; + cursor: pointer; + display: flex; + align-items: center; + } + + .chart_type_button:has(input:checked) { + background-color: #F0F4FE; + border-color: #8EACF9; + } + + .chart_type_button:hover { + background-color: rgba(0,0,0,0.03); + } + + .chart_type_button i { + font-size: 15pt; + } + /* PLUGINS ********************************************************************/ /* bootstrap colorpicker */ diff --git a/themes/default/template.php b/themes/default/template.php index d962b13bb5..a5c582c4cc 100644 --- a/themes/default/template.php +++ b/themes/default/template.php @@ -20,7 +20,7 @@ - + {*//link to custom css file *} {if !empty($settings.theme.custom_css)}