Эх сурвалжийг харах

Theme: Side Menu updates.

Nate 5 жил өмнө
parent
commit
b1bf73a202

+ 6 - 0
core/default_settings/default_setting_edit.php

@@ -621,6 +621,12 @@
 		echo "    	<option value='click' ".($default_setting_value == "click" ? "selected='selected'" : null).">".$text['option-click']."</option>\n";
 		echo "    </select>\n";
 	}
+	elseif ($category == "theme" && $subcategory == "menu_side_toggle_body_width" && $name == "text" ) {
+		echo "    <select class='formfld' id='default_setting_value' name='default_setting_value'>\n";
+		echo "    	<option value='shrink'>".$text['option-shrink']."</option>\n";
+		echo "    	<option value='fixed' ".($default_setting_value == "fixed" ? "selected='selected'" : null).">".$text['option-fixed']."</option>\n";
+		echo "    </select>\n";
+	}
 	elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) {
 		echo "    <select class='formfld' id='default_setting_value' name='default_setting_value'>\n";
 		echo "    	<option value='listen' ".(($default_setting_value == "listen") ? "selected='selected'" : null).">".$text['option-voicemail_file_listen']."</option>\n";

+ 3 - 0
core/default_settings/default_settings.php

@@ -343,6 +343,9 @@
 			else if ($category == 'theme' && $subcategory == 'menu_side_toggle' && $name == 'text') {
 				echo "		".$text['option-'.$row['default_setting_value']]."\n";
 			}
+			else if ($category == 'theme' && $subcategory == 'menu_side_toggle_body_width' && $name == 'text') {
+				echo "		".$text['option-'.$row['default_setting_value']]."\n";
+			}
 			else if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
 				echo "		".(img_spacer('15px', '15px', 'background: '.escape($row['default_setting_value']).'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['default_setting_value'], -0.18)).'; padding: -1px;'));
 				echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".escape($row['default_setting_value'])."</span>\n";

+ 6 - 0
core/domain_settings/domain_setting_edit.php

@@ -678,6 +678,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 		echo "    	<option value='click' ".($row['domain_setting_value'] == "click" ? "selected='selected'" : null).">".$text['option-click']."</option>\n";
 		echo "    </select>\n";
 	}
+	elseif ($category == "theme" && $subcategory == "menu_side_toggle_body_width" && $name == "text" ) {
+		echo "    <select class='formfld' id='domain_setting_value' name='domain_setting_value'>\n";
+		echo "    	<option value='shrink'>".$text['option-shrink']."</option>\n";
+		echo "    	<option value='fixed' ".($row['domain_setting_value'] == "fixed" ? "selected='selected'" : null).">".$text['option-fixed']."</option>\n";
+		echo "    </select>\n";
+	}
 	elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) {
 		echo "    <select class='formfld' id='domain_setting_value' name='domain_setting_value'>\n";
 		echo "    	<option value='listen' ".(($row['domain_setting_value'] == "listen") ? "selected='selected'" : null).">".$text['option-voicemail_file_listen']."</option>\n";

+ 3 - 0
core/domain_settings/domain_settings.php

@@ -300,6 +300,9 @@
 			else if ($category == 'theme' && $subcategory == 'menu_side_toggle' && $name == 'text') {
 				echo "		".$text['option-'.$row['domain_setting_value']]."\n";
 			}
+			else if ($category == 'theme' && $subcategory == 'menu_side_toggle_body_width' && $name == 'text') {
+				echo "		".$text['option-'.$row['domain_setting_value']]."\n";
+			}
 			else if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
 				echo "		".(img_spacer('15px', '15px', 'background: '.escape($row['domain_setting_value']).'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['domain_setting_value'], -0.18)).'; padding: -1px;'));
 				echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".escape($row['domain_setting_value'])."</span>\n";

+ 6 - 0
core/user_settings/user_setting_edit.php

@@ -640,6 +640,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 		echo "    	<option value='click' ".($user_setting_value == "click" ? "selected='selected'" : null).">".$text['option-click']."</option>\n";
 		echo "    </select>\n";
 	}
+	elseif ($user_setting_category == "theme" && $user_setting_subcategory == "menu_side_toggle_body_width" && $user_setting_name == "text" ) {
+		echo "    <select class='formfld' id='user_setting_value' name='user_setting_value'>\n";
+		echo "    	<option value='shrink'>".$text['option-shrink']."</option>\n";
+		echo "    	<option value='fixed' ".($user_setting_value == "fixed" ? "selected='selected'" : null).">".$text['option-fixed']."</option>\n";
+		echo "    </select>\n";
+	}
 	else {
 		echo "	<input class='formfld' type='text' id='user_setting_value' name='user_setting_value' maxlength='255' value=\"".escape($user_setting_value)."\">\n";
 	}

+ 3 - 0
core/user_settings/user_settings.php

@@ -288,6 +288,9 @@
 			else if ($category == 'theme' && $subcategory == 'menu_side_toggle' && $name == 'text') {
 				echo "		".$text['option-'.$row['user_setting_value']]."\n";
 			}
+			else if ($category == 'theme' && $subcategory == 'menu_side_toggle_body_width' && $name == 'text') {
+				echo "		".$text['option-'.$row['user_setting_value']]."\n";
+			}
 			else if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
 				echo "		".(img_spacer('15px', '15px', 'background: '.escape($row['user_setting_value']).'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['user_setting_value'], -0.18)).'; padding: -1px;'));
 				echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".escape($row['user_setting_value'])."</span>\n";

+ 46 - 0
resources/app_languages.php

@@ -4495,4 +4495,50 @@ $text['option-click']['sv-se'] = "Click";
 $text['option-click']['uk-ua'] = "Click";
 $text['option-click']['tr-tr'] = "Click";
 
+$text['option-shrink']['en-us'] = "Shrink";
+$text['option-shrink']['en-gb'] = "Shrink";
+$text['option-shrink']['ar-eg'] = "Shrink";
+$text['option-shrink']['de-at'] = "Shrink";
+$text['option-shrink']['de-ch'] = "Shrink";
+$text['option-shrink']['de-de'] = "Shrink";
+$text['option-shrink']['el-gr'] = "Shrink";
+$text['option-shrink']['es-cl'] = "Shrink";
+$text['option-shrink']['es-mx'] = "Shrink";
+$text['option-shrink']['fr-ca'] = "Shrink";
+$text['option-shrink']['fr-fr'] = "Shrink";
+$text['option-shrink']['he-il'] = "Shrink";
+$text['option-shrink']['it-it'] = "Shrink";
+$text['option-shrink']['nl-nl'] = "Shrink";
+$text['option-shrink']['pl-pl'] = "Shrink";
+$text['option-shrink']['pt-br'] = "Shrink";
+$text['option-shrink']['pt-pt'] = "Shrink";
+$text['option-shrink']['ro-ro'] = "Shrink";
+$text['option-shrink']['ru-ru'] = "Shrink";
+$text['option-shrink']['sv-se'] = "Shrink";
+$text['option-shrink']['uk-ua'] = "Shrink";
+$text['option-shrink']['tr-tr'] = "Shrink";
+
+$text['option-fixed']['en-us'] = "Fixed";
+$text['option-fixed']['en-gb'] = "Fixed";
+$text['option-fixed']['ar-eg'] = "Fixed";
+$text['option-fixed']['de-at'] = "Fixed";
+$text['option-fixed']['de-ch'] = "Fixed";
+$text['option-fixed']['de-de'] = "Fixed";
+$text['option-fixed']['el-gr'] = "Fixed";
+$text['option-fixed']['es-cl'] = "Fixed";
+$text['option-fixed']['es-mx'] = "Fixed";
+$text['option-fixed']['fr-ca'] = "Fixed";
+$text['option-fixed']['fr-fr'] = "Fixed";
+$text['option-fixed']['he-il'] = "Fixed";
+$text['option-fixed']['it-it'] = "Fixed";
+$text['option-fixed']['nl-nl'] = "Fixed";
+$text['option-fixed']['pl-pl'] = "Fixed";
+$text['option-fixed']['pt-br'] = "Fixed";
+$text['option-fixed']['pt-pt'] = "Fixed";
+$text['option-fixed']['ro-ro'] = "Fixed";
+$text['option-fixed']['ru-ru'] = "Fixed";
+$text['option-fixed']['sv-se'] = "Fixed";
+$text['option-fixed']['uk-ua'] = "Fixed";
+$text['option-fixed']['tr-tr'] = "Fixed";
+
 ?>

+ 15 - 13
resources/classes/menu.php

@@ -1091,13 +1091,13 @@ if (!class_exists('menu')) {
 				if ($_SESSION['theme']['menu_brand_type']['text'] == 'none') {
 					$html .= "		<a class='menu_side_item_main menu_side_contract' onclick='menu_side_contract();' style='".($_SESSION['theme']['menu_side_pin']['boolean'] == 'true' ? "max-width: calc(100% - 50px);" : null)." ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "display: none;" : null)."' title=\"".$this->text['theme-label-contract_menu']."\"><i class='fas fa-bars fa-fw' style='z-index: 99800; padding-left: 1px;'></i></a>";
 				}
+				$menu_brand_text = $_SESSION['theme']['menu_brand_text']['text'] != '' ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
 				if ($_SESSION['theme']['menu_brand_type']['text'] == 'text') {
-					$menu_brand_text = $_SESSION['theme']['menu_brand_text']['text'] != '' ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
 					$html .= "		<a class='menu_brand_text' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
 				}
-				if ($_SESSION['theme']['menu_brand_type']['text'] == 'image' || $_SESSION['theme']['menu_brand_type']['text'] == '') {
-					$menu_brand_image_contracted =  $_SESSION['theme']['menu_side_brand_image_contracted']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_contracted']['text'] : PROJECT_PATH."/themes/default/images/logo_side_contracted.png";
-					$menu_brand_image_expanded =  $_SESSION['theme']['menu_side_brand_image_expanded']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_expanded']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
+				if ($_SESSION['theme']['menu_brand_type']['text'] == 'image' || $_SESSION['theme']['menu_brand_type']['text'] == 'image_text' || $_SESSION['theme']['menu_brand_type']['text'] == '') {
+					$menu_brand_image_contracted = $_SESSION['theme']['menu_side_brand_image_contracted']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_contracted']['text'] : PROJECT_PATH."/themes/default/images/logo_side_contracted.png";
+					$menu_brand_image_expanded = $_SESSION['theme']['menu_side_brand_image_expanded']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_expanded']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
 					$html .= "		<a class='menu_brand_image' href='".PROJECT_PATH."/'>";
 					$html .= 			"<img id='menu_brand_image_contracted' style='".($_SESSION['theme']['menu_side_state']['text'] == 'expanded' ? "display: none;" : null)."' src='".escape($menu_brand_image_contracted)."' title=\"".escape($menu_brand_text)."\">";
 					$html .= 			"<img id='menu_brand_image_expanded' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." src='".escape($menu_brand_image_expanded)."' title=\"".escape($menu_brand_text)."\">";
@@ -1138,27 +1138,29 @@ if (!class_exists('menu')) {
 			$html .= "	<div id='content_header'>\n";
 			//header: left
 				$html .= "<div class='float-left'>\n";
-				$html .= button::create(['type'=>'button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default hide-sm-up','onclick'=>'menu_side_expand();']);
+				$html .= button::create(['type'=>'button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default hide-sm-up float-left','onclick'=>'menu_side_expand();']);
+				if (($_SESSION['theme']['menu_brand_type']['text'] == 'text' && $_SESSION['theme']['menu_side_state']['text'] != 'expanded') || $_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 .= "	<div id='body_header_brand_text'><a href='".PROJECT_PATH."/'>".$body_header_brand_text."</a></div>\n";
+				}
 				$html .= "</div>\n";
 			//header: right
-				$html .= "<span class='float-right' style='white-space: nowrap;'>";
+				$html .= "<div class='float-right' style='white-space: nowrap;'>";
 				//current user
-					$html .= "<span style='display: inline-block; padding-right: 20px; font-size: 85%;'>\n";
-					$html .= "<strong>".$this->text['theme-label-user']."</strong>: ";
-					$html .= "<a href='".PROJECT_PATH."/core/users/user_edit.php?id=user'>".$_SESSION['username']."</a>";
+					$html .= "<span style='display: inline-block; padding-right: 20px; font-size: 90%;'>\n";
+					$html .= "	<a href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-user-circle fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
 					$html .= "</span>\n";
 				//domain name/selector (sm+)
 					if (isset($_SESSION['username']) && $_SESSION['username'] != '' && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
-						$html .= "<span style='display: inline-block; padding-right: 10px; font-size: 85%;'>\n";
-						$html .= "<strong>".$this->text['theme-label-domain']."</strong>: ";
-						$html .= "<a href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'>".escape($_SESSION['domain_name'])."</a>";
+						$html .= "<span style='display: inline-block; padding-right: 10px; font-size: 90%;'>\n";
+						$html .= "	<a href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-globe fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
 						$html .= "</span>\n";
 					}
 				//logout icon
 					if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
 						$html .= "<a id='header_logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
 					}
-				$html .= "</span>";
+				$html .= "</div>";
 			$html .= "	</div>\n";
 
 			//modal for logout icon (above)

+ 1 - 1
resources/footer.php

@@ -118,7 +118,7 @@
 						//otherwise
 							default:
 								if (isset($setting['text']) && $setting['text'] != '') {
-									$settings['theme'][$subcategory] = escape($setting['text']);
+									$settings['theme'][$subcategory] = str_replace('&lowbar;','_',escape($setting['text']));
 								}
 								else if (isset($setting['numeric']) && is_numeric($setting['numeric'])) {
 									$settings['theme'][$subcategory] = $setting['numeric'];

+ 16 - 0
themes/default/app_config.php

@@ -319,6 +319,14 @@
 		$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
 		$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set then body background color (and opacity) of the content.";
 		$y++;
+		$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9011e469-f94b-4c45-9b08-8991c243292b";
+		$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+		$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "body_header_background_color";
+		$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+		$apps[$x]['default_settings'][$y]['default_setting_value'] = "#eeeeee";
+		$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
+		$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the background color for the body (content) header bar (Side Menu only).";
+		$y++;
 		$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ce3a2e85-472e-4375-a447-d7937cb6dbb7";
 		$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
 		$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "body_shadow_color";
@@ -1743,6 +1751,14 @@
 		$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
 		$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether the Side Menu opens and closes with a 'Click' or with a mouse over/out ('Hover').";
 		$y++;
+		$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e7e11d18-0b06-4347-9305-f8f38284730f";
+		$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+		$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_toggle_body_width";
+		$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+		$apps[$x]['default_settings'][$y]['default_setting_value'] = "shrink";
+		$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
+		$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the behavior of the body content when the Side Menu is expanded and contracted.";
+		$y++;
 		$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "902e6d1b-d019-4d7f-9d83-38bab5db112e";
 		$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
 		$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_toggle_hover_delay_expand";

+ 31 - 33
themes/default/css.php

@@ -488,33 +488,6 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
 		border-radius: <?php echo ($_SESSION['theme']['menu_main_border_radius']['text'] != '') ? $_SESSION['theme']['menu_main_border_radius']['text'] : '0'; ?>;
 		}
 
-	/* menu side brand container */
-	div#menu_side_brand_container {
-		position: -webkit-sticky;
-		position: sticky;
-		z-index: 99901;
-		top: 0;
-		padding: 20px;
-		min-height: 75px;
-		text-align: left;
-		<?php if ($_SESSION['theme']['menu_main_background_image']['text'] != '') { ?>
-			background-image: url("<?php echo $_SESSION['theme']['menu_main_background_image']['text']; ?>");
-			background-position: 0px 0px;
-			background-repeat: repeat-y;
-		<?php } else {?>
-			background: <?php echo ($_SESSION['theme']['menu_main_background_color']['text'] != '') ? $_SESSION['theme']['menu_main_background_color']['text'] : 'rgba(0,0,0,0.90)'; ?>;
-		<?php } ?>
-		<?php
-		echo ($_SESSION['theme']['menu_main_border_color']['text'] == '' && $_SESSION['theme']['menu_main_border_size']['text'] == '') ? "border: 0;\n" : null;
-		echo ($_SESSION['theme']['menu_main_border_color']['text'] != '') ? 'border-color: '.$_SESSION['theme']['menu_main_border_color']['text'].";\n" : null;
-		echo ($_SESSION['theme']['menu_main_border_size']['text'] != '') ? 'border-width: '.$_SESSION['theme']['menu_main_border_size']['text'].";\n" : null;
-		?>
-		-moz-border-radius: <?php echo ($_SESSION['theme']['menu_main_border_radius']['text'] != '') ? $_SESSION['theme']['menu_main_border_radius']['text'] : '0'; ?>;
-		-webkit-border-radius: <?php echo ($_SESSION['theme']['menu_main_border_radius']['text'] != '') ? $_SESSION['theme']['menu_main_border_radius']['text'] : '0'; ?>;
-		-khtml-border-radius: <?php echo ($_SESSION['theme']['menu_main_border_radius']['text'] != '') ? $_SESSION['theme']['menu_main_border_radius']['text'] : '0'; ?>;
-		border-radius: <?php echo ($_SESSION['theme']['menu_main_border_radius']['text'] != '') ? $_SESSION['theme']['menu_main_border_radius']['text'] : '0'; ?>;
-		}
-
 	/* menu side logo */
 	a.menu_brand_image {
 		display: inline-block;
@@ -546,7 +519,7 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
 	a.menu_brand_text {
 		display: inline-block;
 		padding: 10px 20px;
-		color: <?php echo ($_SESSION['theme']['menu_brand_text_color']['text'] != '') ? $_SESSION['theme']['menu_brand_text_color']['text'] : 'rgba(255,255,255,0.80)'; ?>;
+		color: <?php echo ($_SESSION['theme']['menu_brand_text_color']['text'] != '') ? $_SESSION['theme']['menu_brand_text_color']['text'] : 'rgba(255,255,255,0.90)'; ?>;
 		font-weight: 600;
 		white-space: nowrap;
 		}
@@ -556,6 +529,23 @@ 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: <?php echo ($_SESSION['theme']['body_header_brand_text_color']['text'] != '') ? $_SESSION['theme']['body_header_brand_text_color']['text'] : 'rgba(0,0,0,0.90)'; ?>;
+		font-size: <?php echo ($_SESSION['theme']['body_header_brand_text_size']['text'] != '') ? $_SESSION['theme']['body_header_brand_text_size']['text'] : '16px'; ?>;
+		font-weight: 600;
+		text-decoration: none;
+		}
+
+	div#body_header_brand_text > a:hover {
+		color: <?php echo ($_SESSION['theme']['body_header_brand_text_color_hover']['text'] != '') ? $_SESSION['theme']['body_header_brand_text_color_hover']['text'] : 'rgba(0,0,0,1.0)'; ?>;
+		text-decoration: none;
+		}
+
 	/* menu side control container */
 	div#menu_side_control_container {
 		position: -webkit-sticky;
@@ -1225,11 +1215,19 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
 			}
 		}
 
-	div#content_header {
-		padding: 10px;
-		margin-top: 5px;
-		height: 40px;
-	}
+	<?php if ($_SESSION['theme']['menu_style']['text'] == 'side') { ?>
+		div#content_header {
+			padding: 10px 10px 15px 10px;
+			height: 50px;
+			<?php echo $_SESSION['theme']['body_header_background_color']['text'] != '' ? 'background-color: '.$_SESSION['theme']['body_header_background_color']['text'].';' : null; ?>
+		}
+	<?php } else { ?>
+		div#content_header {
+			padding: 10px;
+			margin-top: 5px;
+			height: 40px;
+		}
+	<?php } ?>
 
 /* GENERAL ELEMENTS *****************************************************************/
 

+ 27 - 18
themes/default/template.php

@@ -98,17 +98,12 @@
 						$('.menu_side_sub').slideUp(180);
 						$('.menu_side_item_title').hide();
 						{/literal}
-						{if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''}
+						{if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == 'image_text' || $settings.theme.menu_brand_type == ''}
 							{literal}
 							$('#menu_brand_image_expanded').fadeOut(180, function() {
 								$('#menu_brand_image_contracted').fadeIn(180);
 							});
 							{/literal}
-						{elseif $settings.theme.menu_brand_type == 'image_text'}
-							{literal}
-							$('.menu_brand_text').hide();
-							$('#menu_brand_image_contracted').animate({ width: '20px', 'margin-left': '-2px' }, 250);
-							{/literal}
 						{else if $settings.theme.menu_brand_type == 'text'}
 							{literal}
 							$('.menu_brand_text').hide();
@@ -121,9 +116,15 @@
 						$('#menu_side_container').animate({ width: '{/literal}{$settings.theme.menu_side_width_contracted}{literal}px' }, 180, function() {
 							menu_side_state_current = 'contracted';
 						});
-						if ($(window).width() >= 576) {
-							$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_contracted}{literal} }, 250);
-						}
+						{/literal}
+						{if $settings.theme.menu_side_toggle_body_width == 'shrink' || ($settings.theme.menu_side_state == 'expanded' && $settings.theme.menu_side_toggle_body_width == 'fixed')}
+							{literal}
+							if ($(window).width() >= 576) {
+								$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_contracted}{literal} }, 250);
+							}
+							{/literal}
+						{/if}
+						{literal}
 						$('.menu_side_contract').hide();
 						$('.menu_side_expand').show();
 						if ($(window).width() < 576) {
@@ -140,11 +141,7 @@
 
 				function menu_side_expand() {
 					{/literal}
-					{if $settings.theme.menu_brand_type == 'image_text'}
-						{literal}
-						$('#menu_brand_image_contracted').animate({ width: '30px', 'margin-left': '0' }, 250);
-						{/literal}
-					{elseif $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''}
+					{if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == 'image_text' ||$settings.theme.menu_brand_type == ''}
 						{literal}
 						$('#menu_brand_image_contracted').fadeOut(180);
 						{/literal}
@@ -156,7 +153,7 @@
 					var menu_side_container_width = $(window).width() < 576 ? $(window).width() : '{/literal}{$settings.theme.menu_side_width_expanded}{literal}px';
 					$('#menu_side_container').animate({ width: menu_side_container_width }, 180, function() {
 						{/literal}
-						{if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''}
+						{if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == 'image_text' || $settings.theme.menu_brand_type == ''}
 							{literal}
 							$('#menu_brand_image_expanded').fadeIn(180);
 							{/literal}
@@ -169,9 +166,15 @@
 							menu_side_state_current = 'expanded';
 						});
 					});
-					if ($(window).width() >= 576) {
-						$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_expanded}{literal} }, 250);
-					}
+					{/literal}
+					{if $settings.theme.menu_side_toggle_body_width == 'shrink' || ($settings.theme.menu_side_state == 'expanded' && $settings.theme.menu_side_toggle_body_width == 'fixed')}
+						{literal}
+						if ($(window).width() >= 576) {
+							$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_expanded}{literal} }, 250);
+						}
+						{/literal}
+					{/if}
+					{literal}
 				}
 
 				function menu_side_item_toggle(item_id) {
@@ -198,10 +201,16 @@
 									document.getElementById('menu_side_state_set_expanded').style.display = state == 'expanded' ? 'none' : 'block';
 									document.getElementById('menu_side_state_set_contracted').style.display = state == 'contracted' ? 'none' : 'block';
 									if (state == 'expanded') {
+										if ($(window).width() >= 576) {
+											$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_expanded}{literal} }, 250);
+										}
 										document.getElementById('menu_side_state_current').value = 'expanded';
 										display_message("{/literal}{$text.theme_message_menu_expanded}{literal}", 'positive', 1000);
 									}
 									else {
+										if ($(window).width() >= 576) {
+											$('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_contracted}{literal} }, 250);
+										}
 										document.getElementById('menu_side_state_current').value = 'contracted';
 										display_message("{/literal}{$text.theme_message_menu_contracted}{literal}", 'positive', 1000);
 									}