From ff7fd3d8a7142bd42fbffa914c28a5830e9822ad Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 6 Apr 2015 12:44:35 +0200 Subject: [PATCH] Fixed menu and change visual --- pandora_console/general/main_menu.php | 14 +++--- pandora_console/include/functions_events.php | 7 ++- pandora_console/include/functions_menu.php | 46 ++++++++++++-------- pandora_console/include/styles/menu.css | 4 +- pandora_console/include/styles/pandora.css | 17 +++----- pandora_console/operation/menu.php | 2 - 6 files changed, 50 insertions(+), 40 deletions(-) diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 9ef84f4da7..c7ca6b1308 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -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(); }); }); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3c195207ba..a0704e6061 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -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 '
' . __('No events') . '
'; + if ($return){ + $returned = '
' . __('No events') . '
'; + return $returned; + } + else + echo '
' . __('No events') . '
'; } else { $table->id = 'latest_events_table'; diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index b12a88bdc6..9f072a6132 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -41,6 +41,7 @@ function menu_print_menu (&$menu) { $allsec2 = $sec2; } + //Open list of menu echo ''; 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 .= '
  • '.$sub["text"].'
    '; + $submenu_output .= '
  • '.$sub["text"].'
    '; 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 .= ''; + $submenu_output .= '
  • '; //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 .= '
     
    '; + //$submenu_output .= '
     
    '; } @@ -274,7 +276,8 @@ function menu_print_menu (&$menu) { $title = ''; } - $submenu_output .= '
    '.$sub["text"].'
    '; + $submenu_output .= '
    '.$sub["text"].'
    '; 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 .= "