Commit 5d4bb0ef by José Padilla

Merge pull request #3038 from jpadilla/dropdown

Set dynamic maximum height for dropdown widgets
parents 8c5fc2a9 33a08928
......@@ -151,10 +151,10 @@
<script src="{{ base_url }}/js/theme.js"></script>
<script>
//$('.side-nav').scrollspy()
var shiftWindow = function() {
scrollBy(0, -50)
};
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
......@@ -162,12 +162,12 @@
event.stopPropagation();
});
// Dynamically force sidenav to no higher than browser window
$('.side-nav').css('max-height', window.innerHeight - 130);
// Dynamically force sidenav/dropdown to no higher than browser window
$('.side-nav, .dropdown-menu').css('max-height', window.innerHeight - 130);
$(function() {
$(window).resize(function() {
$('.side-nav').css('max-height', window.innerHeight - 130);
$('.side-nav, .dropdown-menu').css('max-height', window.innerHeight - 130);
});
});
</script>
......
......@@ -6,6 +6,7 @@ pre {
.dropdown .dropdown-menu {
display: none;
overflow-y: scroll;
}
.dropdown.open .dropdown-menu {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment