feat: textcomplete over jquery-textcomplete, closes #7309

v1.18.x
Julian Lam 6 years ago
parent 362d9397dd
commit 02a8ed9b11

@ -80,7 +80,7 @@
"mousetrap": "^1.6.1",
"mubsub-nbb": "^1.5.0",
"nconf": "^0.10.0",
"nodebb-plugin-composer-default": "6.1.21",
"nodebb-plugin-composer-default": "6.2.0",
"nodebb-plugin-dbsearch": "3.0.6",
"nodebb-plugin-emoji": "^2.2.5",
"nodebb-plugin-emoji-android": "2.0.0",

@ -9,7 +9,8 @@ define('forum/chats', [
'forum/chats/search',
'forum/chats/messages',
'benchpress',
], function (components, translator, mousetrap, recentChats, search, messages, Benchpress) {
'composer/autocomplete',
], function (components, translator, mousetrap, recentChats, search, messages, Benchpress, autocomplete) {
var Chats = {
initialised: false,
};
@ -361,18 +362,18 @@ define('forum/chats', [
element: element,
strategies: [],
options: {
zIndex: 20000,
listPosition: function (position) {
this.$el.css(this._applyPlacement(position));
this.$el.css('position', 'absolute');
return this;
style: {
'z-index': 20000,
flex: 0,
top: 'inherit',
},
placement: 'top',
},
};
$(window).trigger('chat:autocomplete:init', data);
if (data.strategies.length) {
data.element.textcomplete(data.strategies, data.options);
autocomplete.setup(data);
}
};

@ -17,12 +17,13 @@ JS.scripts = {
'node_modules/promise-polyfill/dist/polyfill.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/socket.io-client/dist/socket.io.js',
'node_modules/textcomplete/dist/textcomplete.min.js',
'node_modules/textcomplete.contenteditable/dist/textcomplete.codemirror.min.js',
'public/vendor/jquery/timeago/jquery.timeago.js',
'public/vendor/jquery/js/jquery.form.min.js',
'public/vendor/visibility/visibility.min.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.min.js',
'public/vendor/jquery/textcomplete/jquery.textcomplete.js',
'public/vendor/requirejs/require.js',
'public/src/require-config.js',
'public/vendor/bootbox/bootbox.js',

Loading…
Cancel
Save