File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 bottom : 0 ;
2525 margin-left : -1px ;
2626 padding : 0 ;
27- /* adjust styles for IE 6/7 */
27+ /* support: IE7 */
2828 * height : 1.7em ;
2929 * top : 0.1em ;
3030 }
4646 . addClass ( "ui-combobox" )
4747 . insertAfter ( select ) ;
4848
49- function removeIfInvalid ( element ) {
49+ function removeIfInvalid ( element ) {
5050 var value = $ ( element ) . val ( ) ,
5151 matcher = new RegExp ( "^" + $ . ui . autocomplete . escapeRegex ( value ) + "$" , "i" ) ,
5252 valid = false ;
5656 return false ;
5757 }
5858 } ) ;
59+
5960 if ( ! valid ) {
6061 // remove invalid value, as it didn't match anything
6162 $ ( element )
6667 setTimeout ( function ( ) {
6768 input . tooltip ( "close" ) . attr ( "title" , "" ) ;
6869 } , 2500 ) ;
69- input . data ( "autocomplete" ) . term = "" ;
70- return false ;
70+ input . data ( "ui-autocomplete" ) . term = "" ;
7171 }
7272 }
7373
103103 } ) ;
104104 } ,
105105 change : function ( event , ui ) {
106- if ( ! ui . item )
107- return removeIfInvalid ( this ) ;
106+ if ( ! ui . item ) {
107+ removeIfInvalid ( this ) ;
108+ }
108109 }
109110 } )
110111 . addClass ( "ui-widget ui-widget-content ui-corner-left" ) ;
111112
112- input . data ( "autocomplete" ) . _renderItem = function ( ul , item ) {
113+ input . data ( "ui- autocomplete" ) . _renderItem = function ( ul , item ) {
113114 return $ ( "<li>" )
114115 . append ( "<a>" + item . label + "</a>" )
115116 . appendTo ( ul ) ;
144145 input . focus ( ) ;
145146 } ) ;
146147
147- input
148- . tooltip ( {
149- position : {
150- of : this . button
151- } ,
152- tooltipClass : "ui-state-highlight"
153- } ) ;
148+ input . tooltip ( {
149+ tooltipClass : "ui-state-highlight"
150+ } ) ;
154151 } ,
155152
156- destroy : function ( ) {
153+ _destroy : function ( ) {
157154 this . wrapper . remove ( ) ;
158155 this . element . show ( ) ;
159- $ . Widget . prototype . destroy . call ( this ) ;
160156 }
161157 } ) ;
162158 } ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments