mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
showing who is replying in the active users block
This commit is contained in:
@@ -613,7 +613,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
'event:topic_deleted', 'event:topic_restored', 'event:topic:locked',
|
||||
'event:topic_unlocked', 'event:topic_pinned', 'event:topic_unpinned',
|
||||
'event:topic_moved', 'event:post_edited', 'event:post_deleted', 'event:post_restored',
|
||||
'posts.favourite', 'user.isOnline', 'posts.upvote', 'posts.downvote'
|
||||
'posts.favourite', 'user.isOnline', 'posts.upvote', 'posts.downvote',
|
||||
'event:topic.replyStart', 'event:topic.replyStop'
|
||||
]);
|
||||
|
||||
socket.on('get_users_in_room', function(data) {
|
||||
@@ -876,6 +877,14 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('event:topic.replyStart', function(uid) {
|
||||
$('.thread_active_users [data-uid="' + uid + '"]').addClass('replying');
|
||||
});
|
||||
|
||||
socket.on('event:topic.replyStop', function(uid) {
|
||||
$('.thread_active_users [data-uid="' + uid + '"]').removeClass('replying');
|
||||
});
|
||||
|
||||
function adjust_rep(value, pid, uid) {
|
||||
var votes = $('li[data-pid="' + pid + '"] .votes'),
|
||||
reputationElements = $('.reputation[data-uid="' + uid + '"]'),
|
||||
|
||||
Reference in New Issue
Block a user