|
|
@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
/* globals define, app, config, socket, ajaxify */
|
|
|
|
/* globals define, app, config, socket, ajaxify */
|
|
|
|
|
|
|
|
|
|
|
|
define('forum/topic/browsing', ['translator'], function(translator) {
|
|
|
|
define('forum/topic/browsing', function() {
|
|
|
|
|
|
|
|
|
|
|
|
var Browsing = {};
|
|
|
|
var Browsing = {};
|
|
|
|
|
|
|
|
|
|
|
@ -29,6 +29,7 @@ define('forum/topic/browsing', ['translator'], function(translator) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
increaseUserCount(1);
|
|
|
|
increaseUserCount(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Browsing.onUserStatusChange(data);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Browsing.onUserLeave = function(uid) {
|
|
|
|
Browsing.onUserLeave = function(uid) {
|
|
|
@ -56,8 +57,8 @@ define('forum/topic/browsing', ['translator'], function(translator) {
|
|
|
|
function updateBrowsingUsers(data) {
|
|
|
|
function updateBrowsingUsers(data) {
|
|
|
|
var activeEl = $('[component="topic/browsing/list"]');
|
|
|
|
var activeEl = $('[component="topic/browsing/list"]');
|
|
|
|
var user = activeEl.find('a[data-uid="'+ data.uid + '"]');
|
|
|
|
var user = activeEl.find('a[data-uid="'+ data.uid + '"]');
|
|
|
|
if (user.length && data.status === 'offline') {
|
|
|
|
if (user.length) {
|
|
|
|
user.parent().remove();
|
|
|
|
user.parent().toggleClass('hidden', data.status === 'offline');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|