diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-17 13:22:57 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-22 14:14:33 +0200 |
commit | d1afbedc5fa34653e3019ab254d4ed7a8d046617 (patch) | |
tree | ffe5ed5037be32e8b5248ee4b3f56042ddcf295b /apps/comments/js | |
parent | 8e60a2bd28fe7ae61faa8c4c019d97c673ab2bb9 (diff) | |
download | nextcloud-server-d1afbedc5fa34653e3019ab254d4ed7a8d046617.tar.gz nextcloud-server-d1afbedc5fa34653e3019ab254d4ed7a8d046617.zip |
setup atwho autocomplete
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/comments/js')
-rw-r--r-- | apps/comments/js/commentstabview.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 3a20604326b..d379af36638 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -140,6 +140,29 @@ setFileInfo: function(fileInfo) { if (fileInfo) { this.model = fileInfo; + + var s = this; + _.defer(function () { + $.get( + OC.generateUrl('/autocomplete/get'), + { + itemType: 'files', + itemId: fileInfo.get('id'), + sorter: 'comments|share-recipients' + }, + function (data) { + console.warn(data); + $('textarea.message').atwho({ + at: '@', + data: data, + displayTpl: "<li>${label}</li>", + insertTpl: "${atwho-at}${label}", + searchKey: "label" + }); + } + ) + }); + this.render(); this.collection.setObjectId(fileInfo.id); // reset to first page |