mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Bind enter key to start a search, skipping minimum character limit
This commit is contained in:
parent
22cb0667eb
commit
18f3d46ca8
@ -402,6 +402,17 @@ var et2_link_entry = et2_inputWidget.extend({
|
||||
disabled: self.options.disabled
|
||||
});
|
||||
|
||||
// Bind to enter key to start search early
|
||||
this.search.keydown(function(e) {
|
||||
var keycode = (e.keyCode ? e.keyCode : e.which);
|
||||
if(keycode == '13')
|
||||
{
|
||||
self.search.autocomplete("option","minLength", 0);
|
||||
self.search.autocomplete("search");
|
||||
self.search.autocomplete("option","minLength", self.minimum_characters);
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
this.setDOMNode(this.div[0]);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user