mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
closes #5604
This commit is contained in:
@@ -83,6 +83,7 @@ define('forum/chats', [
|
||||
|
||||
Chats.addRenameHandler(ajaxify.data.roomId, $('[component="chat/room/name"]'));
|
||||
Chats.addScrollHandler(ajaxify.data.roomId, ajaxify.data.uid, $('.chat-content'));
|
||||
Chats.addCharactersLeftHandler(components.get('chat/input'));
|
||||
};
|
||||
|
||||
Chats.addScrollHandler = function (roomId, uid, el) {
|
||||
@@ -123,6 +124,12 @@ define('forum/chats', [
|
||||
});
|
||||
};
|
||||
|
||||
Chats.addCharactersLeftHandler = function (element) {
|
||||
element.on('keyup', function () {
|
||||
$('[component="chat/message/length"]').text(element.val().length);
|
||||
});
|
||||
};
|
||||
|
||||
Chats.addEditDeleteHandler = function (element, roomId) {
|
||||
element.on('click', '[data-action="edit"]', function () {
|
||||
var messageId = $(this).parents('[data-mid]').attr('data-mid');
|
||||
|
||||
Reference in New Issue
Block a user