File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -176,14 +176,31 @@ var AutoComplete = (function () {
176176 merge [ tmp ] = arguments [ i ] [ tmp ] ;
177177 }
178178 }
179- return merge ;
180- } ;
181- AutoComplete . defaults = {
182- Delay : 150 ,
183- EmptyMessage : "No result here" ,
184- Highlight : {
185- getRegex : function ( value ) {
186- return new RegExp ( value , "ig" ) ;
179+ } ,
180+ HttpHeaders : {
181+ "Content-type" : "application/x-www-form-urlencoded" ,
182+ "X-Requested-With" : "XMLHttpRequest"
183+ } ,
184+ Limit : 0 ,
185+ MinChars : 0 ,
186+ HttpMethod : "GET" ,
187+ QueryArg : "q" ,
188+ Url : null ,
189+ KeyboardMappings : {
190+ "Enter" : {
191+ Conditions : [ {
192+ Is : 13 ,
193+ Not : false
194+ } ] ,
195+ Callback : function ( event ) {
196+ if ( this . DOMResults . getAttribute ( "class" ) . indexOf ( "open" ) != - 1 ) {
197+ event . preventDefault ( ) ;
198+ var liActive = this . DOMResults . querySelector ( "li.active" ) ;
199+ if ( liActive !== null ) {
200+ this . _Select ( liActive ) ;
201+ this . DOMResults . setAttribute ( "class" , "autocomplete" ) ;
202+ }
203+ }
187204 } ,
188205 transform : function ( value ) {
189206 return "<strong>" + value + "</strong>" ;
@@ -523,4 +540,4 @@ var AutoComplete = (function () {
523540module . exports = AutoComplete ;
524541
525542} , { } ] } , { } , [ 1 ] ) ( 1 )
526- } ) ;
543+ } ) ;
You can’t perform that action at this time.
0 commit comments