mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
* Fixes #5572 * Adding trailing commas but in protest
This commit is contained in:
committed by
psychobunny
parent
0fac75c055
commit
da183e196a
@@ -75,7 +75,9 @@ define('chat', [
|
||||
});
|
||||
}
|
||||
} else {
|
||||
socket.emit('modules.chats.loadRoom', { roomId: data.roomId }, function (err, roomData) {
|
||||
socket.emit('modules.chats.loadRoom', {
|
||||
roomId: data.roomId,
|
||||
}, function (err, roomData) {
|
||||
if (err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
@@ -108,7 +110,10 @@ define('chat', [
|
||||
};
|
||||
|
||||
module.loadChatsDropdown = function (chatsListEl) {
|
||||
socket.emit('modules.chats.getRecentChats', { uid: app.user.uid, after: 0 }, function (err, data) {
|
||||
socket.emit('modules.chats.getRecentChats', {
|
||||
uid: app.user.uid,
|
||||
after: 0,
|
||||
}, function (err, data) {
|
||||
if (err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
@@ -160,7 +165,7 @@ define('chat', [
|
||||
var dragged = false;
|
||||
|
||||
chatModal.attr('id', 'chat-modal-' + data.roomId);
|
||||
chatModal.attr('roomId', data.roomId);
|
||||
chatModal.attr('data-roomid', data.roomId);
|
||||
chatModal.attr('intervalId', 0);
|
||||
chatModal.attr('UUID', uuid);
|
||||
chatModal.css('position', 'fixed');
|
||||
@@ -208,7 +213,7 @@ define('chat', [
|
||||
components.get('chat/input').val(text);
|
||||
});
|
||||
|
||||
ajaxify.go('user/' + app.user.userslug + '/chats/' + chatModal.attr('roomId'));
|
||||
ajaxify.go('user/' + app.user.userslug + '/chats/' + chatModal.attr('data-roomid'));
|
||||
module.close(chatModal);
|
||||
}
|
||||
|
||||
@@ -249,14 +254,14 @@ define('chat', [
|
||||
messagesEl.css('height', module.calculateChatListHeight(chatModal));
|
||||
});
|
||||
|
||||
Chats.addRenameHandler(chatModal.attr('roomId'), chatModal.find('[component="chat/room/name"]'));
|
||||
Chats.addRenameHandler(chatModal.attr('data-roomid'), chatModal.find('[component="chat/room/name"]'));
|
||||
|
||||
Chats.addSendHandlers(chatModal.attr('roomId'), chatModal.find('#chat-message-input'), chatModal.find('#chat-message-send-btn'));
|
||||
Chats.addSendHandlers(chatModal.attr('data-roomid'), chatModal.find('#chat-message-input'), chatModal.find('#chat-message-send-btn'));
|
||||
|
||||
Chats.createTagsInput(chatModal.find('.users-tag-input'), data);
|
||||
Chats.createAutoComplete(chatModal.find('[component="chat/input"]'));
|
||||
|
||||
Chats.addScrollHandler(chatModal.attr('roomId'), data.uid, chatModal.find('.chat-content'));
|
||||
Chats.addScrollHandler(chatModal.attr('data-roomid'), data.uid, chatModal.find('.chat-content'));
|
||||
|
||||
taskbar.push('chat', chatModal.attr('UUID'), {
|
||||
title: data.roomName || (data.users.length ? data.users[0].username : ''),
|
||||
@@ -311,7 +316,7 @@ define('chat', [
|
||||
ChatsMessages.scrollToBottom(chatModal.find('.chat-content'));
|
||||
module.bringModalToTop(chatModal);
|
||||
module.focusInput(chatModal);
|
||||
socket.emit('modules.chats.markRead', chatModal.attr('roomId'));
|
||||
socket.emit('modules.chats.markRead', chatModal.attr('data-roomid'));
|
||||
|
||||
var env = utils.findBootstrapEnvironment();
|
||||
if (env === 'xs' || env === 'sm') {
|
||||
|
||||
Reference in New Issue
Block a user