summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/comments/js/commentstabview.js23
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