|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
'use strict';
|
|
|
|
|
/* globals define, app, ajaxify, socket, RELATIVE_PATH */
|
|
|
|
|
/* globals define, app, config, ajaxify, socket, bootbox, translator */
|
|
|
|
|
|
|
|
|
|
define('forum/account/header', [
|
|
|
|
|
'coverPhoto',
|
|
|
|
@ -30,7 +30,16 @@ define('forum/account/header', [
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
components.get('account/chat').on('click', function() {
|
|
|
|
|
app.newChat(theirid);
|
|
|
|
|
socket.emit('modules.chats.hasPrivateChat', theirid, function(err, roomId) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return app.alertError(err.message);
|
|
|
|
|
}
|
|
|
|
|
if (roomId) {
|
|
|
|
|
app.openChat(roomId);
|
|
|
|
|
} else {
|
|
|
|
|
app.newChat(theirid);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
components.get('account/ban').on('click', banAccount);
|
|
|
|
@ -65,7 +74,7 @@ define('forum/account/header', [
|
|
|
|
|
}, callback);
|
|
|
|
|
},
|
|
|
|
|
function() {
|
|
|
|
|
uploader.open(RELATIVE_PATH + '/api/user/' + ajaxify.data.userslug + '/uploadcover', { uid: yourid }, 0, function(imageUrlOnServer) {
|
|
|
|
|
uploader.open(config.RELATIVE_PATH + '/api/user/' + ajaxify.data.userslug + '/uploadcover', { uid: yourid }, 0, function(imageUrlOnServer) {
|
|
|
|
|
components.get('account/cover').css('background-image', 'url(' + imageUrlOnServer + '?v=' + Date.now() + ')');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|