mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-565-pintado-del-menu-lateral-con-acl-enterprise-activado' into 'develop'
Modified menu position to fit it with ACL enterprise See merge request !304
This commit is contained in:
commit
56fd0f85ba
@ -49,6 +49,9 @@ function menu_print_menu (&$menu) {
|
|||||||
'') .
|
'') .
|
||||||
'>';
|
'>';
|
||||||
|
|
||||||
|
// Use $config because a global var is required because normal
|
||||||
|
// and godmode menu are painted separately
|
||||||
|
if (!isset($config['count_main_menu'])) $config['count_main_menu'] = 0;
|
||||||
foreach ($menu as $mainsec => $main) {
|
foreach ($menu as $mainsec => $main) {
|
||||||
$extensionInMenuParameter = (string) get_parameter ('extension_in_menu','');
|
$extensionInMenuParameter = (string) get_parameter ('extension_in_menu','');
|
||||||
|
|
||||||
@ -369,6 +372,12 @@ function menu_print_menu (&$menu) {
|
|||||||
$sub_title = '';
|
$sub_title = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Added a top on inline styles
|
||||||
|
$top = menu_calculate_top($config['count_main_menu'], $count_sub, $count_sub2);
|
||||||
|
if ($top !== 0) {
|
||||||
|
$display = rtrim($display, "'");
|
||||||
|
$display .= "top: " . $top . "px;'";
|
||||||
|
}
|
||||||
//Add submenu2 to submenu string
|
//Add submenu2 to submenu string
|
||||||
$submenu_output .= "<ul id='sub" . str_replace(' ','_',$sub["id"]) . "' class=submenu2 $display>";
|
$submenu_output .= "<ul id='sub" . str_replace(' ','_',$sub["id"]) . "' class=submenu2 $display>";
|
||||||
$submenu_output .= $submenu2_list;
|
$submenu_output .= $submenu2_list;
|
||||||
@ -419,10 +428,12 @@ function menu_print_menu (&$menu) {
|
|||||||
$visible = false;
|
$visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
|
$top = menu_calculate_top($config["count_main_menu"], $count_sub);
|
||||||
|
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'" style="top: ' . $top . 'px">';
|
||||||
$output .= $submenu_output;
|
$output .= $submenu_output;
|
||||||
$output .= '</ul>';
|
$output .= '</ul>';
|
||||||
}
|
}
|
||||||
|
$config["count_main_menu"]++;
|
||||||
$output .= '</li>';
|
$output .= '</li>';
|
||||||
echo $output;
|
echo $output;
|
||||||
$menu_selected = false;
|
$menu_selected = false;
|
||||||
@ -718,4 +729,31 @@ function menu_sec3_in_sec2($sec,$sec2,$sec3) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Positionate the menu element. Added a negative top.
|
||||||
|
// 35px is the height of a menu item
|
||||||
|
function menu_calculate_top($level1, $level2, $level3 = false) {
|
||||||
|
$level2--;
|
||||||
|
if ($level3 !== false) {
|
||||||
|
// If level3 is set, the position is calculated like box is in the center.
|
||||||
|
// wiouth considering level2 box can be moved.
|
||||||
|
$level3--;
|
||||||
|
$total = $level1 + $level3;
|
||||||
|
$comp = $level3;
|
||||||
|
} else {
|
||||||
|
$total = $level1 + $level2;
|
||||||
|
$comp = $level2;
|
||||||
|
|
||||||
|
}
|
||||||
|
// Positionate in the middle
|
||||||
|
if ($total > 12 && (($total < 18) || (($level1 - $comp) <= 4))) {
|
||||||
|
return - ( floor($comp/2) * 35);
|
||||||
|
}
|
||||||
|
// Positionate in the bottom
|
||||||
|
if ($total >= 18) {
|
||||||
|
return - $comp * 35;
|
||||||
|
}
|
||||||
|
// return 0 by default
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -201,49 +201,6 @@ li:hover ul { display: block; }
|
|||||||
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
|
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#subicon_god-setup {
|
|
||||||
top: -140px;
|
|
||||||
}
|
|
||||||
#subBulk_operations {
|
|
||||||
top: -210px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-servers {
|
|
||||||
top: -120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-alerts {
|
|
||||||
top: -70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-links {
|
|
||||||
top: -140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-extensions {
|
|
||||||
top: -180px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-um_messages {
|
|
||||||
top: -90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subicon_god-configuration {
|
|
||||||
top: -100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subDB_maintenance {
|
|
||||||
top: -120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subExtension_manager {
|
|
||||||
top: -100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#subSetup {
|
|
||||||
top: -80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu_container {
|
#menu_container {
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1884,7 +1884,7 @@ div.warn {
|
|||||||
/* Submenus havent borders */
|
/* Submenus havent borders */
|
||||||
.submenu_not_selected, .submenu_selected, .submenu2 {
|
.submenu_not_selected, .submenu_selected, .submenu2 {
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
min-height: 0px !important;
|
min-height: 35px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pandora width style theme */
|
/* Pandora width style theme */
|
||||||
|
@ -1948,7 +1948,7 @@ div.warn {
|
|||||||
/* Submenus havent borders */
|
/* Submenus havent borders */
|
||||||
.submenu_not_selected, .submenu_selected, .submenu2 {
|
.submenu_not_selected, .submenu_selected, .submenu2 {
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
min-height: 0px !important;
|
min-height: 35px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pandora width style theme */
|
/* Pandora width style theme */
|
||||||
|
@ -1939,7 +1939,7 @@ div.warn {
|
|||||||
/* Submenus havent borders */
|
/* Submenus havent borders */
|
||||||
.submenu_not_selected, .submenu_selected, .submenu2 {
|
.submenu_not_selected, .submenu_selected, .submenu2 {
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
min-height: 0px !important;
|
min-height: 35px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pandora width style theme */
|
/* Pandora width style theme */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user