Commit f3a8436e by Greg Price

Tweak forum topic browse menu

The filter box will now remain fixed while the rest of the menu scrolls.
This also fixes a minor cosmetic bug in which the thread list would
overflow its container if the user opened the browse menu, scrolled the
page, and then closed the browse menu.
parent 890eba26
......@@ -107,8 +107,9 @@ if Backbone?
headerHeight = @$(".forum-nav-header").outerHeight()
refineBarHeight = @$(".forum-nav-refine-bar").outerHeight()
browseFilterHeight = @$(".forum-nav-browse-filter").outerHeight()
@$('.forum-nav-thread-list').css('height', (sidebarHeight - headerHeight - refineBarHeight - 2) + 'px')
@$('.forum-nav-browse-menu-wrapper').css('height', (sidebarHeight - headerHeight - 2) + 'px')
@$('.forum-nav-browse-menu').css('height', (sidebarHeight - headerHeight - browseFilterHeight - 2) + 'px')
# Because we want the behavior that when the body is clicked the menu is
......@@ -267,6 +268,7 @@ if Backbone?
@$(".forum-nav-thread-list-wrapper").hide()
$(".forum-nav-browse-filter-input").focus()
$("body").bind "click", @hideBrowseMenu
@updateSidebar()
hideBrowseMenu: =>
if @isBrowseMenuVisible()
......@@ -274,6 +276,7 @@ if Backbone?
@$(".forum-nav-browse-menu-wrapper").hide()
@$(".forum-nav-thread-list-wrapper").show()
$("body").unbind "click", @hideBrowseMenu
@updateSidebar()
toggleBrowseMenu: (event) =>
event.preventDefault()
......
......@@ -64,7 +64,6 @@
// Browse menu
// -----------
.forum-nav-browse-menu-wrapper {
overflow-y: scroll;
border-bottom: 1px solid $gray-l3;
background: $gray-l5;
}
......@@ -87,6 +86,10 @@
width: 100%;
}
.forum-nav-browse-menu {
overflow-y: scroll;
}
.forum-nav-browse-title .icon {
margin-right: ($baseline/2);
}
......
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