From 680b5e17cc723f2d67b099b403d84287d6a92b88 Mon Sep 17 00:00:00 2001 From: llj Date: Sat, 12 Jan 2013 20:41:00 +0800 Subject: [PATCH] [file_comment] fixed max-height bug --- templates/file_view.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/file_view.html b/templates/file_view.html index 472272c378..7ff81b2d36 100644 --- a/templates/file_view.html +++ b/templates/file_view.html @@ -294,7 +294,7 @@ $('#file-op .history').click(function () { {% if request.user.is_authenticated %} $('#main-panel').css({'margin-bottom':0}); $('#bottom-bar').append(''); -$('#file-comment').css({'max-height':$(window).height() - parseInt($('#file-comment').css('bottom'))}); +$('#file-comment').css({'max-height':$(window).height() - $('#bottom-bar').height() - $('#comment-caret').height()}); {% if groups %} var gids = ''; {% for g in groups %} @@ -313,6 +313,7 @@ $('#comment-input').bind('autocompleteopen', function(e, ui) { {% if comment_open %} $('#file-comment, #comment-caret').removeClass('hide'); $(function() { $('#comment-caret').css({'left': $('#comment').offset().left}); }); +$('#comment-list').css({'max-height':parseInt($('#file-comment').css('max-height')) - $('#file-comment-form').outerHeight(true), 'overflow':'auto'}); {% endif %} $('#comment').click(function() { if ($('#file-comment').hasClass('hide')) {