1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

fixed file comment bug

This commit is contained in:
llj
2012-11-28 19:39:22 +08:00
parent 63e5b2f4c3
commit 83b10e13b0
2 changed files with 3 additions and 1 deletions

View File

@@ -377,11 +377,13 @@ $('#shared-link').click(function() {
{% if request.user.is_authenticated %}
$('#bottom-bar').append('<button id="comment">{% trans "Comment" %}</button>');
$('#file-comment').css({'max-height':$(window).height() - parseInt($('#file-comment').css('bottom'))});
{% if groups %}
var gids = '';
{% for g in groups %}
gids += '{{ g.id }}_';
{% endfor %}
addAtAutocomplete('#comment-input', '#comment-container', gids, "{% url 'group_attention' %}", {'width':'315px','padding-left':'1px','height':'36px','margin':'0','font-size':'13px', 'font-family':'Arial, Helvetica, sans-serif', 'line-height': '1.5em', 'border':'1px solid #ddd'});
{% endif %}
$('#comment-input').bind('autocompleteopen', function(e, ui) {
var menu = $(this).autocomplete('widget');
if (parseInt(menu.css('top')) > 0) {

View File

@@ -59,10 +59,10 @@ $(document).click(function(e) {
$('#to-group, #to-group-caret').addClass('hide');
}
});
{% endif %}
$(function() {
var btn_height = $('#bottom-bar button').outerHeight();
$('#recommend-to-group-caret, #to-group-caret, #comment-caret').css({'bottom': btn_height + 1});
$('#file-comment, #to-group, #recommend-to-group-form').css({'bottom': btn_height + 1 + $('.outer-caret').outerHeight()});
});
{% endif %}