From 4c66ca6f80f28440df60c143b8d72b0ca3f9373f Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Thu, 8 Sep 2016 09:17:58 +0200 Subject: [PATCH] fixes navbar size when resizing window --- app/assets/javascripts/sidebar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js index ba7e38cdb..35573c85e 100644 --- a/app/assets/javascripts/sidebar.js +++ b/app/assets/javascripts/sidebar.js @@ -237,6 +237,7 @@ function resizeSidebarContents() { var wrapper = $("#wrapper"); var tree = $("#sidebar-wrapper .tree"); var toggled = sessionIsSidebarToggled(); + var navbar = $(".navbar-secondary"); if (tree.length && tree.length == 1) { tree.css( @@ -248,8 +249,10 @@ function resizeSidebarContents() { if (toggled === null) { if ($(window).width() < SCREEN_SIZE_LARGE) { wrapper.addClass("toggled"); + navbar.addClass("navbar-without-sidebar"); } else { wrapper.removeClass("toggled"); + navbar.removeClass("navbar-without-sidebar"); } } }