You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
830 B
JavaScript
35 lines
830 B
JavaScript
'use strict';
|
|
|
|
|
|
define('forum/account/profile', [
|
|
'forum/account/header',
|
|
'components',
|
|
], function (header) {
|
|
var Account = {};
|
|
|
|
Account.init = function () {
|
|
header.init();
|
|
|
|
app.enterRoom('user/' + ajaxify.data.theirid);
|
|
|
|
processPage();
|
|
|
|
socket.removeListener('event:user_status_change', onUserStatusChange);
|
|
socket.on('event:user_status_change', onUserStatusChange);
|
|
};
|
|
|
|
function processPage() {
|
|
$('[component="posts"] [component="post/content"] img:not(.not-responsive), [component="aboutme"] img:not(.not-responsive)').addClass('img-responsive');
|
|
}
|
|
|
|
function onUserStatusChange(data) {
|
|
if (parseInt(ajaxify.data.theirid, 10) !== parseInt(data.uid, 10)) {
|
|
return;
|
|
}
|
|
|
|
app.updateUserStatus($('.account [data-uid="' + data.uid + '"] [component="user/status"]'), data.status);
|
|
}
|
|
|
|
return Account;
|
|
});
|