diff --git a/css/style.css b/css/style.css index f1491f2..5b54aba 100644 --- a/css/style.css +++ b/css/style.css @@ -432,7 +432,7 @@ fieldset table { background:none repeat scroll 0 0 transparent; } -#div_menuSoftware { +.div_menuDropdown { position: absolute; top: 30px; left: 0px; @@ -444,7 +444,7 @@ fieldset table { z-index: 99; } -#div_menuSoftware p { +.div_menuDropdown p { color: #F0F0F0; margin: 0 0 0 0; padding-top: 4px; @@ -455,12 +455,12 @@ fieldset table { border-top: 0px; } -#div_menuSoftware a { +.div_menuDropdown a { color: #F0F0F0; text-decoration: none; } -#div_menuSoftware a:hover, #div_menuSoftware a:focus { +.div_menuDropdown a:hover, .div_menuDropdown a:focus { color: #6464E6; } diff --git a/images/ico_chat.png b/images/ico_chat.png new file mode 100644 index 0000000..d9e13d3 Binary files /dev/null and b/images/ico_chat.png differ diff --git a/images/ico_forum.png b/images/ico_forum.png new file mode 100644 index 0000000..3396178 Binary files /dev/null and b/images/ico_forum.png differ diff --git a/images/ico_soundcloud.png b/images/ico_soundcloud.png new file mode 100644 index 0000000..a70752d Binary files /dev/null and b/images/ico_soundcloud.png differ diff --git a/includes/header.php b/includes/header.php index 4d6cb74..fa7721e 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,12 +1,14 @@ - function itemSoftwareClicked(event){ + function closeAllMenus(){ + var objSoftwareMenu = document.getElementById("div_menuSoftware"); + var objRepositoriesMenu = document.getElementById("div_menuRepositories"); + var objSupportMenu = document.getElementById("div_menuSupport"); + var objCommunityMenu = document.getElementById("div_menuCommunity"); + + if (objSoftwareMenu.style.visibility == "visible") + objSoftwareMenu.style.visibility = "hidden"; + + if (objRepositoriesMenu.style.visibility == "visible") + objRepositoriesMenu.style.visibility = "hidden"; + + if (objSupportMenu.style.visibility == "visible") + objSupportMenu.style.visibility = "hidden"; + + if (objCommunityMenu.style.visibility == "visible") + objCommunityMenu.style.visibility = "hidden"; + }; + + function menuItemClicked(event, menu, itemName){ event.stopPropagation(); - var objSoftwareMenu = document.getElementById("div_menuSoftware"); + closeAllMenus(); - if (objSoftwareMenu.style.visibility != "visible") - { - var leftPos = document.getElementById("item-soft").getBoundingClientRect().left - 1; - objSoftwareMenu.style.left = "" + leftPos + "px"; - objSoftwareMenu.style.visibility = "visible"; - } - else + //if (menu.style.visibility != "visible") { - objSoftwareMenu.style.visibility = "hidden"; + var leftPos = document.getElementById(itemName).getBoundingClientRect().left - 1; + menu.style.left = "" + leftPos + "px"; + menu.style.visibility = "visible"; } + //else + //{ + // menu.style.visibility = "hidden"; + //} return false; }; function bodyClicked(){ - var objSoftwareMenu = document.getElementById("div_menuSoftware"); - - if (objSoftwareMenu.style.visibility == "visible") - objSoftwareMenu.style.visibility = "hidden"; - + closeAllMenus(); return true; }; + + function itemSoftwareClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSoftware"), "item-soft"); }; + function itemRepositoriesClicked(event){ return menuItemClicked(event, document.getElementById("div_menuRepositories"), "item-repos"); }; + function itemSupportClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSupport"), "item-support"); }; + function itemCommunityClicked(event) { return menuItemClicked(event, document.getElementById("div_menuCommunity"), "item-community"); }; +