2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2020-11-27 13:52:35 +01:00
|
|
|
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2007-03-02 18:56:07 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2011-03-23 Raul Mateos <raulofpandora@gmail.com>
* extensions/ssh_console.php, extensions/vnc_view.php,
extensions/update_manager.php, extensions/users_connected.php,
extensions/extension_uploader.php, extensions/insert_data.php,
extensions/module_groups.php, extensions/plugin_registration.php,
extensions/agent_modules.php, extensions/resource_registration.php,
extensions/resource_exportation.php, extensions/dbmanager.php,
extensions/pandora_logs.php, general/*.php, ajax.php,
operation/search_*.php, operation/menu.php, operation/extensions.php,
godmode/menu.php, godmode/extensions.php, godmode/admin_access_logs.php:
CReverted unwanted license changes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4126 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-23 17:13:28 +01:00
|
|
|
// modify it under the terms of the GNU General Public License
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// as published by the Free Software Foundation; version 2
|
2007-03-02 18:56:07 +01:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2007-03-02 18:56:07 +01:00
|
|
|
// GNU General Public License for more details.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (! isset($config['id_user'])) {
|
|
|
|
include 'general/login_page.php';
|
|
|
|
exit();
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2008-12-19 22:45:20 +01:00
|
|
|
|
2019-02-25 11:54:46 +01:00
|
|
|
?>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
2019-03-27 14:39:02 +01:00
|
|
|
var menuType_value = "<?php echo $config['menu_type']; ?>";
|
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
if (menuType_value == 'classic') {
|
2019-02-25 11:54:46 +01:00
|
|
|
$('ul.submenu').css('left', '214px');
|
|
|
|
}
|
|
|
|
else{
|
2019-03-05 12:54:11 +01:00
|
|
|
$('ul.submenu').css('left', '59px');
|
2019-02-25 11:54:46 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<?php
|
2014-05-21 12:44:36 +02:00
|
|
|
$autohidden_menu = 0;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
|
|
|
|
$autohidden_menu = 1;
|
2014-05-21 12:44:36 +02:00
|
|
|
}
|
|
|
|
|
2013-02-20 14:48:46 +01:00
|
|
|
// Menu container prepared to autohide menu
|
2019-03-27 14:39:02 +01:00
|
|
|
if ($config['menu_type'] == 'classic') {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo '<div id="menu_full" class="menu_full_classic">';
|
2019-03-27 14:39:02 +01:00
|
|
|
} else {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo '<div id="menu_full" class="menu_full_collapsed">';
|
2019-03-27 14:39:02 +01:00
|
|
|
}
|
2019-02-25 11:54:46 +01:00
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
|
|
|
|
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
|
|
|
|
|
|
|
|
if (!defined('PANDORA_ENTERPRISE')) {
|
|
|
|
$logo_title = get_product_name().' Opensource';
|
2019-03-27 16:26:47 +01:00
|
|
|
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
|
2019-03-05 12:54:11 +01:00
|
|
|
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
|
|
|
|
} else {
|
|
|
|
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
|
|
|
|
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
|
|
|
|
}
|
|
|
|
|
|
|
|
$logo_title = get_product_name().' Enterprise';
|
|
|
|
}
|
|
|
|
|
2019-02-25 11:54:46 +01:00
|
|
|
echo '<div class="logo_green"><a href="index.php?sec=main">';
|
|
|
|
if (isset($config['custom_logo'])) {
|
2019-03-27 14:39:02 +01:00
|
|
|
if ($config['menu_type'] == 'classic') {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:block']);
|
2019-03-27 14:39:02 +01:00
|
|
|
} else {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']);
|
2019-03-27 14:39:02 +01:00
|
|
|
}
|
2019-02-25 11:54:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($config['custom_logo_collapsed'])) {
|
2019-03-27 14:39:02 +01:00
|
|
|
if ($config['menu_type'] == 'classic') {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:none']);
|
2019-03-27 14:39:02 +01:00
|
|
|
} else {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']);
|
2019-03-27 14:39:02 +01:00
|
|
|
}
|
2019-02-25 11:54:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
echo '</a></div>';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
|
|
|
|
require 'operation/menu.php';
|
|
|
|
|
|
|
|
// Check all enterprise ACL used in godmenu items to print menu headers
|
|
|
|
if (check_acl($config['id_user'], 0, 'AW')
|
|
|
|
|| check_acl($config['id_user'], 0, 'PM')
|
|
|
|
|| check_acl($config['id_user'], 0, 'LM')
|
|
|
|
|| check_acl($config['id_user'], 0, 'UM')
|
|
|
|
|| check_acl($config['id_user'], 0, 'LW')
|
|
|
|
|| check_acl($config['id_user'], 0, 'IW')
|
|
|
|
|| check_acl($config['id_user'], 0, 'EW')
|
|
|
|
|| check_acl($config['id_user'], 0, 'DW')
|
|
|
|
) {
|
|
|
|
// echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
|
2012-02-03 12:01:12 +01:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require 'godmode/menu.php';
|
2009-02-10 21:29:45 +01:00
|
|
|
|
2019-03-27 14:39:02 +01:00
|
|
|
if ($config['menu_type'] == 'classic') {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo '<div id="button_collapse" class="button_classic button_collapse"></div>';
|
2019-03-27 14:39:02 +01:00
|
|
|
} else {
|
2019-03-25 19:37:45 +01:00
|
|
|
echo '<div id="button_collapse" class="button_collapsed button_collapse"></div>';
|
2019-03-27 14:39:02 +01:00
|
|
|
}
|
2019-02-25 11:54:46 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// require ("links_menu.php");
|
|
|
|
echo '</div>';
|
|
|
|
// menu_container
|
|
|
|
ui_require_jquery_file('cookie');
|
|
|
|
|
2014-09-16 12:40:05 +02:00
|
|
|
$config_fixed_header = false;
|
|
|
|
if (isset($config['fixed_header'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config_fixed_header = $config['fixed_header'];
|
2014-09-16 12:40:05 +02:00
|
|
|
}
|
2009-01-07 11:42:38 +01:00
|
|
|
?>
|
2015-03-26 13:12:48 +01:00
|
|
|
|
2009-02-09 22:00:13 +01:00
|
|
|
<script type="text/javascript" language="javascript">
|
2009-02-13 21:23:44 +01:00
|
|
|
/* <![CDATA[ */
|
2015-04-07 09:50:46 +02:00
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
$('#button_collapse').on('click', function() {
|
2019-02-25 11:54:46 +01:00
|
|
|
|
|
|
|
if($('#menu_full').hasClass('menu_full_classic')){
|
2019-02-26 10:43:59 +01:00
|
|
|
localStorage.setItem("menuType", "collapsed");
|
2019-03-04 08:39:56 +01:00
|
|
|
$('ul.submenu').css('left', '59px');
|
2019-03-25 19:37:45 +01:00
|
|
|
var menuType_val = localStorage.getItem("menuType");
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "ajax.php",
|
|
|
|
data: {
|
|
|
|
menuType: menuType_val,
|
|
|
|
page: "include/functions_menu"
|
|
|
|
},
|
|
|
|
dataType: "json"
|
|
|
|
});
|
2019-02-25 11:54:46 +01:00
|
|
|
}
|
|
|
|
else if($('#menu_full').hasClass('menu_full_collapsed')){
|
2019-02-26 10:43:59 +01:00
|
|
|
localStorage.setItem("menuType", "classic");
|
2019-03-04 08:39:56 +01:00
|
|
|
$('ul.submenu').css('left', '214px');
|
2019-03-25 19:37:45 +01:00
|
|
|
var menuType_val = localStorage.getItem("menuType");
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "ajax.php",
|
|
|
|
data: {
|
|
|
|
menuType: menuType_val,
|
|
|
|
page: "include/functions_menu"
|
|
|
|
},
|
|
|
|
dataType: "json"
|
|
|
|
});
|
2019-02-25 11:54:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$('.logo_full').toggle();
|
|
|
|
$('.logo_icon').toggle();
|
|
|
|
$('#menu_full').toggleClass('menu_full_classic menu_full_collapsed');
|
|
|
|
$('#button_collapse').toggleClass('button_classic button_collapsed');
|
|
|
|
$('div#title_menu').toggleClass('title_menu_classic title_menu_collapsed');
|
|
|
|
$('div#page').toggleClass('page_classic page_collapsed');
|
|
|
|
$('#header_table').toggleClass('header_table_classic header_table_collapsed');
|
|
|
|
$('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed");
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-21 12:44:36 +02:00
|
|
|
var autohidden_menu = <?php echo $autohidden_menu; ?>;
|
2019-01-30 16:18:44 +01:00
|
|
|
var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
|
2014-08-05 15:16:54 +02:00
|
|
|
var id_user = "<?php echo $config['id_user']; ?>";
|
|
|
|
var cookie_name = id_user + '-pandora_menu_state';
|
|
|
|
var cookie_name_encoded = btoa(cookie_name);
|
2019-01-30 16:18:44 +01:00
|
|
|
var click_display = "<?php echo $config['click_display']; ?>";
|
2019-02-25 11:54:46 +01:00
|
|
|
|
2014-05-21 12:44:36 +02:00
|
|
|
|
2014-08-05 15:16:54 +02:00
|
|
|
var menuState = $.cookie(cookie_name_encoded);
|
2014-08-04 14:17:13 +02:00
|
|
|
if (!menuState) {
|
2019-01-30 16:18:44 +01:00
|
|
|
menuState = {};
|
2014-08-04 14:17:13 +02:00
|
|
|
}
|
|
|
|
else {
|
2019-01-30 16:18:44 +01:00
|
|
|
menuState = JSON.parse(menuState);
|
|
|
|
open_submenus();
|
2014-08-04 18:50:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function open_submenus () {
|
2019-01-30 16:18:44 +01:00
|
|
|
$.each(menuState, function (index, value) {
|
|
|
|
if (value)
|
|
|
|
$('div.menu>ul>li#' + index + '>ul').show();
|
|
|
|
});
|
2020-03-26 12:29:38 +01:00
|
|
|
//$('div.menu>ul>li.selected>ul').removeClass('invisible');
|
2014-08-04 18:50:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function close_submenus () {
|
2019-01-30 16:18:44 +01:00
|
|
|
$.each(menuState, function (index, value) {
|
|
|
|
if (value)
|
|
|
|
$('div.menu>ul>li#' + index + '>ul').hide();
|
|
|
|
});
|
2020-03-26 12:29:38 +01:00
|
|
|
//$('div.menu>ul>li.selected>ul').addClass('invisible');
|
2014-08-04 14:17:13 +02:00
|
|
|
}
|
|
|
|
|
2019-02-25 11:54:46 +01:00
|
|
|
|
2009-02-13 21:23:44 +01:00
|
|
|
/* ]]> */
|
2013-04-10 09:57:54 +02:00
|
|
|
</script>
|
2015-03-26 13:12:48 +01:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2019-01-30 16:18:44 +01:00
|
|
|
openTime = 0;
|
|
|
|
openTime2 = 0;
|
|
|
|
handsIn = 0;
|
|
|
|
handsIn2 = 0;
|
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Positionate the submenu elements. Add a negative top.
|
|
|
|
*
|
|
|
|
* @param int index It is the position of li.menu_icon in the ul.
|
|
|
|
* @param string id_submenu It is the id of first level submenu.
|
|
|
|
* @param string id_submenu2 It is the id of second level submenu.
|
|
|
|
* @param int item_height It is the height of a menu item (28 o 35).
|
|
|
|
*
|
|
|
|
* @return (int) The position (in px).
|
|
|
|
*/
|
|
|
|
function menu_calculate_top(index, id_submenu, id_submenu2, item_height){
|
|
|
|
|
|
|
|
var level1 = index;
|
|
|
|
var level2 = $('#'+id_submenu+' ul.submenu > li').length;
|
|
|
|
var level3 = $('#'+id_submenu2+' > li.sub_subMenu').length;
|
|
|
|
var item_height = item_height;
|
|
|
|
|
|
|
|
level2--;
|
|
|
|
if (id_submenu2 !== 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 - ( Math.floor(comp / 2) * item_height);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Positionate in the bottom
|
|
|
|
if (total >= 18) {
|
|
|
|
return (- comp * item_height);
|
|
|
|
}
|
|
|
|
|
|
|
|
// return 0 by default
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the menu items to be positioned.
|
|
|
|
*
|
|
|
|
* @param string item It is the selector of the current element.
|
|
|
|
*
|
|
|
|
* @return Add the top position in a inline style.
|
|
|
|
*/
|
|
|
|
function get_menu_items(item){
|
|
|
|
var item_height = parseInt(item.css('min-height'));
|
|
|
|
var id_submenu = item.attr('id');
|
|
|
|
var id_submenu2 = false;
|
|
|
|
var index = item.index();
|
|
|
|
|
|
|
|
if(item.parent().hasClass('godmode')){
|
|
|
|
index = index+6; // This is because the menu has divided in two parts.
|
|
|
|
}
|
|
|
|
var top_submenu = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
|
|
|
|
top_submenu = top_submenu+'px';
|
|
|
|
$('#'+id_submenu+' ul.submenu').css('top', top_submenu);
|
|
|
|
|
|
|
|
$('.has_submenu').mouseenter(function() {
|
|
|
|
id_submenu2 = item.attr('id');
|
|
|
|
id_submenu2 = $('#'+id_submenu2+' ul.submenu2').attr('id');
|
|
|
|
var top_submenu2 = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
|
|
|
|
top_submenu2 = top_submenu2+'px';
|
|
|
|
$('#'+id_submenu2).css('top', top_submenu2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Show and hide submenus
|
|
|
|
*/
|
|
|
|
if(!click_display){
|
|
|
|
$('.menu_icon').mouseenter(function() {
|
|
|
|
table_hover = $(this);
|
|
|
|
handsIn = 1;
|
|
|
|
openTime = new Date().getTime();
|
|
|
|
$("ul#sub"+table_hover[0].id).show();
|
|
|
|
get_menu_items(table_hover);
|
|
|
|
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();
|
|
|
|
}).mouseleave(function() {
|
|
|
|
table_noHover = $(this);
|
|
|
|
handsIn = 0;
|
|
|
|
setTimeout(function() {
|
|
|
|
opened = new Date().getTime() - openTime;
|
|
|
|
if(opened > 3000 && handsIn == 0) {
|
|
|
|
openTime = 4000;
|
|
|
|
$("ul#sub"+table_noHover[0].id).hide();
|
|
|
|
}
|
|
|
|
}, 2500);
|
|
|
|
});
|
|
|
|
}else{
|
|
|
|
$(document).ready(function() {
|
|
|
|
if (autohidden_menu) {
|
|
|
|
$('.menu_icon').on("click", function() {
|
|
|
|
if( typeof(table_hover) != 'undefined'){
|
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
table_hover = $(this);
|
|
|
|
handsIn = 1;
|
|
|
|
openTime = new Date().getTime();
|
|
|
|
$("ul#sub"+table_hover[0].id).show();
|
2019-03-05 12:54:11 +01:00
|
|
|
get_menu_items(table_hover);
|
2019-01-30 16:18:44 +01:00
|
|
|
}).mouseleave(function() {
|
|
|
|
table_noHover = $(this);
|
|
|
|
handsIn = 0;
|
|
|
|
setTimeout(function() {
|
|
|
|
opened = new Date().getTime() - openTime;
|
2019-03-05 12:54:11 +01:00
|
|
|
if(opened > 5000 && handsIn == 0) {
|
|
|
|
openTime = 6000;
|
|
|
|
$("ul#sub"+table_noHover[0].id).hide();
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2019-03-05 12:54:11 +01:00
|
|
|
}, 5500);
|
2019-01-30 16:18:44 +01:00
|
|
|
});
|
2019-03-05 12:54:11 +01:00
|
|
|
} else {
|
|
|
|
$('.menu_icon').on("click", function() {
|
|
|
|
if( typeof(table_hover) != 'undefined'){
|
2019-01-30 16:18:44 +01:00
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
2019-03-05 12:54:11 +01:00
|
|
|
}
|
|
|
|
table_hover = $(this);
|
|
|
|
handsIn = 1;
|
|
|
|
openTime = new Date().getTime();
|
|
|
|
$("ul#sub"+table_hover[0].id).show();
|
|
|
|
get_menu_items(table_hover);
|
2019-01-30 16:18:44 +01:00
|
|
|
});
|
2019-03-04 08:39:56 +01:00
|
|
|
}
|
2019-03-05 12:54:11 +01:00
|
|
|
});
|
|
|
|
}
|
2019-03-04 08:39:56 +01:00
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
$('.has_submenu').mouseenter(function() {
|
|
|
|
table_hover2 = $(this);
|
|
|
|
handsIn2 = 1;
|
|
|
|
openTime2 = new Date().getTime();
|
|
|
|
$("#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();
|
|
|
|
}).mouseleave(function() {
|
|
|
|
table_noHover2 = table_hover2;
|
|
|
|
handsIn2 = 0;
|
|
|
|
setTimeout(function() {
|
|
|
|
opened = new Date().getTime() - openTime2;
|
|
|
|
if(opened >= 3000 && handsIn2 == 0) {
|
|
|
|
openTime2 = 4000;
|
|
|
|
$("ul#sub"+table_hover2[0].id).hide();
|
|
|
|
}
|
|
|
|
}, 3500);
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
if(!click_display){
|
|
|
|
$('#container').click(function() {
|
2019-03-04 08:39:56 +01:00
|
|
|
openTime = 4000;
|
|
|
|
if( typeof(table_hover) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
|
|
|
if( typeof(table_hover2) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover2[0].id).hide();
|
2019-03-05 12:54:11 +01:00
|
|
|
});
|
|
|
|
}else{
|
|
|
|
$('#main').click(function() {
|
2019-03-04 08:39:56 +01:00
|
|
|
openTime = 4000;
|
|
|
|
if( typeof(table_hover) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
|
|
|
if( typeof(table_hover2) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover2[0].id).hide();
|
|
|
|
});
|
2019-03-05 12:54:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('div.menu>ul>li>ul>li>a').click(function() {
|
|
|
|
openTime = 4000;
|
|
|
|
if( typeof(table_hover) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
|
|
|
if( typeof(table_hover2) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover2[0].id).hide();
|
|
|
|
});
|
|
|
|
|
|
|
|
$('div.menu>ul>li>ul>li>ul>li>a').click(function() {
|
|
|
|
openTime = 4000;
|
|
|
|
if( typeof(table_hover) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover[0].id).hide();
|
|
|
|
if( typeof(table_hover2) != 'undefined')
|
|
|
|
$("ul#sub"+table_hover2[0].id).hide();
|
2019-03-04 08:39:56 +01:00
|
|
|
});
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2019-03-05 12:54:11 +01:00
|
|
|
});
|
|
|
|
|
2015-03-26 13:12:48 +01:00
|
|
|
</script>
|