From d05429ad4e30a6c53602dd99502b6b58c3552c63 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 27 May 2020 23:02:13 -0600 Subject: [PATCH] Theme: Header Bar updates. --- .../default_settings/default_setting_edit.php | 8 ++ core/default_settings/default_settings.php | 1 + core/domain_settings/domain_setting_edit.php | 9 +++ core/domain_settings/domain_settings.php | 1 + core/user_settings/user_setting_edit.php | 9 +++ core/user_settings/user_settings.php | 1 + resources/classes/menu.php | 20 +++-- themes/default/css.php | 81 ++++++++++++------- 8 files changed, 92 insertions(+), 38 deletions(-) diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 23e14ec725..3e9d154d64 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -628,6 +628,14 @@ echo " \n"; echo " \n"; } + elseif ($category == "theme" && $subcategory == "body_header_brand_type" && $name == "text" ) { + echo " \n"; + } elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) { echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; } @@ -685,6 +686,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; } + elseif ($category == "theme" && $subcategory == "body_header_brand_type" && $name == "text" ) { + echo " \n"; + } elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) { echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; } @@ -647,6 +648,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; } + else if ($user_setting_category == "theme" && $user_setting_subcategory == "body_header_brand_type" && $user_setting_name == "text" ) { + echo " \n"; + } else { echo " \n"; } diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php index d3f1b998c6..371f187078 100644 --- a/core/user_settings/user_settings.php +++ b/core/user_settings/user_settings.php @@ -272,6 +272,7 @@ ( $category == "theme" && $subcategory == "menu_brand_type" && $name == "text" ) || ( $category == "theme" && $subcategory == "menu_style" && $name == "text" ) || ( $category == "theme" && $subcategory == "menu_position" && $name == "text" ) || + ( $category == "theme" && $subcategory == "body_header_brand_type" && $name == "text" ) || ( $category == "theme" && $subcategory == "logo_align" && $name == "text" ) ) { echo " ".$text['label-'.escape($row['user_setting_value'])]; diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 8d2bb39a78..95a275d263 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1103,9 +1103,9 @@ if (!class_exists('menu')) { $html .= ""; $html .= "\n"; } - else { - $html .= " text['theme-label-expand_menu']."\">"; - } +// else { +// $html .= " text['theme-label-expand_menu']."\">"; +// } $html .= " \n"; //main menu items if (is_array($menu_array) && sizeof($menu_array) != 0) { @@ -1138,13 +1138,19 @@ if (!class_exists('menu')) { $content_container_onclick = "onclick=\"clearTimeout(menu_side_contract_timer); if ($(window).width() >= 576) { menu_side_contract(); }\""; } $html .= "
\n"; - $html .= "
\n"; + $html .= "
\n"; //header: left $html .= "
\n"; $html .= button::create(['type'=>'button','id'=>'menu_side_state_hidden_button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default '.($_SESSION['theme']['menu_side_state']['text'] != 'hidden' ? 'hide-sm-up ' : null).'float-left','onclick'=>'menu_side_expand();']); - if ($_SESSION['theme']['menu_brand_type']['text'] == 'text' || $_SESSION['theme']['menu_brand_type']['text'] == 'image_text') { - $body_header_brand_text = $_SESSION['theme']['body_header_brand_text']['text'] != '' ? escape($_SESSION['theme']['body_header_brand_text']['text']) : "FusionPBX"; - $html .= " \n"; + $body_header_brand_text = $_SESSION['theme']['body_header_brand_text']['text'] != '' ? escape($_SESSION['theme']['body_header_brand_text']['text']) : "FusionPBX"; + if ($_SESSION['theme']['body_header_brand_type']['text'] == 'image' || $_SESSION['theme']['body_header_brand_type']['text'] == 'image_text') { + $body_header_brand_image = $_SESSION['theme']['body_header_brand_image']['text'] != '' ? $_SESSION['theme']['body_header_brand_image']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png"; + $html .= "
"; + $html .= ""; + $html .= "
"; + } + if ($_SESSION['theme']['body_header_brand_type']['text'] == 'text' || $_SESSION['theme']['body_header_brand_type']['text'] == 'image_text') { + $html .= ""; } $html .= "
\n"; //header: right diff --git a/themes/default/css.php b/themes/default/css.php index 43409f9a4f..3b51ed9229 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -529,23 +529,6 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); text-decoration: none; } - div#body_header_brand_text { - display: inline-block; - margin: 3px 0 0 10px; - } - - div#body_header_brand_text > a { - color: ; - font-size: ; - font-weight: 600; - text-decoration: none; - } - - div#body_header_brand_text > a:hover { - color: ; - text-decoration: none; - } - /* menu side control container */ div#menu_side_control_container { position: -webkit-sticky; @@ -672,6 +655,56 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); } } +/* BODY/HEADER BAR *****************************************************************/ + + + div#body_header { + padding: 10px 10px 15px 10px; + height: 50px; + + } + + div#body_header { + padding: 10px; + margin-top: 5px; + height: 40px; + } + + + div#body_header_brand_image { + display: inline-block; + margin-left: 10px; + } + + div#body_header_brand_image > a:hover { + text-decoration: none; + } + + img#body_header_brand_image { + border: none; + margin-top: -4px; + height: auto; + max-width: 145px; + max-height: 35px; + } + + div#body_header_brand_text { + display: inline-block; + margin: 3px 0 0 10px; + } + + div#body_header_brand_text > a { + color: ; + font-size: ; + font-weight: 600; + text-decoration: none; + } + + div#body_header_brand_text > a:hover { + color: ; + text-decoration: none; + } + /* BUTTONS ********************************************************************/ /* buttons */ @@ -1218,20 +1251,6 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); } } - - div#content_header { - padding: 10px 10px 15px 10px; - height: 50px; - - } - - div#content_header { - padding: 10px; - margin-top: 5px; - height: 40px; - } - - /* GENERAL ELEMENTS *****************************************************************/ img {