From 0f06ded327646c8ebb5e904cdb16ede1cf80898c Mon Sep 17 00:00:00 2001 From: fusionate Date: Tue, 3 Sep 2024 10:50:45 -0600 Subject: [PATCH] Dashboard: Resolve chart padding and label issue. --- core/dashboard/dashboard_edit.php | 22 +++++++++++----------- core/dashboard/index.php | 10 ++++++++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/core/dashboard/dashboard_edit.php b/core/dashboard/dashboard_edit.php index 1702932e97..91a57404e5 100644 --- a/core/dashboard/dashboard_edit.php +++ b/core/dashboard/dashboard_edit.php @@ -131,7 +131,7 @@ $dashboard_chart_type = preg_replace($text_pattern, '', $dashboard_chart_type); $dashboard_label_enabled = preg_replace($text_pattern, '', $dashboard_label_enabled); $dashboard_label_text_color = preg_replace($text_pattern, '', $dashboard_label_text_color); - $dashboard_label_text_color_hover = preg_replace($text_pattern, '', $dashboard_chart_type); + $dashboard_label_text_color_hover = preg_replace($text_pattern, '', $dashboard_label_text_color_hover); $dashboard_label_background_color = preg_replace($text_pattern, '', $dashboard_label_background_color); $dashboard_label_background_color_hover = preg_replace($text_pattern, '', $dashboard_label_background_color_hover); $dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color); @@ -346,7 +346,7 @@ $sql .= " dashboard_content_text_align, "; $sql .= " dashboard_content_details, "; $sql .= " dashboard_chart_type, "; - $sql .= " dashboard_label_enabled, "; + $sql .= " cast(dashboard_label_enabled as text), "; $sql .= " dashboard_label_text_color, "; $sql .= " dashboard_label_text_color_hover, "; $sql .= " dashboard_label_background_color, "; @@ -832,14 +832,14 @@ echo "\n"; if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') { echo " \n"; } else { echo " \n"; } echo "
\n"; @@ -847,7 +847,7 @@ echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_label_text_color']."\n"; echo "\n"; @@ -859,7 +859,7 @@ echo "\n"; if ($action == "add" || $dashboard_path == "dashboard/icon") { - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_label_text_color_hover']."\n"; echo "\n"; @@ -871,7 +871,7 @@ echo "\n"; } - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_label_background_color']."\n"; echo "\n"; @@ -883,7 +883,7 @@ echo "\n"; if ($action == "add" || $dashboard_path == "dashboard/icon") { - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_label_background_color_hover']."\n"; echo "\n"; @@ -1011,7 +1011,7 @@ echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_background_gradient_style']."\n"; echo "\n"; @@ -1025,7 +1025,7 @@ echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo $text['label-dashboard_background_gradient_angle']."\n"; echo "\n"; @@ -1184,4 +1184,4 @@ //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/core/dashboard/index.php b/core/dashboard/index.php index 36874d754b..dc2d95070f 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -325,6 +325,9 @@ foreach ($dashboard as $row) { echo "#".$dashboard_name." .hud_content {\n"; echo " align-content: center;\n"; echo "}\n"; + echo "#".$dashboard_name." .hud_chart {\n"; + echo " padding-top: 0;\n"; + echo "}\n"; } if ($row['dashboard_path'] == "dashboard/icon") { echo "#".$dashboard_name." div.hud_content,\n"; @@ -362,6 +365,10 @@ foreach ($dashboard as $row) { echo " height: 300.5px;\n"; echo "}\n"; break; + default: //if empty + echo "#".$dashboard_name." .hud_content {\n"; + echo " height: 195px;\n"; + echo "}\n"; } } @@ -661,5 +668,4 @@ function toggle_grid_row_end_all() { //show the footer require_once "resources/footer.php"; -?> - +?> \ No newline at end of file