quick fix for issue #1150 - needs improvement and review of other textcomplete implementations.
This commit is contained in:
parent
204838bd10
commit
ae35ac0cec
@ -353,19 +353,22 @@ function string2bb(element) {
|
|||||||
|
|
||||||
this.attr('autocomplete','off');
|
this.attr('autocomplete','off');
|
||||||
|
|
||||||
|
var aItem;
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
$(this).each(function() {
|
$(this).each(function() {
|
||||||
var editor = new Textarea(this);
|
var editor = new Textarea(this);
|
||||||
var textcomplete = new Textcomplete(editor);
|
var textcomplete = new Textcomplete(editor);
|
||||||
textcomplete.register([names], {className:'acpopup', zIndex:1020});
|
textcomplete.register([names], {className:'acpopup', zIndex:1020});
|
||||||
|
textcomplete.on('select', function() { aItem = textcomplete.dropdown.getActiveItem(); });
|
||||||
});
|
});
|
||||||
|
|
||||||
if(autosubmit)
|
if(autosubmit)
|
||||||
this.on('select', function(e,value,strategy) { submit_form(this); });
|
this.on('select', function() { submit_form(this); });
|
||||||
|
|
||||||
if(typeof onselect !== 'undefined')
|
if(typeof onselect !== 'undefined')
|
||||||
this.on('select', function(e, value, strategy) { onselect(value); });
|
this.on('select', function() { onselect(aItem.searchResult.data); });
|
||||||
|
|
||||||
};
|
};
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user