mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-28 03:10:45 +00:00
modified msg-reply;modified atAutocomplete member_list js
This commit is contained in:
parent
9c46c2ae93
commit
9ef3d6158f
@ -199,11 +199,10 @@ addConfirmTo($('#quit-group'), '确定要退出?');
|
|||||||
addConfirmTo($('.cancel-share'), '确定要取消共享该目录?');
|
addConfirmTo($('.cancel-share'), '确定要取消共享该目录?');
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var member_list = [];
|
var member_list = [], nickname, pinyin;
|
||||||
{% for member in members %}
|
{% for member in members %}
|
||||||
var nickname = "{{ member.user_name|email2nickname }}";
|
nickname = '{{ member.user_name|email2nickname }}';
|
||||||
var pinyin = "{{ member.user_name|email2nickname|char2pinyin }}";
|
pinyin = '{{ member.user_name|email2nickname|char2pinyin }}';
|
||||||
|
|
||||||
member_list.push({value:nickname + pinyin, label:nickname});
|
member_list.push({value:nickname + pinyin, label:nickname});
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
addAtAutocomplete('#message', '#group-message-form', member_list);
|
addAtAutocomplete('#message', '#group-message-form', member_list);
|
||||||
|
@ -7,16 +7,19 @@ $('.reply, .replyclose').hover(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
$('.reply').click(function() {
|
$('.reply').click(function() {
|
||||||
var msg_id = $(this).attr('data'),
|
var myself = $(this),
|
||||||
|
msg_id = $(this).attr('data'),
|
||||||
msg_bd = $(this).parent(),
|
msg_bd = $(this).parent(),
|
||||||
reply_cnt = msg_bd.find('.reply-cnt');
|
reply_cnt = msg_bd.find('.reply-cnt');
|
||||||
|
msg_bd.children('.reply-bd').html('<img src="{{MEDIA_URL}}img/loading-icon.gif" alt="加载中..." />');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ SITE_ROOT }}group/reply/' + msg_id + '/',
|
url: '{{ SITE_ROOT }}group/reply/' + msg_id + '/',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
cache: false,
|
|
||||||
contentType: 'application/json; charset=utf-8',
|
contentType: 'application/json; charset=utf-8',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
msg_bd.children('.reply-bd').html(data['html']).attr('class', 'reply-bd');
|
msg_bd.children('.reply-bd').html(data['html']).attr('class', 'reply-bd');
|
||||||
|
myself.addClass('hide');
|
||||||
|
myself.next().removeClass('hide'); // show 'replyclose'
|
||||||
var reply_input = msg_bd.find('.reply-input'),
|
var reply_input = msg_bd.find('.reply-input'),
|
||||||
error = msg_bd.find('.error');
|
error = msg_bd.find('.error');
|
||||||
function handleReplyInput() {
|
function handleReplyInput() {
|
||||||
@ -50,8 +53,6 @@ $('.reply').click(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).addClass('hide');
|
|
||||||
$(this).next().removeClass('hide'); // show 'replyclose'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.replyclose').click(function() {
|
$('.replyclose').click(function() {
|
||||||
|
BIN
media/img/loading-icon.gif
Normal file
BIN
media/img/loading-icon.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue
Block a user