setup atwho autocomplete
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
8e60a2bd28
commit
d1afbedc5f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue