Fixed menu and change visual
This commit is contained in:
parent
da24887922
commit
ff7fd3d8a7
|
@ -243,10 +243,10 @@ $(document).ready( function() {
|
|||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show(1000);
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
if( typeof(table_noHover) != 'undefined')
|
||||
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
||||
$("ul#sub"+table_noHover[0].id).hide(500);
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
}).mouseleave(function(){
|
||||
table_noHover = $(this);
|
||||
handsIn = 0;
|
||||
|
@ -254,7 +254,7 @@ $(document).ready( function() {
|
|||
opened = new Date().getTime() - openTime;
|
||||
if(opened > 3000 && handsIn == 0) {
|
||||
openTime = 4000;
|
||||
$("ul#sub"+table_hover[0].id).hide(500);
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
}, 3500);
|
||||
});
|
||||
|
@ -267,7 +267,7 @@ $(document).ready( function() {
|
|||
$("#sub"+table_hover2[0].id).show();
|
||||
if( typeof(table_noHover2) != 'undefined')
|
||||
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id )
|
||||
$("ul#sub"+table_noHover2[0].id).hide(500);
|
||||
$("ul#sub"+table_noHover2[0].id).hide();
|
||||
}).mouseout(function(){
|
||||
table_noHover2 = table_hover2;
|
||||
handsIn2 = 0;
|
||||
|
@ -275,7 +275,7 @@ $(document).ready( function() {
|
|||
opened = new Date().getTime() - openTime2;
|
||||
if(opened >= 3000 && handsIn2 == 0) {
|
||||
openTime2 = 4000;
|
||||
$("ul#sub"+table_hover2[0].id).hide(500);
|
||||
$("ul#sub"+table_hover2[0].id).hide();
|
||||
}
|
||||
}, 3500);
|
||||
});
|
||||
|
@ -284,9 +284,9 @@ $(document).ready( function() {
|
|||
$('#page').click(function(){
|
||||
openTime = 4000;
|
||||
if( typeof(table_hover) != 'undefined')
|
||||
$("ul#sub"+table_hover[0].id).hide(500);
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
if( typeof(table_hover2) != 'undefined')
|
||||
$("ul#sub"+table_hover2[0].id).hide(500);
|
||||
$("ul#sub"+table_hover2[0].id).hide();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -848,7 +848,12 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
$result = db_get_all_rows_sql ($sql);
|
||||
|
||||
if ($result === false) {
|
||||
echo '<div class="nf">' . __('No events') . '</div>';
|
||||
if ($return){
|
||||
$returned = '<div class="nf">' . __('No events') . '</div>';
|
||||
return $returned;
|
||||
}
|
||||
else
|
||||
echo '<div class="nf">' . __('No events') . '</div>';
|
||||
}
|
||||
else {
|
||||
$table->id = 'latest_events_table';
|
||||
|
|
|
@ -41,6 +41,7 @@ function menu_print_menu (&$menu) {
|
|||
$allsec2 = $sec2;
|
||||
}
|
||||
|
||||
//Open list of menu
|
||||
echo '<ul'.(isset ($menu['class']) ? ' class="'.$menu['class'].'"' : '').'>';
|
||||
|
||||
foreach ($menu as $mainsec => $main) {
|
||||
|
@ -67,19 +68,19 @@ function menu_print_menu (&$menu) {
|
|||
$submenu = false;
|
||||
$classes = array ('menu_icon');
|
||||
if (isset ($main["sub"])) {
|
||||
$classes[] = 'has_submenu';
|
||||
$classes[] = '';
|
||||
$submenu = true;
|
||||
}
|
||||
if (!isset ($main["refr"]))
|
||||
$main["refr"] = 0;
|
||||
|
||||
if (($sec == $mainsec) && ($showSubsection)) {
|
||||
$classes[] = 'selected';
|
||||
$classes[] = '';
|
||||
}
|
||||
else {
|
||||
$classes[] = 'not_selected';
|
||||
$classes[] = '';
|
||||
if ($extensionInMenuParameter == $mainsec)
|
||||
$classes[] = 'selected';
|
||||
$classes[] = '';
|
||||
}
|
||||
|
||||
$output = '';
|
||||
|
@ -171,13 +172,14 @@ function menu_print_menu (&$menu) {
|
|||
) {
|
||||
//If the subclass is selected and there are options and that options value is true
|
||||
$class .= 'submenu_selected selected';
|
||||
$menu_selected = true;
|
||||
$selected = true;
|
||||
$visible = true;
|
||||
}
|
||||
elseif (($sec2 == $subsec2 || $allsec2 == $subsec2|| $selected_submenu2) && !isset ($sub[$subsec2]["options"])) {
|
||||
$class .= 'submenu_selected selected';
|
||||
$selected = true;
|
||||
|
||||
$menu_selected = true;
|
||||
$hasExtensions = (array_key_exists('hasExtensions',$main)) ? $main['hasExtensions'] : false;
|
||||
if (($extensionInMenuParameter != '') && ($hasExtensions))
|
||||
$visible = true;
|
||||
|
@ -202,7 +204,7 @@ function menu_print_menu (&$menu) {
|
|||
|
||||
if (isset ($sub["type"]) && $sub["type"] == "direct") {
|
||||
//This is an external link
|
||||
$submenu_output .= '<li class="'.$class.'"><a href="'.$subsec2.'"><div class="' . $sub_tree_class . '">'.$sub["text"].'</div></a>';
|
||||
$submenu_output .= '<li id="'. str_replace(' ','_',$sub["text"]) . '" class="'.$class.'"><a href="'.$subsec2.'"><div class="' . $sub_tree_class . '">'.$sub["text"].'</div></a>';
|
||||
|
||||
if (isset($sub['sub2']) || $selected) {
|
||||
$submenu_output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
|
||||
|
@ -217,7 +219,7 @@ function menu_print_menu (&$menu) {
|
|||
$link_add = "";
|
||||
}
|
||||
|
||||
$submenu_output .= '<li'.($class ? ' class="'.$class.'"' : '').'>';
|
||||
$submenu_output .= '<li id="'. str_replace(' ','_',$sub["text"]) . '" '.($class ? ' class="'.$class.'"' : '').'>';
|
||||
|
||||
//Ini Add icon extension
|
||||
$secExtension = null;
|
||||
|
@ -230,7 +232,7 @@ function menu_print_menu (&$menu) {
|
|||
$secExtensionBool = false;
|
||||
|
||||
if ($secExtensionBool) {
|
||||
$imageIconDefault = 'images/extensions.png';
|
||||
//$imageIconDefault = 'images/extensions.png';
|
||||
if (strlen($sub["icon"]) > 0) {
|
||||
$icon_enterprise = false;
|
||||
if (isset($sub['enterprise'])) {
|
||||
|
@ -251,7 +253,7 @@ function menu_print_menu (&$menu) {
|
|||
$imageIcon = $imageIconDefault;
|
||||
}
|
||||
|
||||
$submenu_output .= '<div style="background: url('.$imageIcon.') no-repeat; width: 16px; height: 16px; float: left; margin: 5px 0px 0px 3px;"> </div>';
|
||||
//$submenu_output .= '<div style="background: url('.$imageIcon.') no-repeat; width: 16px; height: 16px; float: left; margin: 5px 0px 0px 3px;"> </div>';
|
||||
}
|
||||
|
||||
|
||||
|
@ -274,7 +276,8 @@ function menu_print_menu (&$menu) {
|
|||
$title = '';
|
||||
}
|
||||
|
||||
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&sec2='.$subsec2.($sub["refr"] ? '&refr=' . $sub["refr"] : '').$link_add.'"' . $title . '><div class="' . $sub_tree_class . '">'.$sub["text"].'</div></a>';
|
||||
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&sec2='.$subsec2.($sub["refr"] ? '&refr=' .
|
||||
$sub["refr"] : '').$link_add.'"' . $title . '><div class="' . $sub_tree_class . '">'.$sub["text"].'</div></a>';
|
||||
|
||||
if (isset($sub['sub2'])) {
|
||||
$submenu_output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
|
||||
|
@ -305,7 +308,7 @@ function menu_print_menu (&$menu) {
|
|||
$display = "";
|
||||
}
|
||||
|
||||
$class = "submenu2";
|
||||
$class = "sub_subMenu";
|
||||
|
||||
// Define submenu2 class to draw tree image
|
||||
if($count_sub2 >= count($sub['sub2'])) {
|
||||
|
@ -320,7 +323,7 @@ function menu_print_menu (&$menu) {
|
|||
}
|
||||
|
||||
//Add submenu2 to submenu string
|
||||
$submenu_output .= "<ul class=submenu2 $display>";
|
||||
$submenu_output .= "<ul id='sub" . str_replace(' ','_',$sub["text"]) . "' class=submenu2 $display>";
|
||||
$submenu_output .= $submenu2_list;
|
||||
$submenu_output .= "</ul>";
|
||||
}
|
||||
|
@ -338,11 +341,17 @@ function menu_print_menu (&$menu) {
|
|||
else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($menu_selected)
|
||||
$seleccionado = 'selected';
|
||||
else
|
||||
$seleccionado = '';
|
||||
|
||||
//Print out the first level
|
||||
$output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">';
|
||||
$output .= '<a href="index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&refr='.$main["refr"] : '').'">'.$main["text"].'</a>' . html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
|
||||
$output .= '<li class="'.implode (" ", $classes).' ' . $seleccionado . '" id="icon_'.$id.'"
|
||||
onclick="location.href=\'index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&refr='.$main["refr"] : '').'\'">';
|
||||
$output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
|
||||
if ($submenu_output != '') {
|
||||
//WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS
|
||||
if ($visible || in_array ("selected", $classes)) {
|
||||
|
@ -352,16 +361,19 @@ function menu_print_menu (&$menu) {
|
|||
$visible = false;
|
||||
}
|
||||
|
||||
$output .= '<ul class="submenu'.($visible ? '' : ' invisible').'">';
|
||||
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
|
||||
$output .= $submenu_output;
|
||||
$output .= '</ul>';
|
||||
}
|
||||
$output .= '</li>';
|
||||
echo $output;
|
||||
$menu_selected = false;
|
||||
}
|
||||
|
||||
//Finish menu
|
||||
echo '</ul>';
|
||||
//Invisible UL for adding border-top
|
||||
echo '<ul style="height: 0px;"><li> </li></ul></div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -111,8 +111,8 @@ li:hover ul { display: block; }
|
|||
/* Positions it back where it should be */
|
||||
border-left: 1px;
|
||||
}
|
||||
.menu li.has_submenu > img.toggle{
|
||||
#visibility: visible;
|
||||
.menu li.has_submenu > a > div {
|
||||
background: url(../../images/arrow.png) no-repeat 90% 50% !important;
|
||||
z-index: 1; /* Positions it on top of the rest */
|
||||
}
|
||||
|
||||
|
|
|
@ -316,13 +316,15 @@ div#menu {
|
|||
div#head {
|
||||
font-size: 8pt;
|
||||
width: 100%;
|
||||
height: 62px;
|
||||
height: 60px;
|
||||
padding-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #274C00;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 5px;
|
||||
border-bottom-width: 4px;
|
||||
border-color: #80BA27;
|
||||
min-width: 882px;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.fixed_header {
|
||||
|
@ -1083,7 +1085,7 @@ div.title_line {
|
|||
|
||||
#menu_tab_frame, #menu_tab_frame_view {
|
||||
display: block !important;
|
||||
border-bottom: 2px solid #80BA27;
|
||||
border-bottom: 1px solid #80BA27;
|
||||
/* float:left; */
|
||||
margin-left: 0px !important;
|
||||
max-height: 31px;
|
||||
|
@ -1915,13 +1917,6 @@ div#page {
|
|||
div#main {
|
||||
min-width: 720px;
|
||||
}
|
||||
div#head {
|
||||
width: 100%;
|
||||
height: 47px;
|
||||
min-width: 882px;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
ol.steps {
|
||||
margin-bottom: 70px;
|
||||
|
|
|
@ -136,8 +136,6 @@ if (check_acl ($config['id_user'], 0, "RR")) {
|
|||
|
||||
$firstLetterNameVisualToShow = array('_', ',', '[', '(');
|
||||
|
||||
$sub2 = array();
|
||||
|
||||
foreach ($layouts as $layout) {
|
||||
if (! check_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue