From 463a426b10485cfe1af5b5533d5ca2be0ab78086 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 14 Jun 2015 22:07:41 +0200 Subject: [PATCH] Make long list scrollable in navbar --- static/css/style-munstrap.css | 6 ++++++ templates/partial/footer.tmpl | 5 +++++ templates/partial/head.tmpl | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/static/css/style-munstrap.css b/static/css/style-munstrap.css index 474ac39..7266950 100644 --- a/static/css/style-munstrap.css +++ b/static/css/style-munstrap.css @@ -42,3 +42,9 @@ ul.groupview, ul.groupview ul { display: block; float: left; } + +.scrollable-menu { + height: auto; + max-height: 200px; + overflow-x: hidden; +} diff --git a/templates/partial/footer.tmpl b/templates/partial/footer.tmpl index 62263e4..e69d1b6 100644 --- a/templates/partial/footer.tmpl +++ b/templates/partial/footer.tmpl @@ -22,6 +22,11 @@ $('.nav-tabs a').on('shown', function (e) { window.location.hash = e.target.hash; }); + function set_scrollable_menu_height(){ + $(".scrollable-menu").css("max-height", ($(window).height() - 50)+ "px"); + } + set_scrollable_menu_height(); + $( window ).resize(set_scrollable_menu_height); diff --git a/templates/partial/head.tmpl b/templates/partial/head.tmpl index 9250da4..40a862a 100644 --- a/templates/partial/head.tmpl +++ b/templates/partial/head.tmpl @@ -36,7 +36,7 @@
  • ">Home