/browse: Proper resizing of top level grid view

This commit is contained in:
Kovid Goyal 2010-10-16 12:07:31 -06:00
parent 9beeea57b1
commit eb83ea3b9f

View File

@ -74,6 +74,14 @@ function init() {
} }
// Top-level feed {{{ // Top-level feed {{{
function toplevel_layout() {
var last = $(".toplevel li").last();
var title = $('.toplevel h3').first();
var bottom = last.position().top + last.height() - title.position().top;
$("#main").height(Math.max(200, bottom));
}
function toplevel() { function toplevel() {
$(".sort_select").hide(); $(".sort_select").hide();
@ -82,10 +90,8 @@ function toplevel() {
window.location = href; window.location = href;
}); });
toplevel_layout();
var last = $(".toplevel li").last(); $(window).resize(toplevel_layout);
var bottom = last.position().top + last.height();
$("#main").height(Math.max(680, bottom+150));
} }
// }}} // }}}