├── demo ├── autocomplete │ ├── accentFolding.html │ ├── autoSelect.html │ ├── demo.css │ ├── demo.js │ ├── html.html │ └── index.html └── listing.css ├── readme.md └── src └── autocomplete ├── jquery.ui.autocomplete.accentFolding.js ├── jquery.ui.autocomplete.autoSelect.js └── jquery.ui.autocomplete.html.js /demo/autocomplete/accentFolding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery UI Autocomplete Extension - Accent Folding 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demo/autocomplete/autoSelect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery UI Autocomplete Extension - Auto Select Option 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /demo/autocomplete/demo.css: -------------------------------------------------------------------------------- 1 | .source { 2 | margin-top: 2em; 3 | } 4 | 5 | .source p, 6 | .source pre { 7 | margin: 0.25em 0; 8 | padding: 0; 9 | } 10 | 11 | .source .note { 12 | font-style: italic; 13 | } 14 | -------------------------------------------------------------------------------- /demo/autocomplete/demo.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | var sourceView = $( "
", { 4 | "class": "source" 5 | }) 6 | .appendTo( "body" ); 7 | 8 | $( "

This demo is powered by the following code:

").appendTo( sourceView ); 9 | $( "

Look at the source option to see the possible values.

") 10 | .addClass( "note" ) 11 | .appendTo( sourceView ); 12 | 13 | $("script:not([src])").each(function() { 14 | var lines = $( this ).html().split( "\n" ); 15 | lines.shift(); 16 | 17 | // unindent by one tab 18 | // join on \r\n instead of just \n for IE 19 | var src = $.map( lines, function( line ) { 20 | return line.substring(1); 21 | }).join( "\r\n" ); 22 | 23 | // append source to the page 24 | $( "
" )
25 | 		.text( src )
26 | 		.appendTo( sourceView );
27 | });
28 | 
29 | // load the CSS, reduces files that need to be included in the actual demo
30 | $.get( "demo.css", function( content ) {
31 | 	$( "" ).appendTo( "body" );
32 | });
33 | 
34 | });
35 | 


--------------------------------------------------------------------------------
/demo/autocomplete/html.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 	
 5 | 	jQuery UI Autocomplete Extension - HTML Option
 6 | 
 7 | 	
 8 | 
 9 | 	
10 | 	
11 | 	
12 | 	
13 | 	
34 | 
35 | 
36 | 
37 | 
38 | 
39 | 
40 | 
41 | 


--------------------------------------------------------------------------------
/demo/autocomplete/index.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 	
 5 | 	jQuery UI Autocomplete Extensions
 6 | 
 7 | 	
 8 | 	
 9 | 
10 | 
11 | 
12 | 

jQuery UI Autocomplete Extensions

13 | 14 |
15 |

These are extensions to the jQuery UI Autocomplete widget.

16 |
17 | 18 |
19 |
20 |

Accent Folding

21 |
22 |
23 |

Enable accent folding in your search terms. This makes it possible to search for values that contain accents without requiring the user to type the accented characters. For example, a user could search for "Jörn" by simply typing "Jorn".

24 |

API

25 |

This extension does not expose any API. Accent folding is automatically enabled for all autocomplete fields.

26 |
27 |
28 | 29 |
30 |
31 |

Auto Select

32 |
33 |
34 |

Automatically select an item if the user types a valid value and leaves the text field without explicitly selecting the item from the menu.

35 |

API

36 |

This extension does not expose any API. Values are automatically selected for all autocomplete fields if there is a perfect match in the results.

37 |
38 |
39 | 40 |
41 |
42 |

HTML labels

43 |
44 |
45 |

Allow HTML to be displayed for each item's label.

46 |

API

47 |

This extension adds a boolean html option. When set to true, the label will be interpreted as HTML. When set to false, the label will be interpreted as text.

48 |
49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /demo/listing.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 62.5%; 3 | } 4 | .ui-widget { 5 | margin-top: 2em; 6 | } 7 | .ui-widget-header, 8 | .ui-widget-content { 9 | padding: 0.5em 1em; 10 | } 11 | .ui-widget-header h2 { 12 | margin: 0; 13 | pading: 0; 14 | } 15 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | This repository is not actively maintained. It works with whatever version of 2 | jQuery UI is used in the demos. There are no tests and I don't use any of these 3 | in any of my code anywhere. Individual extensions may or may not work with newer 4 | version of jQuery UI. 5 | 6 | At some point in 2013, I will update all of this code, add tests, support 7 | multiple versions of jQuery UI, create several more extensions and post these 8 | on the new plugins site. 9 | 10 | If you're looking for the `selectFirst` extension for autocomplete, check the 11 | [1-8 branch](https://github.com/scottgonzalez/jquery-ui-extensions/tree/1-8). 12 | `selectFirst` has been removed from master because the option was rolled into 13 | newer versions of jQuery UI as the 14 | [`autoFocus`](http://api.jqueryui.com/autocomplete/#option-autoFocus) option. 15 | 16 | Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/). 17 | -------------------------------------------------------------------------------- /src/autocomplete/jquery.ui.autocomplete.accentFolding.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Autocomplete Accent Folding Extension 3 | * 4 | * Copyright 2010, Scott González (http://scottgonzalez.com) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * http://github.com/scottgonzalez/jquery-ui-extensions 8 | */ 9 | (function( $ ) { 10 | 11 | var autocomplete = $.ui.autocomplete; 12 | 13 | autocomplete.accentFolding = { 14 | map: { 15 | "ẚ": "a", 16 | "Á": "a", 17 | "á": "a", 18 | "À": "a", 19 | "à": "a", 20 | "Ă": "a", 21 | "ă": "a", 22 | "Ắ": "a", 23 | "ắ": "a", 24 | "Ằ": "a", 25 | "ằ": "a", 26 | "Ẵ": "a", 27 | "ẵ": "a", 28 | "Ẳ": "a", 29 | "ẳ": "a", 30 | "Â": "a", 31 | "â": "a", 32 | "Ấ": "a", 33 | "ấ": "a", 34 | "Ầ": "a", 35 | "ầ": "a", 36 | "Ẫ": "a", 37 | "ẫ": "a", 38 | "Ẩ": "a", 39 | "ẩ": "a", 40 | "Ǎ": "a", 41 | "ǎ": "a", 42 | "Å": "a", 43 | "å": "a", 44 | "Ǻ": "a", 45 | "ǻ": "a", 46 | "Ä": "a", 47 | "ä": "a", 48 | "Ǟ": "a", 49 | "ǟ": "a", 50 | "Ã": "a", 51 | "ã": "a", 52 | "Ȧ": "a", 53 | "ȧ": "a", 54 | "Ǡ": "a", 55 | "ǡ": "a", 56 | "Ą": "a", 57 | "ą": "a", 58 | "Ā": "a", 59 | "ā": "a", 60 | "Ả": "a", 61 | "ả": "a", 62 | "Ȁ": "a", 63 | "ȁ": "a", 64 | "Ȃ": "a", 65 | "ȃ": "a", 66 | "Ạ": "a", 67 | "ạ": "a", 68 | "Ặ": "a", 69 | "ặ": "a", 70 | "Ậ": "a", 71 | "ậ": "a", 72 | "Ḁ": "a", 73 | "ḁ": "a", 74 | "Ⱥ": "a", 75 | "ⱥ": "a", 76 | "Ǽ": "a", 77 | "ǽ": "a", 78 | "Ǣ": "a", 79 | "ǣ": "a", 80 | "Ḃ": "b", 81 | "ḃ": "b", 82 | "Ḅ": "b", 83 | "ḅ": "b", 84 | "Ḇ": "b", 85 | "ḇ": "b", 86 | "Ƀ": "b", 87 | "ƀ": "b", 88 | "ᵬ": "b", 89 | "Ɓ": "b", 90 | "ɓ": "b", 91 | "Ƃ": "b", 92 | "ƃ": "b", 93 | "Ć": "c", 94 | "ć": "c", 95 | "Ĉ": "c", 96 | "ĉ": "c", 97 | "Č": "c", 98 | "č": "c", 99 | "Ċ": "c", 100 | "ċ": "c", 101 | "Ç": "c", 102 | "ç": "c", 103 | "Ḉ": "c", 104 | "ḉ": "c", 105 | "Ȼ": "c", 106 | "ȼ": "c", 107 | "Ƈ": "c", 108 | "ƈ": "c", 109 | "ɕ": "c", 110 | "Ď": "d", 111 | "ď": "d", 112 | "Ḋ": "d", 113 | "ḋ": "d", 114 | "Ḑ": "d", 115 | "ḑ": "d", 116 | "Ḍ": "d", 117 | "ḍ": "d", 118 | "Ḓ": "d", 119 | "ḓ": "d", 120 | "Ḏ": "d", 121 | "ḏ": "d", 122 | "Đ": "d", 123 | "đ": "d", 124 | "ᵭ": "d", 125 | "Ɖ": "d", 126 | "ɖ": "d", 127 | "Ɗ": "d", 128 | "ɗ": "d", 129 | "Ƌ": "d", 130 | "ƌ": "d", 131 | "ȡ": "d", 132 | "ð": "d", 133 | "É": "e", 134 | "Ə": "e", 135 | "Ǝ": "e", 136 | "ǝ": "e", 137 | "é": "e", 138 | "È": "e", 139 | "è": "e", 140 | "Ĕ": "e", 141 | "ĕ": "e", 142 | "Ê": "e", 143 | "ê": "e", 144 | "Ế": "e", 145 | "ế": "e", 146 | "Ề": "e", 147 | "ề": "e", 148 | "Ễ": "e", 149 | "ễ": "e", 150 | "Ể": "e", 151 | "ể": "e", 152 | "Ě": "e", 153 | "ě": "e", 154 | "Ë": "e", 155 | "ë": "e", 156 | "Ẽ": "e", 157 | "ẽ": "e", 158 | "Ė": "e", 159 | "ė": "e", 160 | "Ȩ": "e", 161 | "ȩ": "e", 162 | "Ḝ": "e", 163 | "ḝ": "e", 164 | "Ę": "e", 165 | "ę": "e", 166 | "Ē": "e", 167 | "ē": "e", 168 | "Ḗ": "e", 169 | "ḗ": "e", 170 | "Ḕ": "e", 171 | "ḕ": "e", 172 | "Ẻ": "e", 173 | "ẻ": "e", 174 | "Ȅ": "e", 175 | "ȅ": "e", 176 | "Ȇ": "e", 177 | "ȇ": "e", 178 | "Ẹ": "e", 179 | "ẹ": "e", 180 | "Ệ": "e", 181 | "ệ": "e", 182 | "Ḙ": "e", 183 | "ḙ": "e", 184 | "Ḛ": "e", 185 | "ḛ": "e", 186 | "Ɇ": "e", 187 | "ɇ": "e", 188 | "ɚ": "e", 189 | "ɝ": "e", 190 | "Ḟ": "f", 191 | "ḟ": "f", 192 | "ᵮ": "f", 193 | "Ƒ": "f", 194 | "ƒ": "f", 195 | "Ǵ": "g", 196 | "ǵ": "g", 197 | "Ğ": "g", 198 | "ğ": "g", 199 | "Ĝ": "g", 200 | "ĝ": "g", 201 | "Ǧ": "g", 202 | "ǧ": "g", 203 | "Ġ": "g", 204 | "ġ": "g", 205 | "Ģ": "g", 206 | "ģ": "g", 207 | "Ḡ": "g", 208 | "ḡ": "g", 209 | "Ǥ": "g", 210 | "ǥ": "g", 211 | "Ɠ": "g", 212 | "ɠ": "g", 213 | "Ĥ": "h", 214 | "ĥ": "h", 215 | "Ȟ": "h", 216 | "ȟ": "h", 217 | "Ḧ": "h", 218 | "ḧ": "h", 219 | "Ḣ": "h", 220 | "ḣ": "h", 221 | "Ḩ": "h", 222 | "ḩ": "h", 223 | "Ḥ": "h", 224 | "ḥ": "h", 225 | "Ḫ": "h", 226 | "ḫ": "h", 227 | "H": "h", 228 | "̱": "h", 229 | "ẖ": "h", 230 | "Ħ": "h", 231 | "ħ": "h", 232 | "Ⱨ": "h", 233 | "ⱨ": "h", 234 | "Í": "i", 235 | "í": "i", 236 | "Ì": "i", 237 | "ì": "i", 238 | "Ĭ": "i", 239 | "ĭ": "i", 240 | "Î": "i", 241 | "î": "i", 242 | "Ǐ": "i", 243 | "ǐ": "i", 244 | "Ï": "i", 245 | "ï": "i", 246 | "Ḯ": "i", 247 | "ḯ": "i", 248 | "Ĩ": "i", 249 | "ĩ": "i", 250 | "İ": "i", 251 | "i": "i", 252 | "Į": "i", 253 | "į": "i", 254 | "Ī": "i", 255 | "ī": "i", 256 | "Ỉ": "i", 257 | "ỉ": "i", 258 | "Ȉ": "i", 259 | "ȉ": "i", 260 | "Ȋ": "i", 261 | "ȋ": "i", 262 | "Ị": "i", 263 | "ị": "i", 264 | "Ḭ": "i", 265 | "ḭ": "i", 266 | "I": "i", 267 | "ı": "i", 268 | "Ɨ": "i", 269 | "ɨ": "i", 270 | "Ĵ": "j", 271 | "ĵ": "j", 272 | "J": "j", 273 | "̌": "j", 274 | "ǰ": "j", 275 | "ȷ": "j", 276 | "Ɉ": "j", 277 | "ɉ": "j", 278 | "ʝ": "j", 279 | "ɟ": "j", 280 | "ʄ": "j", 281 | "Ḱ": "k", 282 | "ḱ": "k", 283 | "Ǩ": "k", 284 | "ǩ": "k", 285 | "Ķ": "k", 286 | "ķ": "k", 287 | "Ḳ": "k", 288 | "ḳ": "k", 289 | "Ḵ": "k", 290 | "ḵ": "k", 291 | "Ƙ": "k", 292 | "ƙ": "k", 293 | "Ⱪ": "k", 294 | "ⱪ": "k", 295 | "Ĺ": "a", 296 | "ĺ": "l", 297 | "Ľ": "l", 298 | "ľ": "l", 299 | "Ļ": "l", 300 | "ļ": "l", 301 | "Ḷ": "l", 302 | "ḷ": "l", 303 | "Ḹ": "l", 304 | "ḹ": "l", 305 | "Ḽ": "l", 306 | "ḽ": "l", 307 | "Ḻ": "l", 308 | "ḻ": "l", 309 | "Ł": "l", 310 | "ł": "l", 311 | "Ł": "l", 312 | "̣": "l", 313 | "ł": "l", 314 | "̣": "l", 315 | "Ŀ": "l", 316 | "ŀ": "l", 317 | "Ƚ": "l", 318 | "ƚ": "l", 319 | "Ⱡ": "l", 320 | "ⱡ": "l", 321 | "Ɫ": "l", 322 | "ɫ": "l", 323 | "ɬ": "l", 324 | "ɭ": "l", 325 | "ȴ": "l", 326 | "Ḿ": "m", 327 | "ḿ": "m", 328 | "Ṁ": "m", 329 | "ṁ": "m", 330 | "Ṃ": "m", 331 | "ṃ": "m", 332 | "ɱ": "m", 333 | "Ń": "n", 334 | "ń": "n", 335 | "Ǹ": "n", 336 | "ǹ": "n", 337 | "Ň": "n", 338 | "ň": "n", 339 | "Ñ": "n", 340 | "ñ": "n", 341 | "Ṅ": "n", 342 | "ṅ": "n", 343 | "Ņ": "n", 344 | "ņ": "n", 345 | "Ṇ": "n", 346 | "ṇ": "n", 347 | "Ṋ": "n", 348 | "ṋ": "n", 349 | "Ṉ": "n", 350 | "ṉ": "n", 351 | "Ɲ": "n", 352 | "ɲ": "n", 353 | "Ƞ": "n", 354 | "ƞ": "n", 355 | "ɳ": "n", 356 | "ȵ": "n", 357 | "N": "n", 358 | "̈": "n", 359 | "n": "n", 360 | "̈": "n", 361 | "Ó": "o", 362 | "ó": "o", 363 | "Ò": "o", 364 | "ò": "o", 365 | "Ŏ": "o", 366 | "ŏ": "o", 367 | "Ô": "o", 368 | "ô": "o", 369 | "Ố": "o", 370 | "ố": "o", 371 | "Ồ": "o", 372 | "ồ": "o", 373 | "Ỗ": "o", 374 | "ỗ": "o", 375 | "Ổ": "o", 376 | "ổ": "o", 377 | "Ǒ": "o", 378 | "ǒ": "o", 379 | "Ö": "o", 380 | "ö": "o", 381 | "Ȫ": "o", 382 | "ȫ": "o", 383 | "Ő": "o", 384 | "ő": "o", 385 | "Õ": "o", 386 | "õ": "o", 387 | "Ṍ": "o", 388 | "ṍ": "o", 389 | "Ṏ": "o", 390 | "ṏ": "o", 391 | "Ȭ": "o", 392 | "ȭ": "o", 393 | "Ȯ": "o", 394 | "ȯ": "o", 395 | "Ȱ": "o", 396 | "ȱ": "o", 397 | "Ø": "o", 398 | "ø": "o", 399 | "Ǿ": "o", 400 | "ǿ": "o", 401 | "Ǫ": "o", 402 | "ǫ": "o", 403 | "Ǭ": "o", 404 | "ǭ": "o", 405 | "Ō": "o", 406 | "ō": "o", 407 | "Ṓ": "o", 408 | "ṓ": "o", 409 | "Ṑ": "o", 410 | "ṑ": "o", 411 | "Ỏ": "o", 412 | "ỏ": "o", 413 | "Ȍ": "o", 414 | "ȍ": "o", 415 | "Ȏ": "o", 416 | "ȏ": "o", 417 | "Ơ": "o", 418 | "ơ": "o", 419 | "Ớ": "o", 420 | "ớ": "o", 421 | "Ờ": "o", 422 | "ờ": "o", 423 | "Ỡ": "o", 424 | "ỡ": "o", 425 | "Ở": "o", 426 | "ở": "o", 427 | "Ợ": "o", 428 | "ợ": "o", 429 | "Ọ": "o", 430 | "ọ": "o", 431 | "Ộ": "o", 432 | "ộ": "o", 433 | "Ɵ": "o", 434 | "ɵ": "o", 435 | "Ṕ": "p", 436 | "ṕ": "p", 437 | "Ṗ": "p", 438 | "ṗ": "p", 439 | "Ᵽ": "p", 440 | "Ƥ": "p", 441 | "ƥ": "p", 442 | "P": "p", 443 | "̃": "p", 444 | "p": "p", 445 | "̃": "p", 446 | "ʠ": "q", 447 | "Ɋ": "q", 448 | "ɋ": "q", 449 | "Ŕ": "r", 450 | "ŕ": "r", 451 | "Ř": "r", 452 | "ř": "r", 453 | "Ṙ": "r", 454 | "ṙ": "r", 455 | "Ŗ": "r", 456 | "ŗ": "r", 457 | "Ȑ": "r", 458 | "ȑ": "r", 459 | "Ȓ": "r", 460 | "ȓ": "r", 461 | "Ṛ": "r", 462 | "ṛ": "r", 463 | "Ṝ": "r", 464 | "ṝ": "r", 465 | "Ṟ": "r", 466 | "ṟ": "r", 467 | "Ɍ": "r", 468 | "ɍ": "r", 469 | "ᵲ": "r", 470 | "ɼ": "r", 471 | "Ɽ": "r", 472 | "ɽ": "r", 473 | "ɾ": "r", 474 | "ᵳ": "r", 475 | "ß": "s", 476 | "Ś": "s", 477 | "ś": "s", 478 | "Ṥ": "s", 479 | "ṥ": "s", 480 | "Ŝ": "s", 481 | "ŝ": "s", 482 | "Š": "s", 483 | "š": "s", 484 | "Ṧ": "s", 485 | "ṧ": "s", 486 | "Ṡ": "s", 487 | "ṡ": "s", 488 | "ẛ": "s", 489 | "Ş": "s", 490 | "ş": "s", 491 | "Ṣ": "s", 492 | "ṣ": "s", 493 | "Ṩ": "s", 494 | "ṩ": "s", 495 | "Ș": "s", 496 | "ș": "s", 497 | "ʂ": "s", 498 | "S": "s", 499 | "̩": "s", 500 | "s": "s", 501 | "̩": "s", 502 | "Þ": "t", 503 | "þ": "t", 504 | "Ť": "t", 505 | "ť": "t", 506 | "T": "t", 507 | "̈": "t", 508 | "ẗ": "t", 509 | "Ṫ": "t", 510 | "ṫ": "t", 511 | "Ţ": "t", 512 | "ţ": "t", 513 | "Ṭ": "t", 514 | "ṭ": "t", 515 | "Ț": "t", 516 | "ț": "t", 517 | "Ṱ": "t", 518 | "ṱ": "t", 519 | "Ṯ": "t", 520 | "ṯ": "t", 521 | "Ŧ": "t", 522 | "ŧ": "t", 523 | "Ⱦ": "t", 524 | "ⱦ": "t", 525 | "ᵵ": "t", 526 | "ƫ": "t", 527 | "Ƭ": "t", 528 | "ƭ": "t", 529 | "Ʈ": "t", 530 | "ʈ": "t", 531 | "ȶ": "t", 532 | "Ú": "u", 533 | "ú": "u", 534 | "Ù": "u", 535 | "ù": "u", 536 | "Ŭ": "u", 537 | "ŭ": "u", 538 | "Û": "u", 539 | "û": "u", 540 | "Ǔ": "u", 541 | "ǔ": "u", 542 | "Ů": "u", 543 | "ů": "u", 544 | "Ü": "u", 545 | "ü": "u", 546 | "Ǘ": "u", 547 | "ǘ": "u", 548 | "Ǜ": "u", 549 | "ǜ": "u", 550 | "Ǚ": "u", 551 | "ǚ": "u", 552 | "Ǖ": "u", 553 | "ǖ": "u", 554 | "Ű": "u", 555 | "ű": "u", 556 | "Ũ": "u", 557 | "ũ": "u", 558 | "Ṹ": "u", 559 | "ṹ": "u", 560 | "Ų": "u", 561 | "ų": "u", 562 | "Ū": "u", 563 | "ū": "u", 564 | "Ṻ": "u", 565 | "ṻ": "u", 566 | "Ủ": "u", 567 | "ủ": "u", 568 | "Ȕ": "u", 569 | "ȕ": "u", 570 | "Ȗ": "u", 571 | "ȗ": "u", 572 | "Ư": "u", 573 | "ư": "u", 574 | "Ứ": "u", 575 | "ứ": "u", 576 | "Ừ": "u", 577 | "ừ": "u", 578 | "Ữ": "u", 579 | "ữ": "u", 580 | "Ử": "u", 581 | "ử": "u", 582 | "Ự": "u", 583 | "ự": "u", 584 | "Ụ": "u", 585 | "ụ": "u", 586 | "Ṳ": "u", 587 | "ṳ": "u", 588 | "Ṷ": "u", 589 | "ṷ": "u", 590 | "Ṵ": "u", 591 | "ṵ": "u", 592 | "Ʉ": "u", 593 | "ʉ": "u", 594 | "Ṽ": "v", 595 | "ṽ": "v", 596 | "Ṿ": "v", 597 | "ṿ": "v", 598 | "Ʋ": "v", 599 | "ʋ": "v", 600 | "Ẃ": "w", 601 | "ẃ": "w", 602 | "Ẁ": "w", 603 | "ẁ": "w", 604 | "Ŵ": "w", 605 | "ŵ": "w", 606 | "W": "w", 607 | "̊": "w", 608 | "ẘ": "w", 609 | "Ẅ": "w", 610 | "ẅ": "w", 611 | "Ẇ": "w", 612 | "ẇ": "w", 613 | "Ẉ": "w", 614 | "ẉ": "w", 615 | "Ẍ": "x", 616 | "ẍ": "x", 617 | "Ẋ": "x", 618 | "ẋ": "x", 619 | "Ý": "y", 620 | "ý": "y", 621 | "Ỳ": "y", 622 | "ỳ": "y", 623 | "Ŷ": "y", 624 | "ŷ": "y", 625 | "Y": "y", 626 | "̊": "y", 627 | "ẙ": "y", 628 | "Ÿ": "y", 629 | "ÿ": "y", 630 | "Ỹ": "y", 631 | "ỹ": "y", 632 | "Ẏ": "y", 633 | "ẏ": "y", 634 | "Ȳ": "y", 635 | "ȳ": "y", 636 | "Ỷ": "y", 637 | "ỷ": "y", 638 | "Ỵ": "y", 639 | "ỵ": "y", 640 | "ʏ": "y", 641 | "Ɏ": "y", 642 | "ɏ": "y", 643 | "Ƴ": "y", 644 | "ƴ": "y", 645 | "Ź": "z", 646 | "ź": "z", 647 | "Ẑ": "z", 648 | "ẑ": "z", 649 | "Ž": "z", 650 | "ž": "z", 651 | "Ż": "z", 652 | "ż": "z", 653 | "Ẓ": "z", 654 | "ẓ": "z", 655 | "Ẕ": "z", 656 | "ẕ": "z", 657 | "Ƶ": "z", 658 | "ƶ": "z", 659 | "Ȥ": "z", 660 | "ȥ": "z", 661 | "ʐ": "z", 662 | "ʑ": "z", 663 | "Ⱬ": "z", 664 | "ⱬ": "z", 665 | "Ǯ": "z", 666 | "ǯ": "z", 667 | "ƺ": "z", 668 | "2": "2", 669 | "6": "6", 670 | "B": "B", 671 | "F": "F", 672 | "J": "J", 673 | "N": "N", 674 | "R": "R", 675 | "V": "V", 676 | "Z": "Z", 677 | "b": "b", 678 | "f": "f", 679 | "j": "j", 680 | "n": "n", 681 | "r": "r", 682 | "v": "v", 683 | "z": "z", 684 | "1": "1", 685 | "5": "5", 686 | "9": "9", 687 | "A": "A", 688 | "E": "E", 689 | "I": "I", 690 | "M": "M", 691 | "Q": "Q", 692 | "U": "U", 693 | "Y": "Y", 694 | "a": "a", 695 | "e": "e", 696 | "i": "i", 697 | "m": "m", 698 | "q": "q", 699 | "u": "u", 700 | "y": "y", 701 | "0": "0", 702 | "4": "4", 703 | "8": "8", 704 | "D": "D", 705 | "H": "H", 706 | "L": "L", 707 | "P": "P", 708 | "T": "T", 709 | "X": "X", 710 | "d": "d", 711 | "h": "h", 712 | "l": "l", 713 | "p": "p", 714 | "t": "t", 715 | "x": "x", 716 | "3": "3", 717 | "7": "7", 718 | "C": "C", 719 | "G": "G", 720 | "K": "K", 721 | "O": "O", 722 | "S": "S", 723 | "W": "W", 724 | "c": "c", 725 | "g": "g", 726 | "k": "k", 727 | "o": "o", 728 | "s": "s", 729 | "w": "w" 730 | }, 731 | 732 | fold: function( term ) { 733 | var ret = ""; 734 | for ( var i = 0; i < term.length; i++ ) { 735 | ret += this.map[ term.charAt(i) ] || term.charAt(i); 736 | } 737 | return ret; 738 | } 739 | }; 740 | 741 | var _initSource = autocomplete.prototype._initSource; 742 | autocomplete.prototype._initSource = function() { 743 | var source = this.options.source; 744 | if ( $.isArray(source) ) { 745 | this.source = function( request, response ) { 746 | var matcher = new RegExp( autocomplete.escapeRegex( request.term ), "i" ); 747 | response( $.grep( source, function( value ) { 748 | value = value.label || value.value || value; 749 | return matcher.test( value ) || 750 | matcher.test( autocomplete.accentFolding.fold( value ) ); 751 | }) ); 752 | }; 753 | } else { 754 | return _initSource.call( this ); 755 | } 756 | }; 757 | 758 | })( jQuery ); 759 | -------------------------------------------------------------------------------- /src/autocomplete/jquery.ui.autocomplete.autoSelect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Autocomplete Auto Select Extension 3 | * 4 | * Copyright 2010, Scott González (http://scottgonzalez.com) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * http://github.com/scottgonzalez/jquery-ui-extensions 8 | */ 9 | (function( $ ) { 10 | 11 | $.ui.autocomplete.prototype.options.autoSelect = true; 12 | $( ".ui-autocomplete-input" ).live( "blur", function( event ) { 13 | var autocomplete = $( this ).data( "autocomplete" ); 14 | if ( !autocomplete.options.autoSelect || autocomplete.selectedItem ) { return; } 15 | 16 | var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ); 17 | autocomplete.widget().children( ".ui-menu-item" ).each(function() { 18 | var item = $( this ).data( "item.autocomplete" ); 19 | if ( matcher.test( item.label || item.value || item ) ) { 20 | autocomplete.selectedItem = item; 21 | return false; 22 | } 23 | }); 24 | if ( autocomplete.selectedItem ) { 25 | autocomplete._trigger( "select", event, { item: autocomplete.selectedItem } ); 26 | } 27 | }); 28 | 29 | }( jQuery )); 30 | -------------------------------------------------------------------------------- /src/autocomplete/jquery.ui.autocomplete.html.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Autocomplete HTML Extension 3 | * 4 | * Copyright 2010, Scott González (http://scottgonzalez.com) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * http://github.com/scottgonzalez/jquery-ui-extensions 8 | */ 9 | (function( $ ) { 10 | 11 | var proto = $.ui.autocomplete.prototype, 12 | initSource = proto._initSource; 13 | 14 | function filter( array, term ) { 15 | var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" ); 16 | return $.grep( array, function(value) { 17 | return matcher.test( $( "
" ).html( value.label || value.value || value ).text() ); 18 | }); 19 | } 20 | 21 | $.extend( proto, { 22 | _initSource: function() { 23 | if ( this.options.html && $.isArray(this.options.source) ) { 24 | this.source = function( request, response ) { 25 | response( filter( this.options.source, request.term ) ); 26 | }; 27 | } else { 28 | initSource.call( this ); 29 | } 30 | }, 31 | 32 | _renderItem: function( ul, item) { 33 | return $( "
  • " ) 34 | .data( "item.autocomplete", item ) 35 | .append( $( "" )[ this.options.html ? "html" : "text" ]( item.label ) ) 36 | .appendTo( ul ); 37 | } 38 | }); 39 | 40 | })( jQuery ); 41 | --------------------------------------------------------------------------------