Limit the size of the projects dropdown menu. #1016

This commit is contained in:
Andrew Smith 2012-05-22 06:33:13 +01:00 committed by Felix Schäfer
parent 7c1b17509f
commit 4956e9ca93
2 changed files with 19 additions and 0 deletions

View File

@ -571,6 +571,13 @@ jQuery(document).ready(function($) {
// Click on the menu header with a dropdown menu
$('#account-nav .drop-down').live('click', function(event) {
var menuItem = $(this);
var menuUl = menuItem.find('> ul');
menuUl.css('height', 'auto');
if(menuUl.height() > $.viewportHeight()) {
var windowHeight = $.viewportHeight() - 150;
menuUl.css({'height': windowHeight});
}
toggleTopMenu(menuItem);

View File

@ -2797,6 +2797,17 @@ input: -moz-placeholder {
border: 1px solid #b7b7b7;
border-top: 0px;
background-color: #FFFFFF;
display:none;
position:absolute;
height:auto;
min-width:200px;
left:-1px;
z-index:20;
border: 1px solid #b7b7b7;
border-top: 0px;
background-color:#FFFFFF;
overflow: hidden;
overflow-y: auto;
}
#header li.last-child > ul {
@ -2826,6 +2837,7 @@ input: -moz-placeholder {
margin-right: 6px;
height: 15px;
line-height: 15px;
overflow: hidden;
}
#header li.drop-down li > a.separator {