From 9f0fd7c657ed245ede6db007638333873bd50cc8 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sat, 10 Jun 2017 22:29:29 -0400 Subject: [PATCH] Working on custom staff panel color schemes --- admin/admin_settings.php | 300 +++++++++++++++++++++++ install/mods-for-hesk/sql/installSql.php | 57 +++++ language/en/text.php | 17 +- 3 files changed, 372 insertions(+), 2 deletions(-) diff --git a/admin/admin_settings.php b/admin/admin_settings.php index 92494d60..44213e79 100644 --- a/admin/admin_settings.php +++ b/admin/admin_settings.php @@ -3770,6 +3770,306 @@ $modsForHesk_settings = mfh_getSettings(); +
+
+
+

+
+
+ + +
+ +
+
+
+
+
+

+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+

+
+
+ + +
+ +
+
+
+
+
+

+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+

diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php index 6419ff5a..e706ebf7 100644 --- a/install/mods-for-hesk/sql/installSql.php +++ b/install/mods-for-hesk/sql/installSql.php @@ -1015,5 +1015,62 @@ function execute310Scripts() { executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) VALUES ('login_box_header_image', '')"); executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'rtl'"); + // Copy over color presets to the custom values + $theme_preset_rs = executeQuery("SELECT `Value` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'admin_color_scheme'"); + if (hesk_dbNumRows($theme_preset_rs) === 0) { + $theme = 'skin-blue'; + } else { + $theme_preset_row = hesk_dbFetchAssoc($theme_preset_rs); + $theme = $theme_preset_row['Value']; + } + + $navbar = array( + 'background' => '', + 'text' => '', + 'text_hover' => '', + 'background_hover' => '' + ); + $navbar_brand = array( + 'background' => '', + 'text' => '', + 'text_hover' => '', + 'background_hover' => '' + ); + $sidebar = array( + 'background' => '', + 'text' => '', + 'text_hover' => '', + 'background_hover' => '' + ); + $sidebar_header = array( + 'background' => '', + 'text' => '', + 'text_hover' => '', + 'background_hover' => '' + ); + if ($theme == 'skin-blue') { + $navbar['background'] = ''; + $navbar['text'] = ''; + $navbar['text_hover'] = ''; + $navbar['background_hover'] = ''; + + $navbar_brand['background'] = ''; + $navbar_brand['text'] = ''; + $navbar_brand['text_hover'] = ''; + $navbar_brand['background_hover'] = ''; + + $sidebar['background'] = ''; + $sidebar['text'] = ''; + $sidebar['text_hover'] = ''; + $sidebar['background_hover'] = ''; + + $sidebar_header['background'] = ''; + $sidebar_header['text'] = ''; + $sidebar_header['text_hover'] = ''; + $sidebar_header['background_hover'] = ''; + } elseif ($theme = 'skin-blue-light') { + + } + updateVersion('3.1.0'); } \ No newline at end of file diff --git a/language/en/text.php b/language/en/text.php index d564379c..218e32dc 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -1609,13 +1609,13 @@ $hesklang['changeLanguage'] = 'Change language to'; // ADDED OR MODIFIED IN Mods For HESK 1.4.0 $hesklang['navbarBackgroundColor'] = 'Navbar Background Color'; -$hesklang['navbarBackgroundColorHelp'] = 'The main color of the top navigation bar. This applies to both the client and staff-side.'; +$hesklang['navbarBackgroundColorHelp'] = 'The main color of the top navigation bar. This applies only to the client-side.'; $hesklang['navbarBrandColor'] = 'Navbar Brand Color'; $hesklang['navbarBrandColorHelp'] = 'The text color of the \'brand\' on the left (also the name of the Help Desk).'; $hesklang['navbarBrandHoverColor'] = 'Navbar Brand Hover Color'; $hesklang['navbarBrandHoverColorHelp'] = 'The text color of the \'brand\' on the left when the use moves their mouse over the text.'; $hesklang['navbarItemTextColor'] = 'Navbar Item Text Color'; -$hesklang['navbarItemTextColorHelp'] = 'The text color of the navigation items on the navigation bar (by default \'Home\', \'Ticket\', and \'Knowledgebase\' are the three items on the client-side).'; +$hesklang['navbarItemTextColorHelp'] = 'The text color of the navigation items on the navigation bar.'; $hesklang['navbarItemTextHoverColor'] = 'Navbar Item Text Hover Color'; $hesklang['navbarItemTextHoverColorHelp'] = 'The text color of the navigation items on the navigation bar when the user hovers over one of the items.'; $hesklang['navbarItemTextSelectedColor'] = 'Navbar Item Text Selected Color'; @@ -2139,6 +2139,19 @@ $hesklang['login_background_color'] = 'Login Background Color'; // Input field i $hesklang['login_background_image'] = 'Login Background Image'; // Input field information for screen-readers. Does not appear on-screen $hesklang['login_box_header'] = 'Login Box Header'; $hesklang['login_header_image'] = 'Login Header Image'; // Input field information for screen-readers. Does not appear on-screen +$hesklang['background_color'] = 'Background Color'; +$hesklang['background_color_help'] = 'The background color.'; +$hesklang['text_color'] = 'Text Color'; +$hesklang['text_color_help'] = 'The text color'; +$hesklang['text_hover_color'] = 'Hover Color: Text'; +$hesklang['text_hover_color_help'] = 'The text color when hovering over a link'; +$hesklang['background_hover_color'] = 'Hover Color: Background'; +$hesklang['background_hover_color_help'] = 'The background color when hovering over a link'; +$hesklang['navbar'] = 'Navigation Bar'; +$hesklang['navbar_brand'] = 'Navigation Brand'; +$hesklang['sidebar'] = 'Sidebar'; +$hesklang['sidebar_header'] = 'Sidebar Header'; + // DO NOT CHANGE BELOW if (!defined('IN_SCRIPT')) die('PHP syntax OK!');