mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38:15 +00:00
fixed file comment bug
This commit is contained in:
@@ -377,11 +377,13 @@ $('#shared-link').click(function() {
|
|||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
$('#bottom-bar').append('<button id="comment">{% trans "Comment" %}</button>');
|
$('#bottom-bar').append('<button id="comment">{% trans "Comment" %}</button>');
|
||||||
$('#file-comment').css({'max-height':$(window).height() - parseInt($('#file-comment').css('bottom'))});
|
$('#file-comment').css({'max-height':$(window).height() - parseInt($('#file-comment').css('bottom'))});
|
||||||
|
{% if groups %}
|
||||||
var gids = '';
|
var gids = '';
|
||||||
{% for g in groups %}
|
{% for g in groups %}
|
||||||
gids += '{{ g.id }}_';
|
gids += '{{ g.id }}_';
|
||||||
{% endfor %}
|
{% 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'});
|
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) {
|
$('#comment-input').bind('autocompleteopen', function(e, ui) {
|
||||||
var menu = $(this).autocomplete('widget');
|
var menu = $(this).autocomplete('widget');
|
||||||
if (parseInt(menu.css('top')) > 0) {
|
if (parseInt(menu.css('top')) > 0) {
|
||||||
|
@@ -59,10 +59,10 @@ $(document).click(function(e) {
|
|||||||
$('#to-group, #to-group-caret').addClass('hide');
|
$('#to-group, #to-group-caret').addClass('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var btn_height = $('#bottom-bar button').outerHeight();
|
var btn_height = $('#bottom-bar button').outerHeight();
|
||||||
$('#recommend-to-group-caret, #to-group-caret, #comment-caret').css({'bottom': btn_height + 1});
|
$('#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()});
|
$('#file-comment, #to-group, #recommend-to-group-form').css({'bottom': btn_height + 1 + $('.outer-caret').outerHeight()});
|
||||||
});
|
});
|
||||||
{% endif %}
|
|
||||||
|
Reference in New Issue
Block a user