1. Unofficial Redmine Clones
  2. Untitled project
  3. chiliproject

Commits

Andrew Smith  committed 2e2f191

Limit the size of the projects dropdown menu. #1016

  • Participants
  • Parent commits f55592d
  • Branches default

Comments (0)

Files changed (2)

File public/javascripts/application.js

View file
   // 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);
 

File public/stylesheets/application.css

View file
   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 {
   margin-right: 6px;
   height: 15px;
   line-height: 15px;
+  overflow: hidden;
 }
 
 #header li.drop-down li > a.separator {