pass autocomplete callback with layer
This commit is contained in:
parent
28d8271174
commit
3c006f9bc5
2 changed files with 3 additions and 7 deletions
|
@ -269,7 +269,6 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
})
|
})
|
||||||
.appendTo(self.$outer);
|
.appendTo(self.$outer);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$annotations = Ox.ArrayEditable(Ox.extend({
|
self.$annotations = Ox.ArrayEditable(Ox.extend({
|
||||||
clickLink: self.options.clickLink,
|
clickLink: self.options.clickLink,
|
||||||
editable: self.options.editable,
|
editable: self.options.editable,
|
||||||
|
@ -291,11 +290,11 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
width: self.options.width,
|
width: self.options.width,
|
||||||
maxHeight: self.options.type == 'text' ? Infinity : void 0,
|
maxHeight: self.options.type == 'text' ? Infinity : void 0,
|
||||||
type: self.options.type == 'text' ? 'textarea' : 'input'
|
type: self.options.type == 'text' ? 'textarea' : 'input'
|
||||||
}, self.options.type == 'entity' ? {
|
}, self.options.autocomplete ? {
|
||||||
autocomplete: function(value, callback) {
|
autocomplete: function(value, callback) {
|
||||||
self.options.autocomplete(self.options.id, value, callback);
|
self.options.autocomplete(self.options.id, value, callback);
|
||||||
},
|
},
|
||||||
autocompleteReplace: true,
|
autocompleteReplace: self.options.type == 'entity',
|
||||||
//autocompleteReplaceCorrect: true,
|
//autocompleteReplaceCorrect: true,
|
||||||
autocompleteSelect: true,
|
autocompleteSelect: true,
|
||||||
autocompleteSelectHighlight: true,
|
autocompleteSelectHighlight: true,
|
||||||
|
|
|
@ -330,7 +330,6 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
})
|
})
|
||||||
.appendTo(self.$menubar);
|
.appendTo(self.$menubar);
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderFolder(layer) {
|
function renderFolder(layer) {
|
||||||
var index = Ox.getIndexById(self.options.layers, layer.id),
|
var index = Ox.getIndexById(self.options.layers, layer.id),
|
||||||
item = Ox.getObjectById(layer.items, self.options.selected),
|
item = Ox.getObjectById(layer.items, self.options.selected),
|
||||||
|
@ -350,9 +349,7 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
selected: selected,
|
selected: selected,
|
||||||
sort: self.options.sort,
|
sort: self.options.sort,
|
||||||
width: self.options.width - Ox.UI.SCROLLBAR_SIZE
|
width: self.options.width - Ox.UI.SCROLLBAR_SIZE
|
||||||
}, layer, layer.type == 'entity' ? {
|
}, layer, layer.type == 'event' ? {
|
||||||
autocomplete: self.options.autocomplete,
|
|
||||||
} : layer.type == 'event' ? {
|
|
||||||
showWidget: self.options.showCalendar,
|
showWidget: self.options.showCalendar,
|
||||||
widgetSize: self.options.calendarSize
|
widgetSize: self.options.calendarSize
|
||||||
} : layer.type == 'place' ? {
|
} : layer.type == 'place' ? {
|
||||||
|
|
Loading…
Reference in a new issue