mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 17:27:13 +02:00
Merge remote-tracking branch 'origin/master' into socket.io1.x
This commit is contained in:
@@ -55,7 +55,6 @@ define('forum/account/edit', ['forum/account/header', 'uploader'], function(head
|
||||
|
||||
if (data.picture) {
|
||||
$('#user-current-picture').attr('src', data.picture);
|
||||
$('#user_label img').attr('src', data.picture);
|
||||
}
|
||||
|
||||
if (data.gravatarpicture) {
|
||||
@@ -70,20 +69,34 @@ define('forum/account/edit', ['forum/account/header', 'uploader'], function(head
|
||||
});
|
||||
|
||||
$('.account-username-box').attr('data-userslug', data.userslug);
|
||||
|
||||
$('#user-profile-link').attr('href', config.relative_path + '/user/' + data.userslug);
|
||||
$('#user-header-name').text(userData.username);
|
||||
}
|
||||
|
||||
if (currentEmail !== data.email) {
|
||||
currentEmail = data.email;
|
||||
$('#confirm-email').removeClass('hide');
|
||||
}
|
||||
|
||||
updateHeader(data.picture, userData.username, data.userslug);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateHeader(picture, username, userslug) {
|
||||
if (parseInt(ajaxify.variables.get('theirid'), 10) !== parseInt(ajaxify.variables.get('yourid'), 10)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (picture) {
|
||||
$('#user-header-picture').attr('src', picture);
|
||||
}
|
||||
|
||||
if (username && userslug) {
|
||||
$('#user-profile-link').attr('href', config.relative_path + '/user/' + userslug);
|
||||
$('#user-header-name').text(username);
|
||||
}
|
||||
}
|
||||
|
||||
function handleImageChange() {
|
||||
function selectImageType(type) {
|
||||
$('#gravatar-box .fa-check').toggle(type === 'gravatar');
|
||||
@@ -117,10 +130,10 @@ define('forum/account/edit', ['forum/account/header', 'uploader'], function(head
|
||||
|
||||
if (selectedImageType === 'gravatar') {
|
||||
$('#user-current-picture').attr('src', gravatarPicture);
|
||||
$('#user-header-picture').attr('src', gravatarPicture);
|
||||
updateHeader(gravatarPicture);
|
||||
} else if (selectedImageType === 'uploaded') {
|
||||
$('#user-current-picture').attr('src', uploadedPicture);
|
||||
$('#user-header-picture').attr('src', uploadedPicture);
|
||||
updateHeader(uploadedPicture);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -156,7 +169,7 @@ define('forum/account/edit', ['forum/account/header', 'uploader'], function(head
|
||||
|
||||
$('#user-current-picture').attr('src', urlOnServer);
|
||||
$('#user-uploaded-picture').attr('src', urlOnServer);
|
||||
$('#user-header-picture').attr('src', urlOnServer);
|
||||
updateHeader(urlOnServer);
|
||||
uploadedPicture = urlOnServer;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = function(Categories) {
|
||||
return post.uid;
|
||||
}).filter(function(uid, index, array) {
|
||||
return parseInt(uid, 10) !== 0 && array.indexOf(uid) === index;
|
||||
}).slice(0, 24);
|
||||
});
|
||||
|
||||
next(null, uids);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user