diff options
Diffstat (limited to 'apps/comments/js/commentstabview.js')
-rw-r--r-- | apps/comments/js/commentstabview.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 9e501b141a7..20f1f590a28 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -240,19 +240,22 @@ if(!_.isUndefined(this._autoCompleteRequestCall)) { this._autoCompleteRequestCall.abort(); } - this._autoCompleteRequestCall = $.get( - OC.generateUrl('/autocomplete/get'), - { + this._autoCompleteRequestCall = $.ajax({ + url: OC.linkToOCS('core', 2) + 'autocomplete/get', + data: { search: query, itemType: 'files', itemId: s.model.get('id'), sorter: 'commenters|share-recipients', limit: OC.appConfig.comments.maxAutoCompleteResults }, - function (data) { - callback(data); + beforeSend: function (request) { + request.setRequestHeader('Accept', 'application/json'); + }, + success: function (result) { + callback(result.ocs.data); } - ); + }); }, 400); }, |