allow for autocomplete in annotations of type entity (first pass)
This commit is contained in:
parent
ad7e5f3eaf
commit
d6a1dae8b8
5 changed files with 31 additions and 3 deletions
|
|
@ -265,7 +265,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
.appendTo(self.$outer);
|
||||
}
|
||||
|
||||
self.$annotations = Ox.ArrayEditable({
|
||||
self.$annotations = Ox.ArrayEditable(Ox.extend({
|
||||
clickLink: self.options.clickLink,
|
||||
editable: self.options.editable,
|
||||
getSortValue: self.options.type == 'text'
|
||||
|
|
@ -286,7 +286,16 @@ 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' ? {
|
||||
autocomplete: function(value, callback) {
|
||||
self.options.autocomplete(self.options.id, value, callback);
|
||||
},
|
||||
autocompleteReplace: true,
|
||||
autocompleteReplaceCorrect: true,
|
||||
autocompleteSelect: true,
|
||||
autocompleteSelectHighlight: true,
|
||||
autocompleteSelectMaxWidth: 256
|
||||
} : {}))
|
||||
.bindEvent({
|
||||
add: function(data) {
|
||||
if (self.editing) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue