mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
component="header/usercontrol"; also fixes user status bug
This commit is contained in:
@@ -487,13 +487,13 @@ app.cacheBuster = null;
|
|||||||
};
|
};
|
||||||
|
|
||||||
function handleStatusChange() {
|
function handleStatusChange() {
|
||||||
$('#user-control-list .user-status').off('click').on('click', function(e) {
|
$('[component="header/usercontrol"] [data-status]').off('click').on('click', function(e) {
|
||||||
var status = $(this).attr('data-status');
|
var status = $(this).attr('data-status');
|
||||||
socket.emit('user.setStatus', status, function(err, data) {
|
socket.emit('user.setStatus', status, function(err, data) {
|
||||||
if(err) {
|
if(err) {
|
||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
$('#logged-in-menu #user_label #user-profile-link>i').attr('class', 'fa fa-circle status ' + status);
|
$('[component="user/status"]').attr('class', 'fa fa-circle status ' + status);
|
||||||
app.user.status = status;
|
app.user.status = status;
|
||||||
});
|
});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user