mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
moved addActiveUser code to widget-essentials
This commit is contained in:
@@ -83,8 +83,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
|
||||
topic.hide().fadeIn('slow');
|
||||
|
||||
addActiveUser(data);
|
||||
|
||||
socket.emit('categories.getPageCount', templates.get('category_id'), function(err, newPageCount) {
|
||||
pagination.recreatePaginationLinks(newPageCount);
|
||||
});
|
||||
@@ -94,21 +92,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
});
|
||||
}
|
||||
|
||||
function addActiveUser(data) {
|
||||
var activeUser = $('.category-sidebar .active-users').find('a[data-uid="' + data.uid + '"]');
|
||||
if(!activeUser.length) {
|
||||
var newUser = templates.prepare(templates['category'].blocks['active_users']).parse({
|
||||
active_users: [{
|
||||
uid: data.uid,
|
||||
username: data.username,
|
||||
userslug: data.userslug,
|
||||
picture: data.teaser_userpicture
|
||||
}]
|
||||
});
|
||||
$(newUser).appendTo($('.category-sidebar .active-users'));
|
||||
}
|
||||
}
|
||||
|
||||
Category.onTopicsLoaded = function(topics) {
|
||||
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
||||
topics: topics
|
||||
|
||||
Reference in New Issue
Block a user