mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
feat: #7096, improve chat editing
use a new template for editing chats, remove the data-mid on the chat inputEl
This commit is contained in:
@@ -379,7 +379,7 @@ define('forum/chats', [
|
||||
});
|
||||
};
|
||||
|
||||
Chats.createAutoComplete = function (roomId, element) {
|
||||
Chats.createAutoComplete = function (roomId, element, options = {}) {
|
||||
if (!element.length) {
|
||||
return;
|
||||
}
|
||||
@@ -395,12 +395,17 @@ define('forum/chats', [
|
||||
},
|
||||
placement: 'top',
|
||||
className: `chat-autocomplete-dropdown-${roomId} dropdown-menu textcomplete-dropdown`,
|
||||
...options,
|
||||
},
|
||||
};
|
||||
|
||||
$(window).trigger('chat:autocomplete:init', data);
|
||||
if (data.strategies.length) {
|
||||
Chats.activeAutocomplete[roomId] = autocomplete.setup(data);
|
||||
const autocompleteEl = autocomplete.setup(data);
|
||||
if (roomId) {
|
||||
Chats.activeAutocomplete[roomId] = autocompleteEl;
|
||||
}
|
||||
return autocompleteEl;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user