1
0
Fork 0
forked from 0x2620/oxjs

allow for autocomplete in annotations of type entity (first pass)

This commit is contained in:
rolux 2014-12-16 13:02:18 +00:00
commit d6a1dae8b8
5 changed files with 31 additions and 3 deletions

View file

@ -156,6 +156,13 @@ Ox.ArrayEditable = function(options, self) {
.appendTo(that);
}
self.$items[i] = Ox.Editable({
autocomplete: self.options.autocomplete,
autocompleteReplace: self.options.autocompleteReplace,
autocompleteReplaceCorrect: self.options.autocompleteReplaceCorrect,
autocompleteSelect: self.options.autocompleteSelect,
autocompleteSelectHighlight: self.options.autocompleteSelectHighlight,
autocompleteSelectMaxWidth: self.options.autocompleteSelectMaxWidth,
autocompleteSelectSubmit: self.options.autocompleteSelectSubmit,
blurred: self.editing && i == self.selected ? blur : false,
clickLink: self.options.clickLink,
editable: self.options.editable && item.editable,

View file

@ -144,6 +144,13 @@ Ox.Editable = function(options, self) {
self.originalValue = self.options.value;
if (!self.$input) {
self.$input = Ox.Input({
autocomplete: self.options.autocomplete,
autocompleteReplace: self.options.autocompleteReplace,
autocompleteReplaceCorrect: self.options.autocompleteReplaceCorrect,
autocompleteSelect: self.options.autocompleteSelect,
autocompleteSelectHighlight: self.options.autocompleteSelectHighlight,
autocompleteSelectMaxWidth: self.options.autocompleteSelectMaxWidth,
autocompleteSelectSubmit: self.options.autocompleteSelectSubmit,
changeOnKeypress: true,
element: self.options.type == 'input' ? '<span>' : '<div>',
style: 'square',