mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Hide menu title when screen is too small
This commit is contained in:
parent
c9cea837fa
commit
8cae675841
@ -323,8 +323,6 @@ switch ($section) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put header inside div for special sizing.(No right margin).
|
|
||||||
echo '<div id="header_configuration" style="width: calc(100% + 3em);">';
|
|
||||||
// Header.
|
// Header.
|
||||||
ui_print_page_header(
|
ui_print_page_header(
|
||||||
__('Configuration').$subpage,
|
__('Configuration').$subpage,
|
||||||
@ -338,9 +336,8 @@ ui_print_page_header(
|
|||||||
GENERIC_SIZE_TEXT,
|
GENERIC_SIZE_TEXT,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
true,
|
true
|
||||||
);
|
);
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
if (isset($config['error_config_update_config'])) {
|
if (isset($config['error_config_update_config'])) {
|
||||||
if ($config['error_config_update_config']['correct'] == false) {
|
if ($config['error_config_update_config']['correct'] == false) {
|
||||||
|
@ -4632,12 +4632,7 @@ function ui_print_page_header(
|
|||||||
$buffer .= '<div class="breadcrumbs_container">'.$breadcrumbs.'</div>';
|
$buffer .= '<div class="breadcrumbs_container">'.$breadcrumbs.'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($hide_left_small !== true) {
|
|
||||||
$buffer .= '<div id="menu_tab_left">';
|
$buffer .= '<div id="menu_tab_left">';
|
||||||
} else {
|
|
||||||
$buffer .= '<div id="menu_tab_left" class="menu_hide">';
|
|
||||||
}
|
|
||||||
|
|
||||||
$buffer .= '<ul class="mn"><li class="'.$type.'">';
|
$buffer .= '<ul class="mn"><li class="'.$type.'">';
|
||||||
|
|
||||||
if (strpos($title, 'Monitoring » Services »') != -1) {
|
if (strpos($title, 'Monitoring » Services »') != -1) {
|
||||||
@ -4733,6 +4728,31 @@ function ui_print_page_header(
|
|||||||
|
|
||||||
$buffer .= '</div>';
|
$buffer .= '</div>';
|
||||||
|
|
||||||
|
if ($hide_left_small) {
|
||||||
|
$buffer .= '<script>
|
||||||
|
$(window).resize(function () {
|
||||||
|
hideLeftHeader()
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
hideLeftHeader();
|
||||||
|
});
|
||||||
|
|
||||||
|
function hideLeftHeader() {
|
||||||
|
var right_width = 0;
|
||||||
|
$("#menu_tab").find("li").each(function(index) {
|
||||||
|
right_width += parseInt($(this).outerWidth(), 10);
|
||||||
|
});
|
||||||
|
|
||||||
|
if($("#menu_tab").outerWidth() < right_width) {
|
||||||
|
$("#menu_tab_left").children().hide()
|
||||||
|
} else {
|
||||||
|
$("#menu_tab_left").children().show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>';
|
||||||
|
}
|
||||||
|
|
||||||
if (!$return) {
|
if (!$return) {
|
||||||
echo $buffer;
|
echo $buffer;
|
||||||
}
|
}
|
||||||
|
@ -2368,12 +2368,6 @@ a.autorefresh_txt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1200px) {
|
|
||||||
.menu_hide ul {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled_module {
|
.disabled_module {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user