pass autocomplete callback with layer

This commit is contained in:
j 2015-04-14 19:48:10 +01:00
commit 3c006f9bc5
2 changed files with 3 additions and 7 deletions

View file

@ -269,7 +269,6 @@ Ox.AnnotationFolder = function(options, self) {
})
.appendTo(self.$outer);
}
self.$annotations = Ox.ArrayEditable(Ox.extend({
clickLink: self.options.clickLink,
editable: self.options.editable,
@ -291,11 +290,11 @@ Ox.AnnotationFolder = function(options, self) {
width: self.options.width,
maxHeight: self.options.type == 'text' ? Infinity : void 0,
type: self.options.type == 'text' ? 'textarea' : 'input'
}, self.options.type == 'entity' ? {
}, self.options.autocomplete ? {
autocomplete: function(value, callback) {
self.options.autocomplete(self.options.id, value, callback);
},
autocompleteReplace: true,
autocompleteReplace: self.options.type == 'entity',
//autocompleteReplaceCorrect: true,
autocompleteSelect: true,
autocompleteSelectHighlight: true,