Browse Source

Working on custom staff panel color schemes

tags/3.1.0
Mike Koch 2 years ago
parent
commit
9f0fd7c657
3 changed files with 372 additions and 2 deletions
  1. 300
    0
      admin/admin_settings.php
  2. 57
    0
      install/mods-for-hesk/sql/installSql.php
  3. 15
    2
      language/en/text.php

+ 300
- 0
admin/admin_settings.php View File

@@ -3770,6 +3770,306 @@ $modsForHesk_settings = mfh_getSettings();
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="col-sm-5 col-sm-offset-7 col-xs-12">
<h4><?php echo $hesklang['navbar']; ?></h4>
</div>
<div class="form-group">
<label for="admin-navbar-background-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_color']; ?>"
data-content="<?php echo $hesklang['background_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-background-color" name="admin-navbar-background-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_background_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="col-sm-5 col-sm-offset-7 col-xs-12">
<h4><?php echo $hesklang['navbar_brand']; ?></h4>
</div>
<div class="form-group">
<label for="admin-navbar-brand-background-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="left"
title="<?php echo $hesklang['background_color']; ?>"
data-content="<?php echo $hesklang['background_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-background-color" name="admin-navbar-brand-background-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_background_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_color']; ?>"
data-content="<?php echo $hesklang['text_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-text-color" name="admin-navbar-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_text_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_color']; ?>"
data-content="<?php echo $hesklang['text_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-text-color" name="admin-navbar-brand-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_text_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_hover_color']; ?>"
data-content="<?php echo $hesklang['text_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-text-color" name="admin-navbar-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_text_hover_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_hover_color']; ?>"
data-content="<?php echo $hesklang['text_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-text-color" name="admin-navbar-brand-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_text_hover_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-background-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_hover_color']; ?>"
data-content="<?php echo $hesklang['background_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-background-hover-color" name="admin-navbar-background-hover-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_background_hover_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-background-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_hover_color']; ?>"
data-content="<?php echo $hesklang['background_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-background-hover-color" name="admin-navbar-brand-background-hover-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_background_hover_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="col-sm-5 col-sm-offset-7 col-xs-12">
<h4><?php echo $hesklang['sidebar']; ?></h4>
</div>
<div class="form-group">
<label for="admin-navbar-background-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_color']; ?>"
data-content="<?php echo $hesklang['background_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-background-color" name="admin-navbar-background-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_background_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="col-sm-5 col-sm-offset-7 col-xs-12">
<h4><?php echo $hesklang['sidebar_header']; ?></h4>
</div>
<div class="form-group">
<label for="admin-navbar-brand-background-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="left"
title="<?php echo $hesklang['background_color']; ?>"
data-content="<?php echo $hesklang['background_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-background-color" name="admin-navbar-brand-background-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_background_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_color']; ?>"
data-content="<?php echo $hesklang['text_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-text-color" name="admin-navbar-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_text_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_color']; ?>"
data-content="<?php echo $hesklang['text_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-text-color" name="admin-navbar-brand-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_text_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_hover_color']; ?>"
data-content="<?php echo $hesklang['text_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-text-color" name="admin-navbar-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_text_hover_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-text-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['text_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['text_hover_color']; ?>"
data-content="<?php echo $hesklang['text_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-text-color" name="admin-navbar-brand-text-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_text_hover_color']; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-background-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_hover_color']; ?>"
data-content="<?php echo $hesklang['background_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-background-hover-color" name="admin-navbar-background-hover-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_background_hover_color']; ?>">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="admin-navbar-brand-background-hover-color"
class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['background_hover_color']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
data-placement="top"
title="<?php echo $hesklang['background_hover_color']; ?>"
data-content="<?php echo $hesklang['background_hover_color_help']; ?>"></i>
</label>

<div class="col-sm-5 col-xs-12">
<input type="text" id="admin-navbar-brand-background-hover-color" name="admin-navbar-brand-background-hover-color"
class="form-control"
value="<?php echo $modsForHesk_settings['admin_navbar_brand_background_hover_color']; ?>">
</div>
</div>
</div>
</div>
<h4><?php echo $hesklang['login_page']; ?></h4>
<div class="row">
<div class="col-xs-12">

+ 57
- 0
install/mods-for-hesk/sql/installSql.php View File

@@ -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');
}

+ 15
- 2
language/en/text.php View File

@@ -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!');

Loading…
Cancel
Save