├── .build_css.php ├── .editorconfig ├── .gitignore ├── 00_scrap └── jquery_api_usage.xlsx ├── LICENSE.md ├── README.md ├── component.json ├── data ├── docs.json ├── examples.json └── releases.json ├── examples ├── 1000.html ├── 1000.js ├── 1002.html ├── 1002.js ├── 1003.html ├── 1003.js ├── 1007.html ├── 1007.js ├── 1045.html ├── 1045.js ├── 2000.html ├── 2000.js ├── 2001.html ├── 2001.js ├── 2002.html ├── 2002.js ├── 2003.html ├── 2003.js ├── 2004.html ├── 2004.js ├── 2020.html ├── 2020.js ├── 2021.html ├── 2021.js ├── 3000.html ├── 3000.js ├── 3001.html ├── 3001.js ├── 3005.html ├── 3005.js ├── 3012.html ├── 3012.js ├── 3015.html ├── 3015.js ├── 3016.html ├── 3016.js ├── 3031.html ├── 3031.js ├── 3088.html ├── 3088.js ├── 4001.html ├── 4001.js ├── 4003.html ├── 4003.js ├── 4008.html ├── 4008.js ├── 4011.html ├── 4011.js ├── 4014.html ├── 4014.js ├── 4033.html ├── 4033.js ├── 4034.html ├── 4034.js ├── 4037.html ├── 4037.js ├── 4041.html ├── 4041.js ├── 4042.html ├── 4042.js ├── 4055.html ├── 4055.js ├── 4072.html ├── 4072.js ├── 5022.html ├── 5022.js ├── 6000.html ├── 6000.js ├── 6001.html ├── 6001.js ├── 7000.html ├── 7000.js ├── 7001.html ├── 7001.js ├── 7002.html ├── 7002.js ├── 7003.html ├── 7003.js ├── 7004.html ├── 7004.js ├── 7005.html ├── 7005.js ├── 7006.html ├── 7006.js ├── 7007.html ├── 7007.js ├── 7008.html ├── 7008.js ├── 7009.html ├── 7009.js ├── 7010.html ├── 7010.js ├── 7011.html ├── 7011.js ├── 7056.html ├── 7056.js ├── 8002.html ├── 8002.js ├── 9000.html ├── 9000.js ├── 9001.html └── 9001.js ├── pages ├── 404.php ├── docs.php ├── download.php ├── examples.php ├── footer.php ├── header.php ├── home.php ├── markup.php ├── single_example.php └── themes.php ├── php ├── AC.php └── less.inc.php └── www ├── api ├── birds.json ├── birds.php ├── buggy.php ├── cities.php ├── countries.json ├── countries.php ├── mammals.json ├── mammals.php ├── reptiles.json ├── reptiles.php ├── secret_users.php ├── states.php ├── texas_cities.json └── us_states.json ├── css ├── autocomplete.css ├── bootstrap-2.3.0.min.css ├── datepicker.css ├── foundation-3.2.5.min.css ├── less-1.3.0.min.js ├── prettify.less ├── site.css └── site.less ├── example.config.php ├── example.htaccess ├── img ├── glyphicons-halflings-white.png ├── glyphicons-halflings.png └── satinweave.png ├── index.php ├── js ├── autocomplete.js ├── bootstrap-datepicker.js ├── jquery-1.8.2.min.js ├── jquery.color.min.js ├── json3.min.js └── prettify.js └── releases ├── 0.1.0 ├── LICENSE.txt ├── autocomplete-0.1.0.css ├── autocomplete-0.1.0.js ├── autocomplete-0.1.0.min.css ├── autocomplete-0.1.0.min.js └── autocomplete-0.1.0.zip ├── 0.2.0 ├── LICENSE.txt ├── autocomplete-0.2.0.css ├── autocomplete-0.2.0.js ├── autocomplete-0.2.0.min.css ├── autocomplete-0.2.0.min.js ├── autocomplete-0.2.0.zip └── docs │ ├── autocomplete-0.2.0-docs.html │ └── autocomplete-0.2.0-docs_files │ ├── jquery-1.8.2.min.js │ └── jquery.color.min.js ├── 0.2.1 ├── LICENSE.txt ├── autocomplete-0.2.1.css ├── autocomplete-0.2.1.js ├── autocomplete-0.2.1.min.css ├── autocomplete-0.2.1.min.js ├── autocomplete-0.2.1.zip └── docs │ ├── autocomplete-0.2.1-docs.html │ └── autocomplete-0.2.1-docs_files │ ├── jquery-1.8.2.min.js │ └── jquery.color.min.js └── 0.3.0 ├── LICENSE.txt ├── autocomplete-0.3.0.css ├── autocomplete-0.3.0.js ├── autocomplete-0.3.0.min.css ├── autocomplete-0.3.0.min.js └── autocomplete-0.3.0.zip /.build_css.php: -------------------------------------------------------------------------------- 1 | compileFile($f, $cssFileName); 19 | } 20 | catch (exception $e) { 21 | echo "\n\n".'Failed to compile LESS file "'.$f.'". Do you have errors in your syntax? Exiting...'."\n\n"; 22 | die; 23 | } 24 | 25 | echo 'done'."\n"; 26 | } 27 | 28 | die; 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs. 2 | # More information at http://EditorConfig.org 3 | 4 | # Do not check for any .editorconfig files above this directory 5 | root = true 6 | 7 | # All files 8 | [*] 9 | charset = utf-8 10 | end_of_line = lf 11 | indent_size = 2 12 | indent_style = space 13 | insert_final_newline = true 14 | trim_trailing_whitespace = true 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | www/.htaccess 2 | www/.config.php 3 | *.diff 4 | -------------------------------------------------------------------------------- /00_scrap/jquery_api_usage.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/00_scrap/jquery_api_usage.xlsx -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2013 Chris Oakman 2 | http://autocompletejs.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [AutoCompleteJS](http://autocompletejs.com) 2 | 3 | AutoCompleteJS is a JavaScript widget you can use to implement [autocomplete](http://en.wikipedia.org/wiki/Autocomplete) 4 | on your website or web application. 5 | 6 | Read more on the website: 7 | 8 | * [Docs](http://autocompletejs.com/docs) 9 | * [Examples](http://autocompletejs.com/examples) 10 | * [Download](http://autocompletejs.com/download) -------------------------------------------------------------------------------- /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AutoCompleteJS", 3 | "version": "0.2.1", 4 | "description": "AutoCompleteJS is a JavaScript widget that helps your users find things quickly.", 5 | "main": [ 6 | "./releases/0.2.1/autocomplete-0.2.1.min.js", 7 | "./releases/0.2.1/autocomplete-0.2.1.min.css" 8 | ], 9 | "homepage": "http://autocompletejs.com/", 10 | "dependencies": { 11 | "jquery": ">= 1.4.2" 12 | }, 13 | "keywords": [ 14 | "autocomplete", 15 | "autosuggest", 16 | "tokeninput", 17 | "input" 18 | ], 19 | "author": { 20 | "name": "Chris Oakman" 21 | }, 22 | "license": [ 23 | "http://www.opensource.org/licenses/mit-license.php" 24 | ] 25 | } -------------------------------------------------------------------------------- /data/examples.json: -------------------------------------------------------------------------------- 1 | [ 2 | "-----------------------------------------------------", 3 | { 4 | "group": "Basic Usage", 5 | "number": 1000, 6 | "name": "Simple List" 7 | }, 8 | { 9 | "group": "Basic Usage", 10 | "number": 1002, 11 | "name": "Nested Lists 1" 12 | }, 13 | { 14 | "group": "Basic Usage", 15 | "number": 1007, 16 | "name": "Nested Lists 2" 17 | }, 18 | { 19 | "group": "Basic Usage", 20 | "number": 1003, 21 | "name": "Nested Lists 3" 22 | }, 23 | { 24 | "group": "Basic Usage", 25 | "number": 1045, 26 | "name": "Multiple Widgets" 27 | }, 28 | "-----------------------------------------------------", 29 | { 30 | "group": "AJAX", 31 | "number": 2000, 32 | "name": "Simple AJAX" 33 | }, 34 | { 35 | "group": "AJAX", 36 | "number": 2001, 37 | "name": "AJAX with local Options" 38 | }, 39 | { 40 | "group": "AJAX", 41 | "number": 2002, 42 | "name": "Nested Lists with AJAX" 43 | }, 44 | { 45 | "group": "AJAX", 46 | "number": 2003, 47 | "name": "AJAX with preProcess function" 48 | }, 49 | { 50 | "group": "AJAX", 51 | "number": 2004, 52 | "name": "AJAX using POST" 53 | }, 54 | { 55 | "group": "AJAX", 56 | "number": 2020, 57 | "name": "cache AJAX" 58 | }, 59 | { 60 | "group": "AJAX", 61 | "number": 2021, 62 | "name": "cache AJAX length" 63 | }, 64 | "-----------------------------------------------------", 65 | { 66 | "group": "Initial Config", 67 | "number": 3000, 68 | "name": "initialValue" 69 | }, 70 | { 71 | "group": "Initial Config", 72 | "number": 3001, 73 | "name": "maxTokenGroups" 74 | }, 75 | { 76 | "group": "Initial Config", 77 | "number": 3005, 78 | "name": "placeholderHTML" 79 | }, 80 | { 81 | "group": "Initial Config", 82 | "number": 3012, 83 | "name": "showErrors console.log" 84 | }, 85 | { 86 | "group": "Initial Config", 87 | "number": 3088, 88 | "name": "showErrors alert", 89 | "hidden":true 90 | }, 91 | { 92 | "group": "Initial Config", 93 | "number": 3031, 94 | "name": "showErrors custom" 95 | }, 96 | { 97 | "group": "Initial Config", 98 | "number": 3015, 99 | "name": "tokenSeparatorHTML string" 100 | }, 101 | { 102 | "group": "Initial Config", 103 | "number": 3016, 104 | "name": "tokenSeparatorHTML function" 105 | }, 106 | "-----------------------------------------------------", 107 | { 108 | "group": "List Config", 109 | "number": 4055, 110 | "name": "ajaxErrorHTML string" 111 | }, 112 | { 113 | "group": "List Config", 114 | "number": 4072, 115 | "name": "ajaxErrorHTML function" 116 | }, 117 | { 118 | "group": "List Config", 119 | "number": 4011, 120 | "name": "ajaxLoadingHTML string" 121 | }, 122 | { 123 | "group": "List Config", 124 | "number": 4037, 125 | "name": "ajaxLoadingHTML function" 126 | }, 127 | { 128 | "group": "List Config", 129 | "number": 4014, 130 | "name": "Basic allowFreeform" 131 | }, 132 | { 133 | "group": "List Config", 134 | "number": 4001, 135 | "name": "allowFreeform Multiple Lists" 136 | }, 137 | { 138 | "group": "List Config", 139 | "number": 4002, 140 | "name": "cacheAjax" 141 | }, 142 | { 143 | "group": "List Config", 144 | "number": 4003, 145 | "name": "children on List Object" 146 | }, 147 | { 148 | "group": "List Config", 149 | "number": 4041, 150 | "name": "matchOptions" 151 | }, 152 | { 153 | "group": "List Config", 154 | "number": 4007, 155 | "name": "noResultsHTML" 156 | }, 157 | { 158 | "group": "List Config", 159 | "number": 4033, 160 | "name": "optionHTML string" 161 | }, 162 | { 163 | "group": "List Config", 164 | "number": 4034, 165 | "name": "optionHTML and tokenHTML as functions" 166 | }, 167 | { 168 | "group": "List Config", 169 | "number": 4009, 170 | "name": "tokenHTML" 171 | }, 172 | { 173 | "group": "List Config", 174 | "number": 4013, 175 | "name": "options" 176 | }, 177 | "-----------------------------------------------------", 178 | { 179 | "group": "Option Config", 180 | "number": 5022, 181 | "name": "children override on Option Object" 182 | }, 183 | { 184 | "group": "Option Config", 185 | "number": 5000, 186 | "name": "children" 187 | }, 188 | { 189 | "group": "Option Config", 190 | "number": 5001, 191 | "name": "group" 192 | }, 193 | { 194 | "group": "Option Config", 195 | "number": 5002, 196 | "name": "optionHTML" 197 | }, 198 | { 199 | "group": "Option Config", 200 | "number": 5003, 201 | "name": "tokenHTML" 202 | }, 203 | { 204 | "group": "Option Config", 205 | "number": 5004, 206 | "name": "value" 207 | }, 208 | "-----------------------------------------------------", 209 | { 210 | "group": "Events", 211 | "number": 6000, 212 | "name": "onChange - Basic Usage" 213 | }, 214 | { 215 | "group": "Events", 216 | "number": 6001, 217 | "name": "onChange - Modify Value" 218 | }, 219 | "-----------------------------------------------------", 220 | { 221 | "group": "Methods", 222 | "number": 7000, 223 | "name": "addOption" 224 | }, 225 | { 226 | "group": "Methods", 227 | "number": 7001, 228 | "name": "blur" 229 | }, 230 | { 231 | "group": "Methods", 232 | "number": 7002, 233 | "name": "clear" 234 | }, 235 | { 236 | "group": "Methods", 237 | "number": 7003, 238 | "name": "destroy" 239 | }, 240 | { 241 | "group": "Methods", 242 | "number": 7004, 243 | "name": "focus" 244 | }, 245 | { 246 | "group": "Methods", 247 | "number": 7005, 248 | "name": "getList" 249 | }, 250 | { 251 | "group": "Methods", 252 | "number": 7006, 253 | "name": "getLists" 254 | }, 255 | { 256 | "group": "Methods", 257 | "number": 7007, 258 | "name": "getValue" 259 | }, 260 | { 261 | "group": "Methods", 262 | "number": 7008, 263 | "name": "removeList" 264 | }, 265 | { 266 | "group": "Methods", 267 | "number": 7009, 268 | "name": "removeTokenGroup" 269 | }, 270 | { 271 | "group": "Methods", 272 | "number": 7011, 273 | "name": "setValue" 274 | }, 275 | { 276 | "group": "Methods", 277 | "number": 7056, 278 | "name": "Simulate User Input" 279 | }, 280 | "-----------------------------------------------------" 281 | ] -------------------------------------------------------------------------------- /data/releases.json: -------------------------------------------------------------------------------- 1 | [ 2 | "-----------------------------------------------------------------", 3 | { 4 | "version":"0.4.0", 5 | "date":"XXX", 6 | "released":false, 7 | "changes":[ 8 | 9 | ], 10 | "files":[ 11 | { "name":"autocomplete-0.4.0.zip", "size":"68.3 KB" }, 12 | { "name":"autocomplete-0.4.0.js", "size":"65.0 KB" }, 13 | { "name":"autocomplete-0.4.0.min.js", "size":"20.9 KB" }, 14 | { "name":"autocomplete-0.4.0.css", "size":"2.89 KB" }, 15 | { "name":"autocomplete-0.4.0.min.css", "size":"2.32 KB" } 16 | ] 17 | }, 18 | "-----------------------------------------------------------------", 19 | { 20 | "version":"0.3.0", 21 | "date":"20 Oct 2013", 22 | "changes":[ 23 | "Allow DOM element to be passed to AutoComplete constructor (GitHub Issue #67)", 24 | "Fix bug with jQuery detection code (GitHub Issue #72)", 25 | "Give unique CSS class names to all elements (GitHub Issue #73)" 26 | ], 27 | "files":[ 28 | { "name":"autocomplete-0.3.0.zip", "size":"87.2 KB" }, 29 | { "name":"autocomplete-0.3.0.js", "size":"64.4 KB" }, 30 | { "name":"autocomplete-0.3.0.min.js", "size":"21.9 KB" }, 31 | { "name":"autocomplete-0.3.0.css", "size":"2.3 KB" }, 32 | { "name":"autocomplete-0.3.0.min.css", "size":"1.9 KB" } 33 | ] 34 | }, 35 | "-----------------------------------------------------------------", 36 | { 37 | "version":"0.2.1", 38 | "date":"09 Apr 2013", 39 | "changes":[ 40 | "Fix bug with escaping HTML when calculating the width of the input element" 41 | ], 42 | "files":[ 43 | { "name":"autocomplete-0.2.1.zip", "size":"68.3 KB" }, 44 | { "name":"autocomplete-0.2.1.js", "size":"65.0 KB" }, 45 | { "name":"autocomplete-0.2.1.min.js", "size":"20.9 KB" }, 46 | { "name":"autocomplete-0.2.1.css", "size":"2.89 KB" }, 47 | { "name":"autocomplete-0.2.1.min.css", "size":"2.32 KB" } 48 | ] 49 | }, 50 | "-----------------------------------------------------------------", 51 | { 52 | "version":"0.2.0", 53 | "date":"25 Mar 2013", 54 | "changes":[ 55 | "Remove \"groups\" option for Option Objects", 56 | "Improve tab behavior", 57 | "Bug fixes" 58 | ], 59 | "files":[ 60 | { "name":"autocomplete-0.2.0.zip", "size":"68.3 KB" }, 61 | { "name":"autocomplete-0.2.0.js", "size":"65.0 KB" }, 62 | { "name":"autocomplete-0.2.0.min.js", "size":"20.9 KB" }, 63 | { "name":"autocomplete-0.2.0.css", "size":"2.89 KB" }, 64 | { "name":"autocomplete-0.2.0.min.css", "size":"2.32 KB" } 65 | ] 66 | }, 67 | "-----------------------------------------------------------------", 68 | { 69 | "version":"0.1.0", 70 | "date":"14 Feb 2013", 71 | "changes":[ 72 | "Initial release" 73 | ], 74 | "files":[ 75 | { "name":"autocomplete-0.1.0.zip", "size":"24.1 KB" }, 76 | { "name":"autocomplete-0.1.0.js", "size":"60.4 KB" }, 77 | { "name":"autocomplete-0.1.0.min.js", "size":"20.0 KB" }, 78 | { "name":"autocomplete-0.1.0.css", "size":"2.92 KB" }, 79 | { "name":"autocomplete-0.1.0.min.css", "size":"2.44 KB" } 80 | ] 81 | }, 82 | "-----------------------------------------------------------------" 83 | ] -------------------------------------------------------------------------------- /examples/1000.html: -------------------------------------------------------------------------------- 1 |

At its most simple, AutoComplete works with an array of values.

2 | -------------------------------------------------------------------------------- /examples/1000.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); -------------------------------------------------------------------------------- /examples/1002.html: -------------------------------------------------------------------------------- 1 |

You can have nested lists using the children property.

2 |

This example works like selecting from a key / value list.

3 | -------------------------------------------------------------------------------- /examples/1002.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'foods', 3 | lists: { 4 | foods: [ 5 | { value: 'Fruits', children: 'fruits' }, 6 | { value: 'Meats', children: 'meats' }, 7 | { value: 'Vegetables', children: 'vegetables' } 8 | ], 9 | fruits: ['Apple', 'Banana', 'Orange'], 10 | meats: ['Beef', 'Chicken', 'Pork'], 11 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/1003.html: -------------------------------------------------------------------------------- 1 |

Your lists can be arbitrarily nested using the children property.

2 |

In this example we have more specific choices for beef and steak than the other foods.

3 | -------------------------------------------------------------------------------- /examples/1003.js: -------------------------------------------------------------------------------- 1 | var foods = [ 2 | { value: 'Fruits', children: 'fruits' }, 3 | { value: 'Meats', children: 'meats' }, 4 | { value: 'Vegetables', children: 'vegetables' } 5 | ]; 6 | var fruits = ['Apple', 'Banana', 'Orange']; 7 | var meats = [ 8 | { value: 'Beef', children: 'beef' }, 9 | 'Chicken', 10 | 'Pork' 11 | ]; 12 | var vegetables = ['Carrot', 'Lettuce', 'Onion']; 13 | var beef = [ 14 | 'Hamburger', 15 | 'Pot Roast', 16 | { value: 'Steak', children: 'steak' } 17 | ]; 18 | var steak = ['NY Strip', 'Ribeye', 'T-Bone']; 19 | 20 | var config = { 21 | initialList: 'foods', 22 | lists: { 23 | foods: foods, 24 | fruits: fruits, 25 | meats: meats, 26 | vegetables: vegetables, 27 | beef: beef, 28 | steak: steak 29 | } 30 | }; 31 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/1007.html: -------------------------------------------------------------------------------- 1 |

This example shows multiple lists connected using the children property.

2 | -------------------------------------------------------------------------------- /examples/1007.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'drinks', 3 | lists: { 4 | drinks: [ 5 | { value: 'Coffee', children: 'cream' }, 6 | { value: 'Tea', children: 'teaOptions' }, 7 | { value: 'Soda', children: 'sodaOptions' }, 8 | { value: 'Water', children: 'ice' } 9 | ], 10 | cream: { 11 | children: 'sugar', 12 | options: ['Cream', 'No Cream'] 13 | }, 14 | sugar: ['Sugar', 'No Sugar'], 15 | teaOptions: ['Hot Tea', 'Iced Tea'], 16 | sodaOptions: ['Coke', 'Diet Coke', 'Dr Pepper', 'Sprite'], 17 | ice: ['Ice', 'No Ice'] 18 | } 19 | }; 20 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/1045.html: -------------------------------------------------------------------------------- 1 |

You can have multiple widgets on the same page.

2 |
3 |
-------------------------------------------------------------------------------- /examples/1045.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget1 = new AutoComplete('search_bar1', fruits); 3 | var widget2 = new AutoComplete('search_bar2', fruits); -------------------------------------------------------------------------------- /examples/2000.html: -------------------------------------------------------------------------------- 1 |

You can source a list from a URL via AJAX.

2 | -------------------------------------------------------------------------------- /examples/2000.js: -------------------------------------------------------------------------------- 1 | var url = 'api/states.php?q={input}'; 2 | var widget = new AutoComplete('search_bar', url); -------------------------------------------------------------------------------- /examples/2001.html: -------------------------------------------------------------------------------- 1 |

You can combine options defined in the JavaScript with options that come from the server.

2 |

In this example I've included some common Texas cities locally and am requesting the rest via AJAX.

3 | -------------------------------------------------------------------------------- /examples/2001.js: -------------------------------------------------------------------------------- 1 | var commonCities = ['Austin','Dallas','El Paso','Houston','San Antonio']; 2 | var config = { 3 | lists: { 4 | cities: { 5 | ajaxOpts: { 6 | url: 'api/cities.php?state=TX&q={input}&includeCommon=false' 7 | }, 8 | options: commonCities 9 | } 10 | } 11 | }; 12 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/2002.html: -------------------------------------------------------------------------------- 1 |

Lists using AJAX work the same way as lists with local options.

2 |

In this example, our initial list has local options and all of its children lists are powered by AJAX.

3 | -------------------------------------------------------------------------------- /examples/2002.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'animals', 3 | lists: { 4 | animals: [ 5 | { value: 'Birds', children: 'birds' }, 6 | { value: 'Mammals', children: 'mammals' }, 7 | { value: 'Reptiles', children: 'reptiles' } 8 | ], 9 | birds: 'api/birds.php?q={input}', 10 | mammals: 'api/mammals.php?q={input}', 11 | reptiles: 'api/reptiles.php?q={input}' 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/2003.html: -------------------------------------------------------------------------------- 1 |

You can modify results that come back from the server with a preProcess function on ajaxOpts.

2 |

The function should return an array of Option Objects.

3 |

In this example the server is returning a nested object of countries indexed by abbreviation. The createCountryOptions function turns this into an array of Option Objects.

4 | -------------------------------------------------------------------------------- /examples/2003.js: -------------------------------------------------------------------------------- 1 | var createCountryOptions = function(serverData) { 2 | console.log("Server data:"); 3 | console.log(serverData); 4 | 5 | var options = []; 6 | var countries = serverData.countries; 7 | for (var i in countries) { 8 | if (countries.hasOwnProperty(i) !== true) continue; 9 | 10 | options.push({ 11 | value: { 12 | abbr: i, 13 | name: countries[i] 14 | } 15 | }); 16 | } 17 | 18 | console.log("Options array:"); 19 | console.log(options); 20 | 21 | return options; 22 | }; 23 | 24 | var config = { 25 | lists: { 26 | countries: { 27 | ajaxOpts: { 28 | preProcess: createCountryOptions, 29 | url: 'api/countries.php?q={input}' 30 | }, 31 | optionHTML: '{abbr} - {name}' 32 | } 33 | } 34 | }; 35 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/2004.html: -------------------------------------------------------------------------------- 1 |

You can provide custom AJAX settings using the ajaxOpts property.

2 |

In this example we are sourcing our list with an HTTP POST request.

3 | -------------------------------------------------------------------------------- /examples/2004.js: -------------------------------------------------------------------------------- 1 | var buildAjaxOpts = function(input) { 2 | return { 3 | data: { 4 | username: 'admin', 5 | password: 'secret1', 6 | q: input 7 | }, 8 | type: 'POST', 9 | url: 'api/secret_users.php' 10 | }; 11 | }; 12 | 13 | var config = { 14 | lists: { 15 | users: { 16 | ajaxOpts: buildAjaxOpts, 17 | optionHTML: '{username}' 18 | } 19 | } 20 | }; 21 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/2020.html: -------------------------------------------------------------------------------- 1 |

You can cache the results of AJAX requests with the cacheAjax property.

2 |

Results will be cached in localStorage or just for the current browser session if localStorage is not available.

3 |

If you are using this feature I recommend including a localStorage polyfill.

4 | -------------------------------------------------------------------------------- /examples/2020.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | lists: { 3 | states: { 4 | ajaxOpts: { 5 | url: 'api/states.php?q={input}' 6 | }, 7 | cacheAjax: true 8 | } 9 | } 10 | }; 11 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/2021.html: -------------------------------------------------------------------------------- 1 |

Use the cacheAjaxSeconds property to control the length the results are cached for.

2 |

The default is to cache results for 2 weeks.

3 |

In this silly example, we're only caching the results for 15 seconds.

4 | -------------------------------------------------------------------------------- /examples/2021.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | lists: { 3 | states: { 4 | ajaxOpts: { 5 | url: 'api/states.php?slow=true&q={input}' 6 | }, 7 | cacheAjax: true, 8 | cacheAjaxSeconds: 15 9 | } 10 | } 11 | }; 12 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/3000.html: -------------------------------------------------------------------------------- 1 |

You can set the initial value of the widget with the initialValue property.

2 |

The value of the widget must be an array of Token Groups.

3 | 4 | -------------------------------------------------------------------------------- /examples/3000.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialValue: [['Kiwi'], ['Apple']], 3 | lists: { 4 | fruits: ['Apple', 'Banana', 'Orange'] 5 | } 6 | }; 7 | var widget = new AutoComplete('search_bar', config); 8 | 9 | $('#show_value_btn').on('click', function() { 10 | console.log("Current value of the widget:"); 11 | console.log(widget.getValue()); 12 | }); -------------------------------------------------------------------------------- /examples/3001.html: -------------------------------------------------------------------------------- 1 |

You can use the maxTokenGroups property to control how many token groups get displayed in the search bar.

2 |

In this example we are limiting the user to 3 fruits.

3 | -------------------------------------------------------------------------------- /examples/3001.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | maxTokenGroups: 3, 3 | lists: { 4 | fruits: ['Apple', 'Banana', 'Orange'] 5 | } 6 | }; 7 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/3005.html: -------------------------------------------------------------------------------- 1 |

You can set a placeholder for the search bar with the placeholderHTML property.

2 | -------------------------------------------------------------------------------- /examples/3005.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | placeholderHTML: 'Search Fruits', 3 | lists: { 4 | fruits: ['Apple', 'Banana', 'Orange'] 5 | } 6 | }; 7 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/3012.html: -------------------------------------------------------------------------------- 1 |

You can log AutoComplete errors to console.log() by setting the showErrors property to 'console'.

2 |

In this example we see an error when we call the setValue method with an invalid data structure.

3 | 4 | -------------------------------------------------------------------------------- /examples/3012.js: -------------------------------------------------------------------------------- 1 | var fruits = [ 2 | { value: { name: 'Apple', plu: 4015, inSeason: false } }, 3 | { value: { name: 'Banana', plu: 4011, inSeason: true } }, 4 | { value: { name: 'Orange', plu: 3037, inSeason: false } } 5 | ]; 6 | 7 | var widget = new AutoComplete('search_bar', { 8 | showErrors: 'console', 9 | lists: { 10 | fruits: { 11 | optionHTML: '{name}', 12 | options: fruits 13 | } 14 | } 15 | }); 16 | 17 | $('#setValueBtn').on('click', function() { 18 | // invalid Token Object because the object does not have 19 | // a .tokenHTML property 20 | widget.setValue({ 21 | value: { 22 | name: 'Kiwi', 23 | plu: 4030, 24 | inSeasons: false 25 | } 26 | }); 27 | }); -------------------------------------------------------------------------------- /examples/3015.html: -------------------------------------------------------------------------------- 1 |

Use the tokenSeparatorHTML property to control the space between tokens in the search bar.

2 | -------------------------------------------------------------------------------- /examples/3015.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | tokenSeparatorHTML: '»', 3 | initialList: 'foods', 4 | lists: { 5 | foods: [ 6 | { value: 'Fruits', children: 'fruits' }, 7 | { value: 'Meats', children: 'meats' }, 8 | { value: 'Vegetables', children: 'vegetables' } 9 | ], 10 | fruits: ['Apple', 'Banana', 'Orange'], 11 | meats: ['Beef', 'Chicken', 'Pork'], 12 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 13 | } 14 | }; 15 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/3016.html: -------------------------------------------------------------------------------- 1 |

tokenSeparatorHTML can be a function.

2 | -------------------------------------------------------------------------------- /examples/3016.js: -------------------------------------------------------------------------------- 1 | var buildSeparator = function(left, right) { 2 | if (left.value > right.value) { 3 | return '>'; 4 | } 5 | if (left.value < right.value) { 6 | return '<' 7 | } 8 | return '='; 9 | }; 10 | 11 | var nums = [1,2,3,4,5,6,7,8,9,10]; 12 | 13 | var config = { 14 | tokenSeparatorHTML: buildSeparator, 15 | initialList: 'nums1', 16 | lists: { 17 | nums1: { 18 | children: 'nums2', 19 | options: nums 20 | }, 21 | nums2: nums 22 | } 23 | }; 24 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/3031.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/3031.html -------------------------------------------------------------------------------- /examples/3031.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/3031.js -------------------------------------------------------------------------------- /examples/3088.html: -------------------------------------------------------------------------------- 1 |

You can log AutoComplete errors to window.alert() by setting the showErrors property to 'alert'.

2 |

In this example we see an error when our custom ajaxOpts.url function did not return a string.

3 | -------------------------------------------------------------------------------- /examples/3088.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | showErrors: 'alert', 3 | lists: { 4 | states: { 5 | ajaxOpts: { 6 | url: function(input) { 7 | // whoops - we forgot to return a valid URL... 8 | return false; 9 | } 10 | } 11 | } 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4001.html: -------------------------------------------------------------------------------- 1 |

You can force the user to pick from a list, allow free-form input, or do a hybrid with allowFreeform.

2 |

In this example we have mandatory choices for breakfast, suggestions for lunch (but you can type in anything you want), and anything goes for dinner.

3 |

Allowing the user to enter free-form text is disabled by default.

4 | -------------------------------------------------------------------------------- /examples/4001.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'meals', 3 | lists: { 4 | meals: [ 5 | { value: 'Breakfast', children: 'breakfast' }, 6 | { value: 'Lunch', children: 'lunch' }, 7 | { value: 'Dinner', children: 'dinner' } 8 | ], 9 | 10 | breakfast: { 11 | allowFreeform: false, // NOTE: this is the default 12 | options: ['Bacon', 'Eggs', 'Pancake', 'Waffle'] 13 | }, 14 | 15 | lunch: { 16 | allowFreeform: true, 17 | options: ['Calzone', 'Hot dog', 'Greek Salad', 'Panini', 'Turkey Sandwich'] 18 | }, 19 | 20 | dinner: { 21 | allowFreeform: true 22 | } 23 | } 24 | }; 25 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4003.html: -------------------------------------------------------------------------------- 1 |

You can control the list workflow by using the children property on the list object.

2 | -------------------------------------------------------------------------------- /examples/4003.js: -------------------------------------------------------------------------------- 1 | var containerList = { 2 | children: 'iceCream', 3 | options: ['Bowl', 'Regular Cone', 'Waffle Cone'] 4 | }; 5 | 6 | var iceCreamList = { 7 | children: 'toppings1', 8 | options: ['Chocolate', 'Strawberry', 'Vanilla'] 9 | }; 10 | 11 | var toppings1List = { 12 | children: 'toppings2', 13 | options: ['Caramel', 'Hot Fudge', 'Whip Cream'] 14 | }; 15 | 16 | var toppings2List = { 17 | children: 'cherry', 18 | options: ['Chocolate Chips', "M&M's", 'Nuts', 'Sprinkles'] 19 | }; 20 | 21 | var cherryList = ['Cherry', 'No Cherry']; 22 | 23 | var config = { 24 | initialList: 'container', 25 | lists: { 26 | container: containerList, 27 | iceCream: iceCreamList, 28 | toppings1: toppings1List, 29 | toppings2: toppings2List, 30 | cherry: cherryList 31 | } 32 | }; 33 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4008.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /examples/4008.js: -------------------------------------------------------------------------------- 1 | var states = [{"value":{"name":"Alab&ma","abbr":"AL"}},{"value":{"name":"Alaska","abbr":"AK"}},{"value":{"name":"Arizona","abbr":"AZ"}},{"value":{"name":"Arkansas","abbr":"AR"}},{"value":{"name":"California","abbr":"CA"}},{"value":{"name":"Colorado","abbr":"CO"}},{"value":{"name":"Connecticut","abbr":"CT"}},{"value":{"name":"Delaware","abbr":"DE"}},{"value":{"name":"Florida","abbr":"FL"}},{"value":{"name":"Georgia","abbr":"GA"}},{"value":{"name":"Hawaii","abbr":"HI"}},{"value":{"name":"Idaho","abbr":"ID"}},{"value":{"name":"Illinois","abbr":"IL"}},{"value":{"name":"Indiana","abbr":"IN"}},{"value":{"name":"Iowa","abbr":"IA"}},{"value":{"name":"Kansas","abbr":"KS"}},{"value":{"name":"Kentucky","abbr":"KY"}},{"value":{"name":"Louisiana","abbr":"LA"}},{"value":{"name":"Maine","abbr":"ME"}},{"value":{"name":"Maryland","abbr":"MD"}},{"value":{"name":"Massachusetts","abbr":"MA"}},{"value":{"name":"Michigan","abbr":"MI"}},{"value":{"name":"Minnesota","abbr":"MN"}},{"value":{"name":"Mississippi","abbr":"MS"}},{"value":{"name":"Missouri","abbr":"MO"}},{"value":{"name":"Montana","abbr":"MT"}},{"value":{"name":"Nebraska","abbr":"NE"}},{"value":{"name":"Nevada","abbr":"NV"}},{"value":{"name":"New Hampshire","abbr":"NH"}},{"value":{"name":"New Jersey","abbr":"NJ"}},{"value":{"name":"New Mexico","abbr":"NM"}},{"value":{"name":"New York","abbr":"NY"}},{"value":{"name":"North Carolina","abbr":"NC"}},{"value":{"name":"North Dakota","abbr":"ND"}},{"value":{"name":"Ohio","abbr":"OH"}},{"value":{"name":"Oklahoma","abbr":"OK"}},{"value":{"name":"Oregon","abbr":"OR"}},{"value":{"name":"Pennsylvania","abbr":"PA"}},{"value":{"name":"Rhode Island","abbr":"RI"}},{"value":{"name":"South Carolina","abbr":"SC"}},{"value":{"name":"South Dakota","abbr":"SD"}},{"value":{"name":"Tennessee","abbr":"TN"}},{"value":{"name":"Texas","abbr":"TX"}},{"value":{"name":"Utah","abbr":"UT"}},{"value":{"name":"Vermont","abbr":"VT"}},{"value":{"name":"Virginia","abbr":"VA"}},{"value":{"name":"Washington","abbr":"WA"}},{"value":{"name":"West Virginia","abbr":"WV"}},{"value":{"name":"Wisconsin","abbr":"WI"}},{"value":{"name":"Wyoming","abbr":"WY"}}]; 2 | var config = { 3 | lists: { 4 | states: { 5 | optionHTML: '{abbr} - {name}', 6 | options: states 7 | } 8 | } 9 | }; 10 | var widget = new AutoComplete('maxoptions_example', config); -------------------------------------------------------------------------------- /examples/4011.html: -------------------------------------------------------------------------------- 1 |

Use the ajaxLoadingHTML property to create a custom loading message.

2 | -------------------------------------------------------------------------------- /examples/4011.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | lists: { 3 | states: { 4 | ajaxLoadingHTML: 'Loading states…', 5 | ajaxOpts: { 6 | url: 'api/states.php?slow=true&q={input}' 7 | } 8 | } 9 | } 10 | }; 11 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4014.html: -------------------------------------------------------------------------------- 1 |

Use the allowFreeform property to let the user enter free-form text.

2 |

You can have options mixed in with freeform.

3 | -------------------------------------------------------------------------------- /examples/4014.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | lists: { 3 | fruits: { 4 | allowFreeform: true, 5 | options: ['Apple','Banana','Orange'] 6 | } 7 | } 8 | }; 9 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4033.html: -------------------------------------------------------------------------------- 1 |

You can use optionHTML on the List Object to control how options get rendered in the dropdown.

2 | -------------------------------------------------------------------------------- /examples/4033.js: -------------------------------------------------------------------------------- 1 | var states = [{"value":{"name":"Alabama","abbr":"AL"}},{"value":{"name":"Alaska","abbr":"AK"}},{"value":{"name":"Arizona","abbr":"AZ"}},{"value":{"name":"Arkansas","abbr":"AR"}},{"value":{"name":"California","abbr":"CA"}},{"value":{"name":"Colorado","abbr":"CO"}},{"value":{"name":"Connecticut","abbr":"CT"}},{"value":{"name":"Delaware","abbr":"DE"}},{"value":{"name":"Florida","abbr":"FL"}},{"value":{"name":"Georgia","abbr":"GA"}},{"value":{"name":"Hawaii","abbr":"HI"}},{"value":{"name":"Idaho","abbr":"ID"}},{"value":{"name":"Illinois","abbr":"IL"}},{"value":{"name":"Indiana","abbr":"IN"}},{"value":{"name":"Iowa","abbr":"IA"}},{"value":{"name":"Kansas","abbr":"KS"}},{"value":{"name":"Kentucky","abbr":"KY"}},{"value":{"name":"Louisiana","abbr":"LA"}},{"value":{"name":"Maine","abbr":"ME"}},{"value":{"name":"Maryland","abbr":"MD"}},{"value":{"name":"Massachusetts","abbr":"MA"}},{"value":{"name":"Michigan","abbr":"MI"}},{"value":{"name":"Minnesota","abbr":"MN"}},{"value":{"name":"Mississippi","abbr":"MS"}},{"value":{"name":"Missouri","abbr":"MO"}},{"value":{"name":"Montana","abbr":"MT"}},{"value":{"name":"Nebraska","abbr":"NE"}},{"value":{"name":"Nevada","abbr":"NV"}},{"value":{"name":"New Hampshire","abbr":"NH"}},{"value":{"name":"New Jersey","abbr":"NJ"}},{"value":{"name":"New Mexico","abbr":"NM"}},{"value":{"name":"New York","abbr":"NY"}},{"value":{"name":"North Carolina","abbr":"NC"}},{"value":{"name":"North Dakota","abbr":"ND"}},{"value":{"name":"Ohio","abbr":"OH"}},{"value":{"name":"Oklahoma","abbr":"OK"}},{"value":{"name":"Oregon","abbr":"OR"}},{"value":{"name":"Pennsylvania","abbr":"PA"}},{"value":{"name":"Rhode Island","abbr":"RI"}},{"value":{"name":"South Carolina","abbr":"SC"}},{"value":{"name":"South Dakota","abbr":"SD"}},{"value":{"name":"Tennessee","abbr":"TN"}},{"value":{"name":"Texas","abbr":"TX"}},{"value":{"name":"Utah","abbr":"UT"}},{"value":{"name":"Vermont","abbr":"VT"}},{"value":{"name":"Virginia","abbr":"VA"}},{"value":{"name":"Washington","abbr":"WA"}},{"value":{"name":"West Virginia","abbr":"WV"}},{"value":{"name":"Wisconsin","abbr":"WI"}},{"value":{"name":"Wyoming","abbr":"WY"}}]; 2 | var config = { 3 | lists: { 4 | states: { 5 | optionHTML: '{name} ({abbr})', 6 | options: states 7 | } 8 | } 9 | }; 10 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4034.html: -------------------------------------------------------------------------------- 1 |

optionHTML and tokenHTML can be functions.

2 | -------------------------------------------------------------------------------- /examples/4034.js: -------------------------------------------------------------------------------- 1 | var users = [ 2 | {value: { name: 'Brent', username: 'brentf', admin: true }}, 3 | {value: { name: 'Ronnie', username: 'ronnief' }}, 4 | {value: { name: 'Phil', username: 'philg' }}, 5 | {value: { name: 'Chris', username: 'chriso', admin: true }}, 6 | {value: { name: 'Katie', username: 'katief' }}, 7 | {value: { name: 'Jeff', username: 'jeffp' }}, 8 | {value: { name: 'Fred', username: 'freda' }}, 9 | {value: { name: 'Denise', username: 'denisea', admin: true }}, 10 | {value: { name: 'Aaron', username: 'aaronp' }} 11 | ]; 12 | 13 | // AutoComplete provides this convenience method for you 14 | var encode = AutoComplete.htmlEncode; 15 | 16 | var buildOption = function(option) { 17 | var html = ''; 18 | if (option.value.admin === true) { 19 | html += 'Admin '; 20 | } 21 | html += encode(option.value.name) + 22 | ' (' + encode(option.value.username) + ')'; 23 | return html; 24 | }; 25 | 26 | var buildToken = function(option) { 27 | html = encode(option.value.username); 28 | 29 | // mark the username if they are an admin 30 | if (option.value.admin === true) { 31 | html += ' (A)'; 32 | } 33 | return html; 34 | }; 35 | 36 | var config = { 37 | placeholderHTML: 'Select Users', 38 | lists: { 39 | users: { 40 | optionHTML: buildOption, 41 | tokenHTML: buildToken, 42 | options: users 43 | } 44 | } 45 | }; 46 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4037.html: -------------------------------------------------------------------------------- 1 |

ajaxLoadingHTML can be a function.

2 | -------------------------------------------------------------------------------- /examples/4037.js: -------------------------------------------------------------------------------- 1 | // AutoComplete provides an HTML escape function 2 | var encode = AutoComplete.htmlEncode; 3 | 4 | var buildLoadingMsg = function(input) { 5 | if (input === '') { 6 | return 'Loading states…'; 7 | } 8 | return 'Searching for "' + encode(input) + '"'; 9 | }; 10 | 11 | var config = { 12 | lists: { 13 | states: { 14 | ajaxLoadingHTML: buildLoadingMsg, 15 | ajaxOpts: { 16 | url: 'api/states.php?slow=true&q={input}' 17 | } 18 | } 19 | } 20 | }; 21 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4041.html: -------------------------------------------------------------------------------- 1 |

Use the matchOptions property to define a custom matching function.

2 |

The function should return an array of Option Objects.

3 |

In this example, we're allowing the user to match on exact PLU code in addition to the regular text search.

4 |

Note that this example is kind of silly, it would be a much better user experience to include the PLU code on the optionHTML if we wanted to allow the user to match against it.

5 | -------------------------------------------------------------------------------- /examples/4041.js: -------------------------------------------------------------------------------- 1 | var fruits = [ 2 | { value: { name: 'Apple', plu: 4015, inSeason: false } }, 3 | { value: { name: 'Banana', plu: 4011, inSeason: true } }, 4 | { value: { name: 'Orange', plu: 3037, inSeason: false } } 5 | ]; 6 | 7 | var matchOptions = function(input, matchedOptions, allOptions, value) { 8 | // if they have entered an exact PLU code match, show that fruit 9 | input = parseInt(input, 10); 10 | for (var i = 0; i < allOptions.length; i++) { 11 | if (input === allOptions[i].value.plu) { 12 | return [allOptions[i]]; 13 | } 14 | } 15 | 16 | // else return the matched options 17 | return matchedOptions; 18 | }; 19 | 20 | var config = { 21 | placeholderHTML: 'Enter Fruit or PLU', 22 | lists: { 23 | fruits: { 24 | matchOptions: matchOptions, 25 | optionHTML: '{name}', 26 | options: fruits 27 | } 28 | } 29 | }; 30 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4042.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/4042.html -------------------------------------------------------------------------------- /examples/4042.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/4042.js -------------------------------------------------------------------------------- /examples/4055.html: -------------------------------------------------------------------------------- 1 |

Use the ajaxErrorHTML property to set a custom message when there is an AJAX failure.

2 | -------------------------------------------------------------------------------- /examples/4055.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | lists: { 3 | states: { 4 | ajaxErrorHTML: "Whoops!
" + 5 | "We can't connect to the server right now.
" + 6 | "Please try again later.", 7 | ajaxOpts: { 8 | url: 'api/bad_url.php?q={input}' 9 | } 10 | } 11 | } 12 | }; 13 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/4072.html: -------------------------------------------------------------------------------- 1 |

ajaxErrorHTML can also be a function that returns an HTML string.

2 |

In this example, our buggy.php script is acting strange and returning invalid JSON and long response times.

3 | -------------------------------------------------------------------------------- /examples/4072.js: -------------------------------------------------------------------------------- 1 | var buildAjaxError = function(errType) { 2 | if (errType === 'parsererror') { 3 | return 'Error parsing the JSON.
Do we have a bug in the code?'; 4 | } 5 | if (errType === 'timeout') { 6 | return 'AJAX Timeout.
Is the network down?'; 7 | } 8 | return 'AJAX Error'; 9 | }; 10 | 11 | var config = { 12 | lists: { 13 | states: { 14 | ajaxErrorHTML: buildAjaxError, 15 | ajaxOpts: { 16 | url: 'api/buggy.php?q={input}', 17 | timeout: 3000 18 | } 19 | } 20 | } 21 | }; 22 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/5022.html: -------------------------------------------------------------------------------- 1 |

A children property on an Option Object will override a children property on the parent List Object.

2 |

In this example, if the user does not want toppings on their sundae it ends the list workflow.

3 | -------------------------------------------------------------------------------- /examples/5022.js: -------------------------------------------------------------------------------- 1 | var containerList = { 2 | children: 'iceCream', 3 | options: ['Bowl', 'Regular Cone', 'Waffle Cone'] 4 | }; 5 | 6 | var iceCreamList = { 7 | children: 'toppings1', 8 | options: ['Chocolate', 'Strawberry', 'Vanilla'] 9 | }; 10 | 11 | var toppings1List = { 12 | children: 'toppings2', 13 | options: [ 14 | 'Caramel', 'Hot Fudge', 'Whip Cream', 15 | {children: false, value: 'No Toppings'} 16 | ] 17 | }; 18 | 19 | var toppings2List = { 20 | children: 'cherry', 21 | options: ['Chocolate Chips', "M&M's", 'Nuts', 'Sprinkles'] 22 | }; 23 | 24 | var cherryList = ['Cherry', 'No Cherry']; 25 | 26 | var config = { 27 | initialList: 'container', 28 | lists: { 29 | container: containerList, 30 | iceCream: iceCreamList, 31 | toppings1: toppings1List, 32 | toppings2: toppings2List, 33 | cherry: cherryList 34 | } 35 | }; 36 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/6000.html: -------------------------------------------------------------------------------- 1 |

You can use the onChange property to execute a function when the value of the search bar changes.

2 | -------------------------------------------------------------------------------- /examples/6000.js: -------------------------------------------------------------------------------- 1 | var onChange = function(newValue, oldValue) { 2 | console.log('Search bar updated.'); 3 | console.log('Old Value'); 4 | console.log(JSON.stringify(oldValue)); 5 | console.log('New Value'); 6 | console.log(JSON.stringify(newValue)); 7 | }; 8 | 9 | var config = { 10 | onChange: onChange, 11 | lists: { 12 | fruits: ['Apple', 'Banana', 'Orange'] 13 | } 14 | }; 15 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/6001.html: -------------------------------------------------------------------------------- 1 |

You can change the value of the widget with the onChange function by returning a valid token group array.

2 |

In this silly example, we're always confirming that the user wants to remove a fruit.

3 | -------------------------------------------------------------------------------- /examples/6001.js: -------------------------------------------------------------------------------- 1 | var onChange = function(newValue, oldValue) { 2 | if (newValue.length < oldValue.length) { 3 | var msg = 'Are you sure you want to remove this fruit?'; 4 | var sure = confirm(msg); 5 | if (sure !== true) { 6 | return oldValue; 7 | } 8 | } 9 | return newValue; 10 | }; 11 | 12 | var config = { 13 | onChange: onChange, 14 | lists: { 15 | fruits: ['Apple', 'Banana', 'Orange'] 16 | } 17 | }; 18 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/7000.html: -------------------------------------------------------------------------------- 1 |

You can add an option to a list using the addOption method.

2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7000.js: -------------------------------------------------------------------------------- 1 | var fruits = [ 2 | { value: { name: 'Apple', plu: 4015, inSeason: false } }, 3 | { value: { name: 'Banana', plu: 4011, inSeason: true } }, 4 | { value: { name: 'Orange', plu: 3037, inSeason: false } } 5 | ]; 6 | 7 | var widget = new AutoComplete('search_bar', { 8 | lists: { 9 | fruits: { 10 | optionHTML: '{name}', 11 | options: fruits 12 | } 13 | } 14 | }); 15 | 16 | $('#showValueBtn').on('click', function() { 17 | console.log("Current value of the search bar:"); 18 | console.log(widget.getValue()); 19 | }); 20 | 21 | $('#addOptionBtn').on('click', function() { 22 | var kiwi = { 23 | value: { name: 'Kiwi', plu: 4030, inSeason: false } 24 | }; 25 | widget.addOption('fruits', kiwi); 26 | 27 | $('#addOptionBtn').css('display', 'none'); 28 | }); -------------------------------------------------------------------------------- /examples/7001.html: -------------------------------------------------------------------------------- 1 |

You can remove the focus from the search bar with the blur method.

2 |

In this silly example, we're removing the focus every 5 seconds.

3 | -------------------------------------------------------------------------------- /examples/7001.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | setInterval(widget.blur, 5000); -------------------------------------------------------------------------------- /examples/7002.html: -------------------------------------------------------------------------------- 1 |

You can empty the contents of the search bar with the clear method.

2 |

Calling clear() has the same effect as calling setValue([]).

3 | 4 | -------------------------------------------------------------------------------- /examples/7002.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | $('#clearBtn').on('click', widget.clear); -------------------------------------------------------------------------------- /examples/7003.html: -------------------------------------------------------------------------------- 1 |

You can completely remove the widget from the DOM with the destroy method.

2 |

Calling destroy is not reversible. You will have to re-initialize the widget if you want to see it again.

3 | 4 | -------------------------------------------------------------------------------- /examples/7003.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | $('#destroyBtn').on('click', function() { 5 | widget.destroy(); 6 | $('#destroyBtn').hide(); 7 | }); -------------------------------------------------------------------------------- /examples/7004.html: -------------------------------------------------------------------------------- 1 |

You can put the focus on the search bar with the focus method.

2 | 3 | -------------------------------------------------------------------------------- /examples/7004.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | $('#focusBtn').on('click', widget.focus); -------------------------------------------------------------------------------- /examples/7005.html: -------------------------------------------------------------------------------- 1 |

Use the getList method to retrieve the List Object for a list.

2 |

getList returns the List Object if the list exists; false otherwise.

3 |

getList returns the full List Object used internally by AutoComplete, even if you initialized the list using shorthand.

4 | 5 | -------------------------------------------------------------------------------- /examples/7005.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'foods', 3 | lists: { 4 | foods: [ 5 | { value: 'Fruits', children: 'fruits' }, 6 | { value: 'Meats', children: 'meats' }, 7 | { value: 'Vegetables', children: 'vegetables' } 8 | ], 9 | fruits: ['Apple', 'Banana', 'Orange'], 10 | meats: ['Beef', 'Chicken', 'Pork'], 11 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); 15 | 16 | $('#getListBtn').on('click', function() { 17 | var listName = window.prompt('Which list would you like to see?'); 18 | 19 | var list = widget.getList(listName); 20 | if (list === false) { 21 | console.log('The list "' + listName + '" does not exist.'); 22 | } 23 | else { 24 | console.log('Here is list "' + listName + '":'); 25 | console.log(list); 26 | } 27 | }); -------------------------------------------------------------------------------- /examples/7006.html: -------------------------------------------------------------------------------- 1 |

The getLists method returns an object of List Objects.

2 |

It is essentially a way to see the value of config.lists.

3 | 4 | -------------------------------------------------------------------------------- /examples/7006.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'foods', 3 | lists: { 4 | foods: [ 5 | { value: 'Fruits', children: 'fruits' }, 6 | { value: 'Meats', children: 'meats' }, 7 | { value: 'Vegetables', children: 'vegetables' } 8 | ], 9 | fruits: ['Apple', 'Banana', 'Orange'], 10 | meats: ['Beef', 'Chicken', 'Pork'], 11 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); 15 | 16 | $('#getListsBtn').on('click', function() { 17 | console.log(widget.getLists()); 18 | }); -------------------------------------------------------------------------------- /examples/7007.html: -------------------------------------------------------------------------------- 1 |

You can retrieve the current value of the search bar using the getValue method.

2 |

The value of the search bar is an array of Token Groups.

3 | 4 | -------------------------------------------------------------------------------- /examples/7007.js: -------------------------------------------------------------------------------- 1 | var fruits = [ 2 | { value: { name: 'Apple', plu: 4015, inSeason: false } }, 3 | { value: { name: 'Banana', plu: 4011, inSeason: true } }, 4 | { value: { name: 'Orange', plu: 3037, inSeason: false } } 5 | ]; 6 | 7 | var widget = new AutoComplete('search_bar', { 8 | lists: { 9 | fruits: { 10 | optionHTML: '{name}', 11 | options: fruits 12 | } 13 | } 14 | }); 15 | 16 | $('#showValueBtn').on('click', function() { 17 | console.log("Current value of the search bar:"); 18 | console.log(widget.getValue()); 19 | }); -------------------------------------------------------------------------------- /examples/7008.html: -------------------------------------------------------------------------------- 1 |

You can remove a list with the removeList method.

2 |

removeList returns true if the list was removed; false otherwise.

3 |

You cannot remove the initialList.

4 | 5 | -------------------------------------------------------------------------------- /examples/7008.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | initialList: 'foods', 3 | lists: { 4 | foods: [ 5 | { value: 'Fruits', children: 'fruits' }, 6 | { value: 'Meats', children: 'meats' }, 7 | { value: 'Vegetables', children: 'vegetables' } 8 | ], 9 | fruits: ['Apple', 'Banana', 'Orange'], 10 | meats: ['Beef', 'Chicken', 'Pork'], 11 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 12 | } 13 | }; 14 | var widget = new AutoComplete('search_bar', config); 15 | 16 | $('#removeListBtn').on('click', function() { 17 | var listName = window.prompt('Which list would you like to remove?'); 18 | if (! listName) return; 19 | 20 | var result = widget.removeList(listName); 21 | if (result === false) { 22 | console.log('The list "' + listName + '" was NOT removed.'); 23 | } 24 | else { 25 | console.log('Removed list "' + listName + '".'); 26 | } 27 | }); -------------------------------------------------------------------------------- /examples/7009.html: -------------------------------------------------------------------------------- 1 |

You can remove a Token Group with the removeTokenGroup method.

2 | 3 | -------------------------------------------------------------------------------- /examples/7009.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | $('#removeTokenGroupBtn').on('click', function() { 5 | var result = widget.removeTokenGroup(0); 6 | if (result === false) { 7 | console.log('Token Group was not removed. The widget must be empty.'); 8 | } 9 | else { 10 | console.log('First Token Group removed. Updated value of the widget:'); 11 | console.log(result); 12 | } 13 | }); -------------------------------------------------------------------------------- /examples/7010.html: -------------------------------------------------------------------------------- 1 |

You can add and update lists with the setList method.

2 |

In this example, I'm updating the initialList with the onChange function every time the value changes.

3 | -------------------------------------------------------------------------------- /examples/7010.js: -------------------------------------------------------------------------------- 1 | var onChange = function(newValue, oldValue) { 2 | 3 | console.log("sauce"); 4 | return newValue; 5 | }; 6 | 7 | var foodsList = [ 8 | { value: 'Fruits', children: 'fruits' }, 9 | { value: 'Meats', children: 'meats' }, 10 | { value: 'Vegetables', children: 'vegetables' } 11 | ]; 12 | 13 | var config = { 14 | onChange: onChange, 15 | initialList: 'foods', 16 | lists: { 17 | foods: foodsList, 18 | fruits: ['Apple', 'Banana', 'Orange'], 19 | meats: ['Beef', 'Chicken', 'Pork'], 20 | vegetables: ['Carrot', 'Lettuce', 'Onion'] 21 | } 22 | }; 23 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/7011.html: -------------------------------------------------------------------------------- 1 |

You can set the value of the widget with the setValue method.

2 |

The value of the widget is an array of Token Groups.

3 |

You can use a String as shorthand for a Token Object when using setValue.

4 | 5 | -------------------------------------------------------------------------------- /examples/7011.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | $('#setValueBtn').on('click', function() { 5 | widget.setValue(['Kiwi']); 6 | }); -------------------------------------------------------------------------------- /examples/7056.html: -------------------------------------------------------------------------------- 1 |

Use the pressDown, pressEnter, pressUp, and setInput methods to simulate user input.

2 | 3 | -------------------------------------------------------------------------------- /examples/7056.js: -------------------------------------------------------------------------------- 1 | var fruits = ['Apple', 'Banana', 'Orange']; 2 | var widget = new AutoComplete('search_bar', fruits); 3 | 4 | var actions = [ 5 | function() { $('#runBtn').css('visibility', 'hidden'); }, 6 | function() { widget.setInput('a'); }, 7 | function() { widget.setInput('ap'); }, 8 | function() { widget.setInput('app'); }, 9 | function() { widget.pressEnter(); }, 10 | function() { widget.setInput('o'); }, 11 | function() { widget.setInput('on'); }, 12 | function() { widget.setInput('ong'); }, 13 | function() { widget.pressEnter(); }, 14 | function() { widget.pressUp(); }, 15 | function() { widget.pressUp(); }, 16 | function() { widget.pressEnter(); }, 17 | function() { widget.blur(); }, 18 | function() { $('#runBtn').css('visibility', 'visible'); } 19 | ]; 20 | 21 | var simulate = function() { 22 | var interval = 500; 23 | for (var i = 0; i < actions.length; i++) { 24 | setTimeout(actions[i], i * interval); 25 | } 26 | }; 27 | 28 | $('#runBtn').on('click', simulate); 29 | setTimeout(simulate, 750); -------------------------------------------------------------------------------- /examples/8002.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/8002.js: -------------------------------------------------------------------------------- 1 | var crazyOptions = [ 2 | '&&<<<""">>>>>```////\'\'\'\'\'', 3 | '<<<<<<', 4 | 'window.alert("evil!");<' + '/' + 'script>', 5 | { 6 | optionHTML: 'Texas A&M (©)', 7 | value: 'Texas A&M' 8 | } 9 | ]; 10 | 11 | var widget = new AutoComplete('search_bar', crazyOptions); -------------------------------------------------------------------------------- /examples/9000.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/9000.js: -------------------------------------------------------------------------------- 1 | var onDateChangeEventAdded = false; 2 | 3 | var startDate = function() { 4 | // hide the dropdown list 5 | $('div#search_bar ul.dropdown').css("visibility", "hidden"); 6 | 7 | // start the date picker 8 | var inputEl = $('div#search_bar input.autocomplete-input'); 9 | inputEl.datepicker(); 10 | 11 | // we only want to add this event once 12 | // there's a bug with datepicker where ('remove') doesn't remove 13 | // the onChange event 14 | if (onDateChangeEventAdded === false) { 15 | inputEl.on('changeDate', function() { 16 | // put the focus on the widget and press enter 17 | widget.focus(widget.pressEnter); 18 | }); 19 | onDateChangeEventAdded = true; 20 | } 21 | }; 22 | 23 | var endDate = function() { 24 | // show the dropdown list 25 | $('div#search_bar ul.dropdown').css("visibility", ""); 26 | 27 | // kill the date picker 28 | $('div#search_bar input.autocomplete-input').datepicker('remove'); 29 | }; 30 | 31 | var config = { 32 | initialList: 'dates', 33 | lists: { 34 | dates: [ 35 | { value: 'My Birthday', children: 'date' }, 36 | { value: 'His Birthday', children: 'date' }, 37 | { value: 'Your Birthday', children: 'date' } 38 | ], 39 | date: { 40 | allowFreeform: true, 41 | onStart: startDate, 42 | onEnd: endDate, 43 | options: [] 44 | } 45 | } 46 | }; 47 | var widget = new AutoComplete('search_bar', config); -------------------------------------------------------------------------------- /examples/9001.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/9001.html -------------------------------------------------------------------------------- /examples/9001.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/examples/9001.js -------------------------------------------------------------------------------- /pages/404.php: -------------------------------------------------------------------------------- 1 | 5 |

Page Not Found

6 |

Would you like to go to the homepage?

7 | -------------------------------------------------------------------------------- /pages/docs.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |

Config Object

11 |

The Config Object initializes the AutoComplete widget.

12 |

You define your List Objects - which control which options are available to the user - on the lists property.

13 |

As a shorthand method, you can provide an array of Option Objects to the config object and it will be expanded as the default list for the widget. See the Simple List Example.

14 |

As another shorthand method, you can provide a single string value and AutoComplete assumes it's an AJAX url. See the Simple AJAX example.

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 |
Property / TypeRequiredDefaultDescriptionExample
33 |
34 | 35 |
36 | 37 |
38 |

List Object

39 |
40 |
list
41 |
Noun
42 |
A number of connected items or names written or printed consecutively, typically one below the other.
43 |
44 |

List Objects are the heart of the AutoComplete widget. They define the options available to the user when they are typing.

45 |

The options for a List Object can be sourced directly in the JavaScript or externally with AJAX.

46 |

You can define the list workflow using the children property on List Objects.

47 |

As a shorthand method, you can provide an array of Option Objects anywhere that expects a full List Object. See the Nested Lists example.

48 |

As another shorthand method, you can provide a single string value and AutoComplete assumes it's an AJAX url. See the Nested Lists with AJAX example.

49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 65 | 66 |
Property / TypeRequiredDefaultDescriptionExample
67 |
68 | 69 |
70 | 71 |
72 |

Option Object

73 |
74 |
option
75 |
Noun
76 |
A thing that is or may be chosen.
77 |
78 |

Option Objects are the meat of the AutoComplete widget. They are the options displayed to the user as they type.

79 |

Option Objects can hold any arbitrary value; they are not limited to what the user sees on the screen.

80 |

An Option Object becomes a Token Object when the user selects it from the dropdown list.

81 |

You can define the list workflow using the children property on Option Objects.

82 |

As a shorthand method, you can use a string as an Option Object. See the allowFreeform example.

83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 99 | 100 |
Property / TypeRequiredDefaultDescriptionExample
101 |
102 | 103 |
104 | 105 |
106 |

Token Object

107 |
108 |
token
109 |
Noun
110 |
A thing serving as a visible or tangible representation of something abstract.
111 |
112 |

Token Objects are what is stored on the search bar when a user selects an option from the dropdown menu.

113 |

A Token Group is an array of Token Objects.

114 |

The value of the search bar is an array of Token Groups.

115 |

Token Objects are not explicitly defined in the AutoComplete config; they are created from an Option Object using the option.value and option.tokenHTML properties.

116 |

You can use a string as shorthand for a Token Object when using the setValue method.

117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 133 | 134 |
Property / TypeRequiredDefaultDescriptionExample
135 |
136 | 137 |
138 | 139 |
140 |

Methods

141 |

Each AutoComplete object has methods you can use to interact with the widget.

142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 157 | 158 |
MethodArgsDescriptionExample
159 |
160 | 161 |
162 | 163 |
164 |

Errors

165 | 172 |

AutoComplete has an error system designed to inform you when you use the API incorrectly.

173 |

Every alert has a unique code associated with it and you can control how the errors are presented with the showErrors config option.

174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 188 | 189 |
Error IDError TextMore Information
190 |
191 | 192 | 193 | 194 | 226 | 227 | '."\n"; 242 | 243 | // property and type 244 | $html .= ' '."\n"; 245 | $html .= buildPropertyAndType($propType, $prop['name'], $prop['type']); 246 | $html .= ' '."\n"; 247 | 248 | // required 249 | $html .= ' '.buildReq($prop['req']).''."\n"; 250 | 251 | // default 252 | if (array_key_exists('leftAlignDefault', $prop) === true) { 253 | $html .= ' '.buildDefault($prop['default']).''."\n"; 254 | } 255 | else { 256 | $html .= ' '.buildDefault($prop['default']).''."\n"; 257 | } 258 | 259 | // description 260 | $html .= ' '."\n"; 261 | $html .= buildDesc($prop['desc']); 262 | $html .= ' '."\n"; 263 | 264 | // examples 265 | $html .= ' '."\n"; 266 | $html .= buildExample($prop['examples'], $examples); 267 | $html .= ' '."\n"; 268 | 269 | $html .= ''."\n"; 270 | 271 | return $html; 272 | } 273 | 274 | function buildMethodRow($method, $examples) { 275 | $nameNoParens = preg_replace('/\(.+$/', '', $method['name']); 276 | 277 | $html = ''; 278 | 279 | // table row 280 | if (array_key_exists('noId', $method) === true) { 281 | $html .= "\n"; 282 | } 283 | else { 284 | $html .= ''."\n"; 285 | } 286 | 287 | // name 288 | $html .= ' '.$method['name'].''."\n"; 289 | 290 | // args 291 | if (array_key_exists('args', $method) === true) { 292 | $html .= ' '."\n"; 293 | foreach ($method['args'] as $arg) { 294 | $html .= '

'.$arg[0].' - '.$arg[1].'

'."\n"; 295 | } 296 | $html .= ' '."\n"; 297 | } 298 | else { 299 | $html .= ' none'."\n"; 300 | } 301 | 302 | // description 303 | $html .= ' '."\n"; 304 | $html .= buildDesc($method['desc']); 305 | $html .= ' '."\n"; 306 | 307 | // examples 308 | $html .= ' '."\n"; 309 | $html .= buildExample($method['examples'], $examples); 310 | $html .= ' '."\n"; 311 | 312 | $html .= "\n"; 313 | 314 | return $html; 315 | } 316 | 317 | function getExampleByNumber($number, $examples) { 318 | $number = (int) $number; 319 | foreach ($examples as $ex) { 320 | if (intval($ex['number'], 10) === $number && 321 | $ex['js'] !== '') { 322 | return $ex; 323 | } 324 | } 325 | return false; 326 | } 327 | 328 | function buildPropertyAndType($section, $name, $type) { 329 | $html = '

'.$name.'

'."\n"; 330 | $html .= '

'.buildType($type).'

'."\n"; 331 | return $html; 332 | } 333 | 334 | function buildType($type) { 335 | if (is_array($type) !== true) { 336 | $type = array($type); 337 | } 338 | 339 | $html = ''; 340 | for ($i = 0; $i < count($type); $i++) { 341 | if ($i !== 0) { 342 | $html .= ' or
'; 343 | } 344 | $html .= $type[$i]; 345 | } 346 | 347 | return $html; 348 | } 349 | 350 | function buildReq($req) { 351 | if ($req === false) { 352 | return 'no'; 353 | } 354 | if ($req === true) { 355 | return 'yes'; 356 | } 357 | return $req; 358 | } 359 | 360 | function buildDesc($desc) { 361 | if (is_array($desc) !== true) { 362 | $desc = array($desc); 363 | } 364 | $html = ''; 365 | foreach ($desc as $d) { 366 | $html .= '

'.$d.'

'."\n"; 367 | } 368 | return $html; 369 | } 370 | 371 | function buildDefault($default) { 372 | if ($default === false) { 373 | return 'n/a'; 374 | } 375 | return $default; 376 | } 377 | 378 | function buildExample($ex, $allExamples) { 379 | if (is_array($ex) !== true) { 380 | $ex = array($ex); 381 | } 382 | 383 | $html = ''; 384 | foreach ($ex as $exNum) { 385 | $example = getExampleByNumber($exNum, $allExamples); 386 | if ($example === false) continue; 387 | 388 | $html .= '

'.$example['name'].'

'."\n"; 389 | } 390 | return $html; 391 | } 392 | 393 | function buildErrorRow($error) { 394 | $html = ''; 395 | 396 | // table row 397 | $html .= ''."\n"; 398 | 399 | // id 400 | $html .= ' '.$error['id'].''."\n"; 401 | 402 | // desc 403 | $html .= ' '.htmlspecialchars($error['desc']).''."\n"; 404 | 405 | // more information 406 | if (array_key_exists('fix', $error) === true) { 407 | if (is_array($error['fix']) !== true) { 408 | $error['fix'] = array($error['fix']); 409 | } 410 | 411 | $html .= ' '."\n"; 412 | foreach ($error['fix'] as $p) { 413 | $html .= '

'.$p.'

'."\n"; 414 | } 415 | $html .= ' '."\n"; 416 | } 417 | else { 418 | $html .= ' n/a'."\n"; 419 | } 420 | 421 | $html .= "\n"; 422 | 423 | return $html; 424 | } 425 | 426 | ?> -------------------------------------------------------------------------------- /pages/download.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |

Downloads

11 | 12 | Download Most Recent Version
13 | v 14 |
15 |
16 | 17 | 23 | 24 |
25 |

Development

26 |

GitHub

27 |
28 | 29 | '."\n"; 40 | $html .= '

v'.$v.' released on '.$release['date'].'

'."\n"; 41 | $html .= ''."\n"; 46 | $html .= '
Changes:
'."\n"; 47 | $html .= ''."\n"; 52 | $html .= ''."\n\n"; 53 | 54 | return $html; 55 | } 56 | 57 | ?> -------------------------------------------------------------------------------- /pages/examples.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |

18 |

View example in new window.

19 |
20 |

Code

21 |
22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 116 | 117 | '."\n"; 137 | } 138 | $currentGroup = $ex['group']; 139 | $currentGroupIndex++; 140 | $html .= '

'.$currentGroup.'

'."\n"; 141 | $html .= ''."\n"; 148 | 149 | return $html; 150 | } 151 | ?> -------------------------------------------------------------------------------- /pages/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | -------------------------------------------------------------------------------- /pages/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | AutoCompleteJS<?php if (isset($page_title)) echo ' » '.$page_title; ?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /pages/home.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |

AutoCompleteJS is a JavaScript widget that helps your users find things quickly.

11 |
12 | 13 |
14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 |

Usage

22 |

Code:

23 |
 24 | <div id="search_bar"></div>
 25 | <script src="jquery.js"></script>
 26 | <script src="autocomplete.js"></script>
 27 | <script>
 28 | var widget = new AutoComplete('search_bar', ['Apple', 'Banana', 'Orange']);
 29 | </script>
 30 | 
31 |

Result:

32 | 33 |
34 | 35 |
36 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | 146 | 147 | -------------------------------------------------------------------------------- /pages/markup.php: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 37 | 78 | 79 | 80 | 112 | 137 | 138 | 139 | 162 | 181 | 182 | 183 | 202 | 207 | 208 |
13 | 14 | 15 |
16 |
17 |
18 | x 19 | Apple 20 |
21 |
22 | x 23 | Banana 24 |
25 |
26 | x 27 | Orange 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 | 36 |
38 | 39 | 40 |
41 |
42 |
43 | x 44 | Apple 45 |
46 |
47 | x 48 | Banana 49 |
50 |
51 | x 52 | Orange 53 |
54 |
55 | x 56 | Banana 57 |
58 |
59 | x 60 | Orange 61 |
62 |
63 | x 64 | Apple 65 |
66 |
67 | x 68 | Kiwi 69 |
70 |
71 | 72 |
73 | 74 |
75 | 76 | 77 |
81 | 82 | 83 |
84 |
85 |
86 | x 87 | Apple 88 |
89 |
90 | x 91 | Chicken 92 |
93 |
94 | x 95 | Beef 96 |
97 |
98 | 99 |
100 | 108 |
109 | 110 | 111 |
113 | 114 | 115 |
116 |
117 |
118 | x 119 | Fruit:Apple 120 |
121 |
122 | x 123 | Meats:Chicken 124 |
125 |
126 | 127 |
128 | 133 |
134 | 135 | 136 |
140 | 141 | 142 |
143 |
144 |
145 | x 146 | Banana 147 |
148 |
149 | x 150 | Orange 151 |
152 |
153 | 154 |
155 | 158 |
159 | 160 | 161 |
163 | 164 | 165 |
166 |
167 |
168 | x 169 | Name 170 |
171 |
172 | 173 |
174 | 177 |
178 | 179 | 180 |
184 | 185 | 186 |
187 |
188 |
189 | x 190 | Texas 191 |
192 |
193 | 194 |
195 | 198 |
199 | 200 | 201 |
203 | 204 | 205 | 206 |
209 | 210 | 211 |
212 |
213 | 214 | 215 | 233 | 234 | -------------------------------------------------------------------------------- /pages/single_example.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?php echo $example['name']; ?> Example 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

← Back to all examples.

19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /pages/themes.php: -------------------------------------------------------------------------------- 1 | 6 |

Germain Preston is working hard on some amazing themes ;)

7 | -------------------------------------------------------------------------------- /php/AC.php: -------------------------------------------------------------------------------- 1 | 'Home', 8 | 'examples' => 'Examples', 9 | 'docs' => 'Docs', 10 | //'themes' => 'Themes', 11 | 'download' => 'Download', 12 | //'https://github.com/oakmac/autocompletejs' => 'GitHub', 13 | ); 14 | 15 | $html = '
'."\n"; 16 | $html .= '
'."\n"; 17 | $html .= ''."\n"; 20 | $html .= '
    '."\n"; 21 | foreach ($tabs as $link => $name) { 22 | $html .= '
  • '."\n"; 23 | if ($active_tab === $name) { 24 | $html .= '
  • '.$name.'
  • '."\n"; 25 | } 26 | else { 27 | $html .= '
  • '.$name.'
  • '."\n"; 28 | } 29 | } 30 | $html .= '
  • '."\n"; 31 | $html .= '
'."\n"; 32 | $html .= '
'."\n"; 33 | $html .= '
'."\n"; 34 | 35 | return $html; 36 | } 37 | 38 | // returns an array of all the examples 39 | public static function getExamples() { 40 | $examples = self::getJSON('examples.json'); 41 | $examples2 = array(); 42 | for ($i = 0; $i < count($examples); $i++) { 43 | if (is_array($examples[$i]) !== true) continue; 44 | 45 | $example = $examples[$i]; 46 | $example['html'] = trim(file_get_contents(APP_PATH.'examples/'.$example['number'].'.html')); 47 | $example['js'] = trim(file_get_contents(APP_PATH.'examples/'.$example['number'].'.js')); 48 | array_push($examples2, $example); 49 | } 50 | return $examples2; 51 | } 52 | 53 | // get the html and js file for an example 54 | // returns false if the example does not exist 55 | public static function getExample($number) { 56 | // example should be an integer 57 | $number = (int) $number; 58 | 59 | if (file_exists(APP_PATH.'examples/'.$number.'.html') !== true) { 60 | return false; 61 | } 62 | 63 | return array( 64 | 'html' => trim(file_get_contents(APP_PATH.'examples/'.$number.'.html')), 65 | 'js' => trim(file_get_contents(APP_PATH.'examples/'.$number.'.js')), 66 | 'number' => $number, 67 | ); 68 | } 69 | 70 | public static function getDocs() { 71 | $docs = self::getJSON('docs.json'); 72 | 73 | // strip the "----------------" comments 74 | foreach ($docs as $key => $value) { 75 | $arr = array(); 76 | for ($i = 0; $i < count($value); $i++) { 77 | if (is_array($value[$i]) !== true) continue; 78 | array_push($arr, $value[$i]); 79 | } 80 | $docs[$key] = $arr; 81 | } 82 | 83 | return $docs; 84 | } 85 | 86 | public static function getReleases() { 87 | $releases = self::getJSON('releases.json'); 88 | 89 | 90 | $releases2 = array(); 91 | foreach ($releases as $release) { 92 | // strip the "----------------" comments 93 | if (is_array($release) !== true) continue; 94 | 95 | // ignore unreleased versions 96 | if (array_key_exists('released', $release) === true && 97 | $release['released'] === false) { 98 | continue; 99 | } 100 | 101 | array_push($releases2, $release); 102 | } 103 | 104 | return $releases2; 105 | } 106 | 107 | //--------------------------------------------------- 108 | // Private Functions 109 | //--------------------------------------------------- 110 | 111 | // this is mostly for my sanity when I'm editing the JSON and forget a comma 112 | private static function getJSON($filename) { 113 | $data = json_decode(file_get_contents(APP_PATH.'/data/'.$filename), true); 114 | if (is_array($data) !== true) { 115 | echo $filename.' is not valid JSON'; 116 | die; 117 | } 118 | return $data; 119 | } 120 | 121 | } // end class AC 122 | 123 | ?> -------------------------------------------------------------------------------- /www/api/birds.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/buggy.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/cities.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/countries.json: -------------------------------------------------------------------------------- 1 | { 2 | "AD":"Andorra", 3 | "AE":"United Arab Emirates", 4 | "AF":"Afghanistan", 5 | "AG":"Antigua and Barbuda", 6 | "AI":"Anguilla", 7 | "AL":"Albania", 8 | "AM":"Armenia", 9 | "AN":"Netherlands Antilles", 10 | "AO":"Angola", 11 | "AQ":"Antarctica", 12 | "AR":"Argentina", 13 | "AS":"American Samoa", 14 | "AT":"Austria", 15 | "AU":"Australia", 16 | "AW":"Aruba", 17 | "AX":"Åland Islands", 18 | "AZ":"Azerbaijan", 19 | "BA":"Bosnia and Herzegovina", 20 | "BB":"Barbados", 21 | "BD":"Bangladesh", 22 | "BE":"Belgium", 23 | "BF":"Burkina Faso", 24 | "BG":"Bulgaria", 25 | "BH":"Bahrain", 26 | "BI":"Burundi", 27 | "BJ":"Benin", 28 | "BL":"Saint Barthélemy", 29 | "BM":"Bermuda", 30 | "BN":"Brunei", 31 | "BO":"Bolivia", 32 | "BQ":"British Antarctic Territory", 33 | "BR":"Brazil", 34 | "BS":"Bahamas", 35 | "BT":"Bhutan", 36 | "BV":"Bouvet Island", 37 | "BW":"Botswana", 38 | "BY":"Belarus", 39 | "BZ":"Belize", 40 | "CA":"Canada", 41 | "CC":"Cocos [Keeling] Islands", 42 | "CD":"Congo - Kinshasa", 43 | "CF":"Central African Republic", 44 | "CG":"Congo - Brazzaville", 45 | "CH":"Switzerland", 46 | "CI":"Côte d’Ivoire", 47 | "CK":"Cook Islands", 48 | "CL":"Chile", 49 | "CM":"Cameroon", 50 | "CN":"China", 51 | "CO":"Colombia", 52 | "CR":"Costa Rica", 53 | "CS":"Serbia and Montenegro", 54 | "CT":"Canton and Enderbury Islands", 55 | "CU":"Cuba", 56 | "CV":"Cape Verde", 57 | "CX":"Christmas Island", 58 | "CY":"Cyprus", 59 | "CZ":"Czech Republic", 60 | "DD":"East Germany", 61 | "DE":"Germany", 62 | "DJ":"Djibouti", 63 | "DK":"Denmark", 64 | "DM":"Dominica", 65 | "DO":"Dominican Republic", 66 | "DZ":"Algeria", 67 | "EC":"Ecuador", 68 | "EE":"Estonia", 69 | "EG":"Egypt", 70 | "EH":"Western Sahara", 71 | "ER":"Eritrea", 72 | "ES":"Spain", 73 | "ET":"Ethiopia", 74 | "FI":"Finland", 75 | "FJ":"Fiji", 76 | "FK":"Falkland Islands", 77 | "FM":"Micronesia", 78 | "FO":"Faroe Islands", 79 | "FQ":"French Southern and Antarctic Territories", 80 | "FR":"France", 81 | "FX":"Metropolitan France", 82 | "GA":"Gabon", 83 | "GB":"United Kingdom", 84 | "GD":"Grenada", 85 | "GE":"Georgia", 86 | "GF":"French Guiana", 87 | "GG":"Guernsey", 88 | "GH":"Ghana", 89 | "GI":"Gibraltar", 90 | "GL":"Greenland", 91 | "GM":"Gambia", 92 | "GN":"Guinea", 93 | "GP":"Guadeloupe", 94 | "GQ":"Equatorial Guinea", 95 | "GR":"Greece", 96 | "GS":"South Georgia and the South Sandwich Islands", 97 | "GT":"Guatemala", 98 | "GU":"Guam", 99 | "GW":"Guinea-Bissau", 100 | "GY":"Guyana", 101 | "HK":"Hong Kong SAR China", 102 | "HM":"Heard Island and McDonald Islands", 103 | "HN":"Honduras", 104 | "HR":"Croatia", 105 | "HT":"Haiti", 106 | "HU":"Hungary", 107 | "ID":"Indonesia", 108 | "IE":"Ireland", 109 | "IL":"Israel", 110 | "IM":"Isle of Man", 111 | "IN":"India", 112 | "IO":"British Indian Ocean Territory", 113 | "IQ":"Iraq", 114 | "IR":"Iran", 115 | "IS":"Iceland", 116 | "IT":"Italy", 117 | "JE":"Jersey", 118 | "JM":"Jamaica", 119 | "JO":"Jordan", 120 | "JP":"Japan", 121 | "JT":"Johnston Island", 122 | "KE":"Kenya", 123 | "KG":"Kyrgyzstan", 124 | "KH":"Cambodia", 125 | "KI":"Kiribati", 126 | "KM":"Comoros", 127 | "KN":"Saint Kitts and Nevis", 128 | "KP":"North Korea", 129 | "KR":"South Korea", 130 | "KW":"Kuwait", 131 | "KY":"Cayman Islands", 132 | "KZ":"Kazakhstan", 133 | "LA":"Laos", 134 | "LB":"Lebanon", 135 | "LC":"Saint Lucia", 136 | "LI":"Liechtenstein", 137 | "LK":"Sri Lanka", 138 | "LR":"Liberia", 139 | "LS":"Lesotho", 140 | "LT":"Lithuania", 141 | "LU":"Luxembourg", 142 | "LV":"Latvia", 143 | "LY":"Libya", 144 | "MA":"Morocco", 145 | "MC":"Monaco", 146 | "MD":"Moldova", 147 | "ME":"Montenegro", 148 | "MF":"Saint Martin", 149 | "MG":"Madagascar", 150 | "MH":"Marshall Islands", 151 | "MI":"Midway Islands", 152 | "MK":"Macedonia", 153 | "ML":"Mali", 154 | "MM":"Myanmar [Burma]", 155 | "MN":"Mongolia", 156 | "MO":"Macau SAR China", 157 | "MP":"Northern Mariana Islands", 158 | "MQ":"Martinique", 159 | "MR":"Mauritania", 160 | "MS":"Montserrat", 161 | "MT":"Malta", 162 | "MU":"Mauritius", 163 | "MV":"Maldives", 164 | "MW":"Malawi", 165 | "MX":"Mexico", 166 | "MY":"Malaysia", 167 | "MZ":"Mozambique", 168 | "NA":"Namibia", 169 | "NC":"New Caledonia", 170 | "NE":"Niger", 171 | "NF":"Norfolk Island", 172 | "NG":"Nigeria", 173 | "NI":"Nicaragua", 174 | "NL":"Netherlands", 175 | "NO":"Norway", 176 | "NP":"Nepal", 177 | "NQ":"Dronning Maud Land", 178 | "NR":"Nauru", 179 | "NT":"Neutral Zone", 180 | "NU":"Niue", 181 | "NZ":"New Zealand", 182 | "OM":"Oman", 183 | "PA":"Panama", 184 | "PC":"Pacific Islands Trust Territory", 185 | "PE":"Peru", 186 | "PF":"French Polynesia", 187 | "PG":"Papua New Guinea", 188 | "PH":"Philippines", 189 | "PK":"Pakistan", 190 | "PL":"Poland", 191 | "PM":"Saint Pierre and Miquelon", 192 | "PN":"Pitcairn Islands", 193 | "PR":"Puerto Rico", 194 | "PS":"Palestinian Territories", 195 | "PT":"Portugal", 196 | "PU":"U.S. Miscellaneous Pacific Islands", 197 | "PW":"Palau", 198 | "PY":"Paraguay", 199 | "PZ":"Panama Canal Zone", 200 | "QA":"Qatar", 201 | "RE":"Réunion", 202 | "RO":"Romania", 203 | "RS":"Serbia", 204 | "RU":"Russia", 205 | "RW":"Rwanda", 206 | "SA":"Saudi Arabia", 207 | "SB":"Solomon Islands", 208 | "SC":"Seychelles", 209 | "SD":"Sudan", 210 | "SE":"Sweden", 211 | "SG":"Singapore", 212 | "SH":"Saint Helena", 213 | "SI":"Slovenia", 214 | "SJ":"Svalbard and Jan Mayen", 215 | "SK":"Slovakia", 216 | "SL":"Sierra Leone", 217 | "SM":"San Marino", 218 | "SN":"Senegal", 219 | "SO":"Somalia", 220 | "SR":"Suriname", 221 | "ST":"São Tomé and Príncipe", 222 | "SU":"Union of Soviet Socialist Republics", 223 | "SV":"El Salvador", 224 | "SY":"Syria", 225 | "SZ":"Swaziland", 226 | "TC":"Turks and Caicos Islands", 227 | "TD":"Chad", 228 | "TF":"French Southern Territories", 229 | "TG":"Togo", 230 | "TH":"Thailand", 231 | "TJ":"Tajikistan", 232 | "TK":"Tokelau", 233 | "TL":"Timor-Leste", 234 | "TM":"Turkmenistan", 235 | "TN":"Tunisia", 236 | "TO":"Tonga", 237 | "TR":"Turkey", 238 | "TT":"Trinidad and Tobago", 239 | "TV":"Tuvalu", 240 | "TW":"Taiwan", 241 | "TZ":"Tanzania", 242 | "UA":"Ukraine", 243 | "UG":"Uganda", 244 | "UM":"U.S. Minor Outlying Islands", 245 | "US":"United States", 246 | "UY":"Uruguay", 247 | "UZ":"Uzbekistan", 248 | "VA":"Vatican City", 249 | "VC":"Saint Vincent and the Grenadines", 250 | "VD":"North Vietnam", 251 | "VE":"Venezuela", 252 | "VG":"British Virgin Islands", 253 | "VI":"U.S. Virgin Islands", 254 | "VN":"Vietnam", 255 | "VU":"Vanuatu", 256 | "WF":"Wallis and Futuna", 257 | "WK":"Wake Island", 258 | "WS":"Samoa", 259 | "YD":"People's Democratic Republic of Yemen", 260 | "YE":"Yemen", 261 | "YT":"Mayotte", 262 | "ZA":"South Africa", 263 | "ZM":"Zambia", 264 | "ZW":"Zimbabwe", 265 | "ZZ":"Unknown or Invalid Region" 266 | } -------------------------------------------------------------------------------- /www/api/countries.php: -------------------------------------------------------------------------------- 1 | $countries)); 8 | die; 9 | } 10 | 11 | $searchValue = strtolower($_GET['q']); 12 | $results = array(); 13 | foreach ($countries as $key => $value) { 14 | if (strpos(strtolower($value), $searchValue) === 0) { 15 | $results[$key] = $value; 16 | } 17 | } 18 | echo json_encode(array('countries' => $results)); 19 | die; 20 | ?> -------------------------------------------------------------------------------- /www/api/mammals.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/api/mammals.json -------------------------------------------------------------------------------- /www/api/mammals.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/reptiles.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/api/reptiles.json -------------------------------------------------------------------------------- /www/api/reptiles.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/secret_users.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/states.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/api/us_states.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Alabama", 4 | "abbr": "AL" 5 | }, 6 | { 7 | "name": "Alaska", 8 | "abbr": "AK" 9 | }, 10 | { 11 | "name": "Arizona", 12 | "abbr": "AZ" 13 | }, 14 | { 15 | "name": "Arkansas", 16 | "abbr": "AR" 17 | }, 18 | { 19 | "name": "California", 20 | "abbr": "CA" 21 | }, 22 | { 23 | "name": "Colorado", 24 | "abbr": "CO" 25 | }, 26 | { 27 | "name": "Connecticut", 28 | "abbr": "CT" 29 | }, 30 | { 31 | "name": "Delaware", 32 | "abbr": "DE" 33 | }, 34 | { 35 | "name": "Florida", 36 | "abbr": "FL" 37 | }, 38 | { 39 | "name": "Georgia", 40 | "abbr": "GA" 41 | }, 42 | { 43 | "name": "Hawaii", 44 | "abbr": "HI" 45 | }, 46 | { 47 | "name": "Idaho", 48 | "abbr": "ID" 49 | }, 50 | { 51 | "name": "Illinois", 52 | "abbr": "IL" 53 | }, 54 | { 55 | "name": "Indiana", 56 | "abbr": "IN" 57 | }, 58 | { 59 | "name": "Iowa", 60 | "abbr": "IA" 61 | }, 62 | { 63 | "name": "Kansas", 64 | "abbr": "KS" 65 | }, 66 | { 67 | "name": "Kentucky", 68 | "abbr": "KY" 69 | }, 70 | { 71 | "name": "Louisiana", 72 | "abbr": "LA" 73 | }, 74 | { 75 | "name": "Maine", 76 | "abbr": "ME" 77 | }, 78 | { 79 | "name": "Maryland", 80 | "abbr": "MD" 81 | }, 82 | { 83 | "name": "Massachusetts", 84 | "abbr": "MA" 85 | }, 86 | { 87 | "name": "Michigan", 88 | "abbr": "MI" 89 | }, 90 | { 91 | "name": "Minnesota", 92 | "abbr": "MN" 93 | }, 94 | { 95 | "name": "Mississippi", 96 | "abbr": "MS" 97 | }, 98 | { 99 | "name": "Missouri", 100 | "abbr": "MO" 101 | }, 102 | { 103 | "name": "Montana", 104 | "abbr": "MT" 105 | }, 106 | { 107 | "name": "Nebraska", 108 | "abbr": "NE" 109 | }, 110 | { 111 | "name": "Nevada", 112 | "abbr": "NV" 113 | }, 114 | { 115 | "name": "New Hampshire", 116 | "abbr": "NH" 117 | }, 118 | { 119 | "name": "New Jersey", 120 | "abbr": "NJ" 121 | }, 122 | { 123 | "name": "New Mexico", 124 | "abbr": "NM" 125 | }, 126 | { 127 | "name": "New York", 128 | "abbr": "NY" 129 | }, 130 | { 131 | "name": "North Carolina", 132 | "abbr": "NC" 133 | }, 134 | { 135 | "name": "North Dakota", 136 | "abbr": "ND" 137 | }, 138 | { 139 | "name": "Ohio", 140 | "abbr": "OH" 141 | }, 142 | { 143 | "name": "Oklahoma", 144 | "abbr": "OK" 145 | }, 146 | { 147 | "name": "Oregon", 148 | "abbr": "OR" 149 | }, 150 | { 151 | "name": "Pennsylvania", 152 | "abbr": "PA" 153 | }, 154 | { 155 | "name": "Rhode Island", 156 | "abbr": "RI" 157 | }, 158 | { 159 | "name": "South Carolina", 160 | "abbr": "SC" 161 | }, 162 | { 163 | "name": "South Dakota", 164 | "abbr": "SD" 165 | }, 166 | { 167 | "name": "Tennessee", 168 | "abbr": "TN" 169 | }, 170 | { 171 | "name": "Texas", 172 | "abbr": "TX" 173 | }, 174 | { 175 | "name": "Utah", 176 | "abbr": "UT" 177 | }, 178 | { 179 | "name": "Vermont", 180 | "abbr": "VT" 181 | }, 182 | { 183 | "name": "Virginia", 184 | "abbr": "VA" 185 | }, 186 | { 187 | "name": "Washington", 188 | "abbr": "WA" 189 | }, 190 | { 191 | "name": "West Virginia", 192 | "abbr": "WV" 193 | }, 194 | { 195 | "name": "Wisconsin", 196 | "abbr": "WI" 197 | }, 198 | { 199 | "name": "Wyoming", 200 | "abbr": "WY" 201 | } 202 | ] -------------------------------------------------------------------------------- /www/css/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * autocomplete.js $version$ 3 | * http://autocompletejs.com/ 4 | * 5 | * Copyright 2013 Chris Oakman 6 | * Released under the MIT license 7 | * http://autocompletejs.com/license 8 | * 9 | * Date: $date$ 10 | */ 11 | 12 | div.clear-53545 { 13 | clear: both; 14 | } 15 | 16 | div.autocomplete-container-7a26d { 17 | border: 2px solid #ccc; 18 | color: #333; 19 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 20 | font-size: 14px; 21 | font-style: normal; 22 | font-weight: normal; 23 | line-height: 20px; 24 | padding: 4px; 25 | -webkit-border-radius: 8px; 26 | -moz-border-radius: 8px; 27 | border-radius: 8px; 28 | } 29 | 30 | div.placeholder-d722a { 31 | color: #777; 32 | float: left; 33 | font-size: 16px; 34 | line-height: 20px; 35 | margin: 10px 0 0 0; 36 | } 37 | 38 | input.input-8f2fe { 39 | background: transparent; 40 | border: 0; 41 | -webkit-box-shadow: none; 42 | -moz-box-shadow: none; 43 | box-shadow: none; 44 | color: #000; 45 | float: left; 46 | font-size: 16px; 47 | height: 20px; 48 | line-height: 20px; 49 | margin: 10px 0; 50 | outline: none; 51 | padding: 0; 52 | vertical-align: middle; 53 | width: 120px; 54 | } 55 | 56 | div.token-group-c7334 { 57 | background: #eee; 58 | border: 1px solid #ccc; 59 | cursor: pointer; 60 | float: left; 61 | margin: 4px; 62 | padding: 4px 6px; 63 | -webkit-border-radius: 6px; 64 | -moz-border-radius: 6px; 65 | border-radius: 6px; 66 | } 67 | 68 | span.remove-token-group-53474 { 69 | font-size: 11px; 70 | margin-right: 2px; 71 | } 72 | 73 | div.selected-token-group-359b9 { 74 | background: #b0d1f9; 75 | background: -moz-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 76 | background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#d2e6fd),color-stop(100%,#b0d1f9)); 77 | background: -webkit-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 78 | background: -o-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 79 | background: -ms-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 80 | background: linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 81 | } 82 | 83 | span.token-container-75233 { 84 | margin: 0 2px; 85 | } 86 | 87 | ul.dropdown-a3d44 { 88 | background: #e3e3e3; 89 | border: 1px solid #ccc; 90 | margin: 12px 0 0 0; 91 | max-height: 300px; 92 | min-width: 140px; 93 | overflow-x: visible; 94 | overflow-y: auto; 95 | padding: 0; 96 | position: absolute; 97 | z-index: 10; 98 | } 99 | 100 | li.list-item-d13e9 { 101 | background: #f9f9f9; 102 | border-bottom: 1px solid #d8d8d8; 103 | font-size: 13px; 104 | list-style: none; 105 | margin: 0; 106 | padding: 4px; 107 | } 108 | 109 | li.option-7b59f { 110 | cursor: pointer; 111 | } 112 | 113 | li.highlighted-ea4c1 { 114 | background: #00519d; 115 | color: #fff; 116 | } 117 | 118 | li.last-option-c1e64 { 119 | border-bottom: 0; 120 | } 121 | 122 | span.children-indicator-ca540 { 123 | float: right; 124 | } -------------------------------------------------------------------------------- /www/css/datepicker.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Datepicker for Bootstrap 3 | * 4 | * Copyright 2012 Stefan Petre 5 | * Improvements by Andrew Rowls 6 | * Licensed under the Apache License v2.0 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | */ 10 | .datepicker { 11 | padding: 4px; 12 | -webkit-border-radius: 4px; 13 | -moz-border-radius: 4px; 14 | border-radius: 4px; 15 | direction: ltr; 16 | /*.dow { 17 | border-top: 1px solid #ddd !important; 18 | }*/ 19 | 20 | } 21 | .datepicker-inline { 22 | width: 220px; 23 | } 24 | .datepicker.datepicker-rtl { 25 | direction: rtl; 26 | } 27 | .datepicker.datepicker-rtl table tr td span { 28 | float: right; 29 | } 30 | .datepicker-dropdown { 31 | top: 0; 32 | left: 0; 33 | } 34 | .datepicker-dropdown:before { 35 | content: ''; 36 | display: inline-block; 37 | border-left: 7px solid transparent; 38 | border-right: 7px solid transparent; 39 | border-bottom: 7px solid #ccc; 40 | border-bottom-color: rgba(0, 0, 0, 0.2); 41 | position: absolute; 42 | top: -7px; 43 | left: 6px; 44 | } 45 | .datepicker-dropdown:after { 46 | content: ''; 47 | display: inline-block; 48 | border-left: 6px solid transparent; 49 | border-right: 6px solid transparent; 50 | border-bottom: 6px solid #ffffff; 51 | position: absolute; 52 | top: -6px; 53 | left: 7px; 54 | } 55 | .datepicker > div { 56 | display: none; 57 | } 58 | .datepicker.days div.datepicker-days { 59 | display: block; 60 | } 61 | .datepicker.months div.datepicker-months { 62 | display: block; 63 | } 64 | .datepicker.years div.datepicker-years { 65 | display: block; 66 | } 67 | .datepicker table { 68 | margin: 0; 69 | } 70 | .datepicker td, 71 | .datepicker th { 72 | text-align: center; 73 | width: 20px; 74 | height: 20px; 75 | -webkit-border-radius: 4px; 76 | -moz-border-radius: 4px; 77 | border-radius: 4px; 78 | border: none; 79 | } 80 | .table-striped .datepicker table tr td, 81 | .table-striped .datepicker table tr th { 82 | background-color: transparent; 83 | } 84 | .datepicker table tr td.day:hover { 85 | background: #eeeeee; 86 | cursor: pointer; 87 | } 88 | .datepicker table tr td.old, 89 | .datepicker table tr td.new { 90 | color: #999999; 91 | } 92 | .datepicker table tr td.disabled, 93 | .datepicker table tr td.disabled:hover { 94 | background: none; 95 | color: #999999; 96 | cursor: default; 97 | } 98 | .datepicker table tr td.today, 99 | .datepicker table tr td.today:hover, 100 | .datepicker table tr td.today.disabled, 101 | .datepicker table tr td.today.disabled:hover { 102 | background-color: #fde19a; 103 | background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a); 104 | background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); 105 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); 106 | background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); 107 | background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); 108 | background-image: linear-gradient(top, #fdd49a, #fdf59a); 109 | background-repeat: repeat-x; 110 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); 111 | border-color: #fdf59a #fdf59a #fbed50; 112 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 113 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 114 | color: #000 !important; 115 | } 116 | .datepicker table tr td.today:hover, 117 | .datepicker table tr td.today:hover:hover, 118 | .datepicker table tr td.today.disabled:hover, 119 | .datepicker table tr td.today.disabled:hover:hover, 120 | .datepicker table tr td.today:active, 121 | .datepicker table tr td.today:hover:active, 122 | .datepicker table tr td.today.disabled:active, 123 | .datepicker table tr td.today.disabled:hover:active, 124 | .datepicker table tr td.today.active, 125 | .datepicker table tr td.today:hover.active, 126 | .datepicker table tr td.today.disabled.active, 127 | .datepicker table tr td.today.disabled:hover.active, 128 | .datepicker table tr td.today.disabled, 129 | .datepicker table tr td.today:hover.disabled, 130 | .datepicker table tr td.today.disabled.disabled, 131 | .datepicker table tr td.today.disabled:hover.disabled, 132 | .datepicker table tr td.today[disabled], 133 | .datepicker table tr td.today:hover[disabled], 134 | .datepicker table tr td.today.disabled[disabled], 135 | .datepicker table tr td.today.disabled:hover[disabled] { 136 | background-color: #fdf59a; 137 | } 138 | .datepicker table tr td.today:active, 139 | .datepicker table tr td.today:hover:active, 140 | .datepicker table tr td.today.disabled:active, 141 | .datepicker table tr td.today.disabled:hover:active, 142 | .datepicker table tr td.today.active, 143 | .datepicker table tr td.today:hover.active, 144 | .datepicker table tr td.today.disabled.active, 145 | .datepicker table tr td.today.disabled:hover.active { 146 | background-color: #fbf069 \9; 147 | } 148 | .datepicker table tr td.active, 149 | .datepicker table tr td.active:hover, 150 | .datepicker table tr td.active.disabled, 151 | .datepicker table tr td.active.disabled:hover { 152 | background-color: #006dcc; 153 | background-image: -moz-linear-gradient(top, #0088cc, #0044cc); 154 | background-image: -ms-linear-gradient(top, #0088cc, #0044cc); 155 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); 156 | background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); 157 | background-image: -o-linear-gradient(top, #0088cc, #0044cc); 158 | background-image: linear-gradient(top, #0088cc, #0044cc); 159 | background-repeat: repeat-x; 160 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); 161 | border-color: #0044cc #0044cc #002a80; 162 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 163 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 164 | color: #fff; 165 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 166 | } 167 | .datepicker table tr td.active:hover, 168 | .datepicker table tr td.active:hover:hover, 169 | .datepicker table tr td.active.disabled:hover, 170 | .datepicker table tr td.active.disabled:hover:hover, 171 | .datepicker table tr td.active:active, 172 | .datepicker table tr td.active:hover:active, 173 | .datepicker table tr td.active.disabled:active, 174 | .datepicker table tr td.active.disabled:hover:active, 175 | .datepicker table tr td.active.active, 176 | .datepicker table tr td.active:hover.active, 177 | .datepicker table tr td.active.disabled.active, 178 | .datepicker table tr td.active.disabled:hover.active, 179 | .datepicker table tr td.active.disabled, 180 | .datepicker table tr td.active:hover.disabled, 181 | .datepicker table tr td.active.disabled.disabled, 182 | .datepicker table tr td.active.disabled:hover.disabled, 183 | .datepicker table tr td.active[disabled], 184 | .datepicker table tr td.active:hover[disabled], 185 | .datepicker table tr td.active.disabled[disabled], 186 | .datepicker table tr td.active.disabled:hover[disabled] { 187 | background-color: #0044cc; 188 | } 189 | .datepicker table tr td.active:active, 190 | .datepicker table tr td.active:hover:active, 191 | .datepicker table tr td.active.disabled:active, 192 | .datepicker table tr td.active.disabled:hover:active, 193 | .datepicker table tr td.active.active, 194 | .datepicker table tr td.active:hover.active, 195 | .datepicker table tr td.active.disabled.active, 196 | .datepicker table tr td.active.disabled:hover.active { 197 | background-color: #003399 \9; 198 | } 199 | .datepicker table tr td span { 200 | display: block; 201 | width: 23%; 202 | height: 54px; 203 | line-height: 54px; 204 | float: left; 205 | margin: 1%; 206 | cursor: pointer; 207 | -webkit-border-radius: 4px; 208 | -moz-border-radius: 4px; 209 | border-radius: 4px; 210 | } 211 | .datepicker table tr td span:hover { 212 | background: #eeeeee; 213 | } 214 | .datepicker table tr td span.disabled, 215 | .datepicker table tr td span.disabled:hover { 216 | background: none; 217 | color: #999999; 218 | cursor: default; 219 | } 220 | .datepicker table tr td span.active, 221 | .datepicker table tr td span.active:hover, 222 | .datepicker table tr td span.active.disabled, 223 | .datepicker table tr td span.active.disabled:hover { 224 | background-color: #006dcc; 225 | background-image: -moz-linear-gradient(top, #0088cc, #0044cc); 226 | background-image: -ms-linear-gradient(top, #0088cc, #0044cc); 227 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); 228 | background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); 229 | background-image: -o-linear-gradient(top, #0088cc, #0044cc); 230 | background-image: linear-gradient(top, #0088cc, #0044cc); 231 | background-repeat: repeat-x; 232 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); 233 | border-color: #0044cc #0044cc #002a80; 234 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 235 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 236 | color: #fff; 237 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 238 | } 239 | .datepicker table tr td span.active:hover, 240 | .datepicker table tr td span.active:hover:hover, 241 | .datepicker table tr td span.active.disabled:hover, 242 | .datepicker table tr td span.active.disabled:hover:hover, 243 | .datepicker table tr td span.active:active, 244 | .datepicker table tr td span.active:hover:active, 245 | .datepicker table tr td span.active.disabled:active, 246 | .datepicker table tr td span.active.disabled:hover:active, 247 | .datepicker table tr td span.active.active, 248 | .datepicker table tr td span.active:hover.active, 249 | .datepicker table tr td span.active.disabled.active, 250 | .datepicker table tr td span.active.disabled:hover.active, 251 | .datepicker table tr td span.active.disabled, 252 | .datepicker table tr td span.active:hover.disabled, 253 | .datepicker table tr td span.active.disabled.disabled, 254 | .datepicker table tr td span.active.disabled:hover.disabled, 255 | .datepicker table tr td span.active[disabled], 256 | .datepicker table tr td span.active:hover[disabled], 257 | .datepicker table tr td span.active.disabled[disabled], 258 | .datepicker table tr td span.active.disabled:hover[disabled] { 259 | background-color: #0044cc; 260 | } 261 | .datepicker table tr td span.active:active, 262 | .datepicker table tr td span.active:hover:active, 263 | .datepicker table tr td span.active.disabled:active, 264 | .datepicker table tr td span.active.disabled:hover:active, 265 | .datepicker table tr td span.active.active, 266 | .datepicker table tr td span.active:hover.active, 267 | .datepicker table tr td span.active.disabled.active, 268 | .datepicker table tr td span.active.disabled:hover.active { 269 | background-color: #003399 \9; 270 | } 271 | .datepicker table tr td span.old { 272 | color: #999999; 273 | } 274 | .datepicker th.switch { 275 | width: 145px; 276 | } 277 | .datepicker thead tr:first-child th, 278 | .datepicker tfoot tr:first-child th { 279 | cursor: pointer; 280 | } 281 | .datepicker thead tr:first-child th:hover, 282 | .datepicker tfoot tr:first-child th:hover { 283 | background: #eeeeee; 284 | } 285 | .datepicker .cw { 286 | font-size: 10px; 287 | width: 12px; 288 | padding: 0 2px 0 5px; 289 | vertical-align: middle; 290 | } 291 | .datepicker thead tr:first-child th.cw { 292 | cursor: default; 293 | background-color: transparent; 294 | } 295 | .input-append.date .add-on i, 296 | .input-prepend.date .add-on i { 297 | display: block; 298 | cursor: pointer; 299 | width: 16px; 300 | height: 16px; 301 | } -------------------------------------------------------------------------------- /www/css/prettify.less: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #c5c8c6; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #b5bd68; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #b294bb; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #969896; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #81a2be; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #de935f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #c5c8c6; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #c5c8c6; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #c5c8c6; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #cc6666; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #de935f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #8abeb7; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #de935f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #cc6666; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #81a2be; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | pre.prettyprint { 99 | background: #1d1f21; 100 | font-family: Menlo, Monaco, Consolas, monospace; 101 | font-size: 12px; 102 | line-height: 1.5; 103 | border: 1px solid #ccc; 104 | padding: 10px; } 105 | 106 | /* Specify class=linenums on a pre to get line numbering */ 107 | ol.linenums { 108 | margin-top: 0; 109 | margin-bottom: 0; } 110 | 111 | /* IE indents via margin-left */ 112 | li.L0, 113 | li.L1, 114 | li.L2, 115 | li.L3, 116 | li.L4, 117 | li.L5, 118 | li.L6, 119 | li.L7, 120 | li.L8, 121 | li.L9 { 122 | /* */ } 123 | 124 | /* Alternate shading for lines */ 125 | li.L1, 126 | li.L3, 127 | li.L5, 128 | li.L7, 129 | li.L9 { 130 | /* */ } -------------------------------------------------------------------------------- /www/css/site.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #c5c8c6; 3 | } 4 | @media screen { 5 | .str { 6 | color: #b5bd68; 7 | } 8 | .kwd { 9 | color: #b294bb; 10 | } 11 | .com { 12 | color: #969896; 13 | } 14 | .typ { 15 | color: #81a2be; 16 | } 17 | .lit { 18 | color: #de935f; 19 | } 20 | .pun { 21 | color: #c5c8c6; 22 | } 23 | .opn { 24 | color: #c5c8c6; 25 | } 26 | .clo { 27 | color: #c5c8c6; 28 | } 29 | .tag { 30 | color: #cc6666; 31 | } 32 | .atn { 33 | color: #de935f; 34 | } 35 | .atv { 36 | color: #8abeb7; 37 | } 38 | .dec { 39 | color: #de935f; 40 | } 41 | .var { 42 | color: #cc6666; 43 | } 44 | .fun { 45 | color: #81a2be; 46 | } 47 | } 48 | @media print,projection { 49 | .str { 50 | color: #060; 51 | } 52 | .kwd { 53 | color: #006; 54 | font-weight: bold; 55 | } 56 | .com { 57 | color: #600; 58 | font-style: italic; 59 | } 60 | .typ { 61 | color: #404; 62 | font-weight: bold; 63 | } 64 | .lit { 65 | color: #044; 66 | } 67 | .pun, 68 | .opn, 69 | .clo { 70 | color: #440; 71 | } 72 | .tag { 73 | color: #006; 74 | font-weight: bold; 75 | } 76 | .atn { 77 | color: #404; 78 | } 79 | .atv { 80 | color: #060; 81 | } 82 | } 83 | pre.prettyprint { 84 | background: #1d1f21; 85 | font-family: Menlo, Monaco, Consolas, monospace; 86 | font-size: 12px; 87 | line-height: 1.5; 88 | border: 1px solid #ccc; 89 | padding: 10px; 90 | } 91 | ol.linenums { 92 | margin-top: 0; 93 | margin-bottom: 0; 94 | } 95 | html { 96 | background: #333; 97 | } 98 | body { 99 | background: url('../img/satinweave.png') repeat; 100 | } 101 | div#body_container { 102 | min-height: 700px; 103 | padding: 30px 0px; 104 | } 105 | div#footer { 106 | background: #333; 107 | color: #999; 108 | padding: 18px 0px; 109 | } 110 | div#footer div.row { 111 | background: #333; 112 | } 113 | div#footer a { 114 | color: #fff; 115 | } 116 | div#footer p { 117 | font-size: 12px; 118 | margin-bottom: 0px; 119 | } 120 | div#left_footer a { 121 | text-decoration: underline; 122 | } 123 | div#left_footer a:hover { 124 | text-decoration: none; 125 | } 126 | div#right_footer { 127 | text-align: right; 128 | } 129 | div#right_footer a { 130 | color: #fff; 131 | font-size: 12px; 132 | padding: 0px 8px; 133 | text-decoration: none; 134 | } 135 | div#right_footer a:hover { 136 | text-decoration: underline; 137 | } 138 | div.row { 139 | background: #fff; 140 | } 141 | h1, 142 | h2, 143 | h3, 144 | h4, 145 | h5, 146 | h6 { 147 | font-family: 'Open Sans', sans-serif; 148 | } 149 | div.top-bar li a { 150 | color: #fff; 151 | display: block; 152 | font-family: 'Open Sans'; 153 | font-weight: normal !important; 154 | font-size: 13px; 155 | height: 45px; 156 | line-height: 45px; 157 | padding: 0 15px; 158 | text-decoration: none; 159 | } 160 | div.top-bar li.name a { 161 | font-weight: bold !important; 162 | } 163 | div.top-bar li.active, 164 | div.top-bar li:hover { 165 | background: #000; 166 | } 167 | div.top-bar li.active a, 168 | div.top-bar li a:hover { 169 | color: #d9d9d9; 170 | } 171 | small { 172 | font-size: 80%; 173 | } 174 | input.demo-btn { 175 | margin-top: 15px; 176 | } 177 | div.section { 178 | padding: 0px 0px 15px 0px; 179 | } 180 | input#runAgainBtn { 181 | margin-top: 12px; 182 | } 183 | h2#example_name { 184 | margin-top: 0px; 185 | } 186 | div#examples_list_container h4 { 187 | background: #f2f2f2; 188 | border-top: 1px solid #e6e6e6; 189 | border-right: 1px solid #e6e6e6; 190 | border-left: 3px solid #ccc; 191 | color: #555; 192 | cursor: pointer; 193 | font-size: 14px; 194 | font-weight: normal; 195 | margin: 0px; 196 | padding: 15px 20px; 197 | } 198 | div#examples_list_container h4.active { 199 | background: #4d4d4d; 200 | border-top: 1px solid #1a1a1a; 201 | border-right: 1px solid #1a1a1a; 202 | border-left: 4px solid #1a1a1a; 203 | color: #fff; 204 | font-weight: bold; 205 | } 206 | div#examples_list_container ul { 207 | border-left: 3px solid #eee; 208 | border-right: 1px solid #eee; 209 | margin-bottom: 0px; 210 | padding: 10px 0px; 211 | } 212 | div#examples_list_container li { 213 | color: #666; 214 | cursor: pointer; 215 | list-style: none; 216 | padding: 5px 0px 5px 20px; 217 | } 218 | div#examples_list_container li:hover { 219 | color: #222; 220 | } 221 | div#examples_list_container li.active { 222 | color: #222; 223 | font-weight: bold; 224 | } 225 | div#example_html_container { 226 | margin-bottom: 40px; 227 | } 228 | div#example_js_container pre { 229 | overflow-x: hidden; 230 | } 231 | div.etymology { 232 | margin: 30px 0px; 233 | } 234 | div.word { 235 | font-size: 26px; 236 | margin-bottom: 20px; 237 | } 238 | div.part-of-speech { 239 | color: #878787; 240 | margin-bottom: 6px; 241 | } 242 | div.definition { 243 | font-style: italic; 244 | } 245 | div.example { 246 | padding: 40px 0px; 247 | margin-bottom: 300px; 248 | } 249 | code { 250 | background: none; 251 | color: #000; 252 | font-family: 'Droid Sans Mono', 'Courier New', monospace; 253 | font-size: 13px; 254 | font-weight: normal; 255 | } 256 | code.plain { 257 | color: #d94d3a; 258 | } 259 | code.html, 260 | code.keyword { 261 | color: #0066cc; 262 | } 263 | code.string { 264 | color: blue; 265 | } 266 | code.number { 267 | color: #7f0000; 268 | } 269 | pre { 270 | font-size: 14px; 271 | } 272 | a { 273 | text-decoration: underline; 274 | } 275 | td.center { 276 | text-align: center; 277 | } 278 | hr.divider { 279 | margin: 80px 0px; 280 | } 281 | div.release li { 282 | list-style: none; 283 | } 284 | ul.disc li { 285 | list-style: disc; 286 | } 287 | table#markup_example_tbl { 288 | width: 100%; 289 | margin-bottom: 400px; 290 | border: 0px; 291 | } 292 | table#markup_example_tbl tr { 293 | background: #fff; 294 | } 295 | table#markup_example_tbl td { 296 | width: 50%; 297 | padding: 20px; 298 | padding-bottom: 250px; 299 | } 300 | -------------------------------------------------------------------------------- /www/css/site.less: -------------------------------------------------------------------------------- 1 | @import "prettify.less"; 2 | 3 | html { 4 | background: #333; 5 | } 6 | 7 | body { 8 | background: url('../img/satinweave.png') repeat; 9 | } 10 | 11 | div#body_container { 12 | min-height: 700px; 13 | padding: 30px 0px; 14 | } 15 | 16 | div#footer { 17 | background: #333; 18 | color: #999; 19 | padding: 18px 0px; 20 | 21 | div.row { 22 | background: #333; 23 | } 24 | a { 25 | color: #fff; 26 | } 27 | p { 28 | font-size: 12px; 29 | margin-bottom: 0px; 30 | } 31 | } 32 | div#left_footer { 33 | a { 34 | text-decoration: underline; 35 | } 36 | a:hover { 37 | text-decoration: none; 38 | } 39 | } 40 | 41 | div#right_footer { 42 | text-align: right; 43 | 44 | a { 45 | color: #fff; 46 | font-size: 12px; 47 | padding: 0px 8px; 48 | text-decoration: none; 49 | } 50 | a:hover { 51 | text-decoration: underline; 52 | } 53 | } 54 | 55 | div.row { 56 | background: #fff; 57 | } 58 | 59 | h1,h2,h3,h4,h5,h6 { 60 | font-family: 'Open Sans', sans-serif; 61 | } 62 | 63 | div.top-bar { 64 | li a { 65 | color: #fff; 66 | display: block; 67 | font-family: 'Open Sans'; 68 | font-weight: normal !important; 69 | font-size: 13px; 70 | height: 45px; 71 | line-height: 45px; 72 | padding: 0 15px; 73 | text-decoration: none; 74 | } 75 | 76 | li.name a { 77 | font-weight: bold !important; 78 | } 79 | li.active, li:hover { 80 | background: #000; 81 | } 82 | li.active a, li a:hover { 83 | color: #d9d9d9; 84 | } 85 | } 86 | 87 | small { 88 | font-size: 80%; 89 | } 90 | 91 | input.demo-btn { 92 | margin-top: 15px; 93 | } 94 | 95 | //------------------------------------------------------ 96 | // Homepage 97 | //------------------------------------------------------ 98 | div.section { 99 | padding: 0px 0px 15px 0px; 100 | } 101 | 102 | input#runAgainBtn { 103 | margin-top: 12px; 104 | } 105 | 106 | //------------------------------------------------------ 107 | // Examples 108 | //------------------------------------------------------ 109 | h2#example_name { 110 | margin-top: 0px; 111 | } 112 | 113 | div#examples_list_container { 114 | h4 { 115 | background: #f2f2f2; 116 | border-top: 1px solid #e6e6e6; 117 | border-right: 1px solid #e6e6e6; 118 | border-left: 3px solid #ccc; 119 | color: #555; 120 | cursor: pointer; 121 | font-size: 14px; 122 | font-weight: normal; 123 | margin: 0px; 124 | padding: 15px 20px; 125 | } 126 | h4.active { 127 | background: #4d4d4d; 128 | border-top: 1px solid #1a1a1a; 129 | border-right: 1px solid #1a1a1a; 130 | border-left: 4px solid #1a1a1a; 131 | color: #fff; 132 | font-weight: bold; 133 | } 134 | ul { 135 | border-left: 3px solid #eee; 136 | border-right: 1px solid #eee; 137 | margin-bottom: 0px; 138 | padding: 10px 0px; 139 | } 140 | li { 141 | color: #666; 142 | cursor: pointer; 143 | list-style: none; 144 | padding: 5px 0px 5px 20px; 145 | } 146 | li:hover { 147 | color: #222; 148 | } 149 | li.active { 150 | color: #222; 151 | font-weight: bold; 152 | } 153 | } 154 | div#example_html_container { 155 | margin-bottom: 40px; 156 | } 157 | div#example_js_container pre { 158 | overflow-x: hidden; 159 | } 160 | 161 | //------------------------------------------------------ 162 | // Docs 163 | //------------------------------------------------------ 164 | div.etymology { 165 | margin: 30px 0px; 166 | } 167 | div.word { 168 | font-size: 26px; 169 | margin-bottom: 20px; 170 | } 171 | div.part-of-speech { 172 | color: #878787; 173 | margin-bottom: 6px; 174 | } 175 | div.definition { 176 | font-style: italic; 177 | } 178 | div.example { 179 | padding: 40px 0px; 180 | margin-bottom: 300px; 181 | } 182 | 183 | code { 184 | background: none; 185 | color: #000; 186 | font-family: 'Droid Sans Mono', 'Courier New', monospace; 187 | font-size: 13px; 188 | font-weight: normal; 189 | } 190 | code.plain { 191 | color: #d94d3a; 192 | } 193 | code.html, code.keyword { 194 | color: #0066cc; 195 | } 196 | code.string { 197 | color: blue; 198 | } 199 | code.number { 200 | color: #7f0000; 201 | } 202 | 203 | pre { 204 | font-size: 14px; 205 | } 206 | 207 | a { 208 | text-decoration: underline; 209 | } 210 | 211 | td.center { 212 | text-align: center; 213 | } 214 | 215 | hr.divider { 216 | margin: 80px 0px; 217 | } 218 | 219 | //------------------------------------------------------ 220 | // Download 221 | //------------------------------------------------------ 222 | div.release li { 223 | list-style: none; 224 | } 225 | ul.disc li { 226 | list-style: disc; 227 | } 228 | 229 | //------------------------------------------------------ 230 | // Markup 231 | //------------------------------------------------------ 232 | table#markup_example_tbl { 233 | width: 100%; 234 | margin-bottom: 400px; 235 | border: 0px; 236 | 237 | tr { 238 | background: #fff; 239 | } 240 | td { 241 | width: 50%; 242 | padding: 20px; 243 | padding-bottom: 250px; 244 | } 245 | } -------------------------------------------------------------------------------- /www/example.config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/example.htaccess: -------------------------------------------------------------------------------- 1 | # Turn on URL rewriting 2 | RewriteEngine On 3 | 4 | # disable any 'www' nonsense 5 | #RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] 6 | #RewriteRule ^(.*) http://%1/$1 [R=301,L] 7 | 8 | # Installation directory 9 | RewriteBase /autocompletejs/ 10 | 11 | # Protect hidden files from being viewed 12 | 13 | Order Deny,Allow 14 | Deny From All 15 | 16 | 17 | # Allow any files or directories that exist to be displayed directly 18 | RewriteCond %{REQUEST_FILENAME} !-f 19 | #RewriteCond %{REQUEST_FILENAME} !-d 20 | 21 | # Rewrite all other URLs to index.php/URL 22 | RewriteRule .* index.php/$0 [PT] 23 | -------------------------------------------------------------------------------- /www/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /www/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /www/img/satinweave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/img/satinweave.png -------------------------------------------------------------------------------- /www/index.php: -------------------------------------------------------------------------------- 1 | 85 | -------------------------------------------------------------------------------- /www/js/jquery.color.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Color Animations v07cdc1850d 3 | * https://github.com/jquery/jquery-color 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * Date: 06 Feb 2013 10 | */ 11 | (function(g,n){function p(a,b,c){var d=t[b.type]||{};if(null==a)return c||!b.def?null:b.def;a=d.floor?~~a:parseFloat(a);return isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max6*c? 12 | a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var y=/^([\-+])=\s*(\d+\.?\d*)/,x=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16), 13 | parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],h=g.Color=function(a,b,c,d){return new g.Color.fn.parse(a,b,c,d)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0, 14 | type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},t={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},v=h.support={},w=g("

")[0],q,k=g.each;w.style.cssText="background-color:rgba(1,1,1,.5)";v.rgba=-1g.inArray(null,f[b].slice(0, 16 | 3))&&(f[b][3]=1,c.from&&(f._rgba=c.from(f[b])))}),this},is:function(a){var b=h(a),c=!0,d=this;k(l,function(a,e){var j,g=b[e.cache];g&&(j=d[e.cache]||e.to&&e.to(d._rgba)||[],k(e.props,function(a,d){if(null!=g[d.idx])return c=g[d.idx]===j[d.idx]}));return c});return c},_space:function(){var a=[],b=this;k(l,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=h(a),d=c._space(),f=l[d],e=0===this.alpha()?h("transparent"):this,j=e[f.cache]||f.to(e._rgba),g=j.slice(),c=c[f.cache]; 17 | k(f.props,function(a,d){var f=d.idx,e=j[f],h=c[f],k=t[d.type]||{};null!==h&&(null===e?g[f]=h:(k.mod&&(h-e>k.mod/2?e+=k.mod:e-h>k.mod/2&&(e-=k.mod)),g[f]=p((h-e)*b+e,d)))});return this[d](g)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=h(a)._rgba;return h(g.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=g.map(this._rgba,function(a,d){return null==a?2d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+g.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;l.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null, 19 | null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var f=Math.max(b,c,d),e=Math.min(b,c,d),j=f-e,g=f+e,h=0.5*g;return[Math.round(e===f?0:b===f?60*(c-d)/j+360:c===f?60*(d-b)/j+120:60*(b-c)/j+240)%360,0===j?0:0.5>=h?j/g:j/(2-g),h,null==a?1:a]};l.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2];a=a[3];c=0.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*r(d,c,b+1/3)),Math.round(255*r(d,c,b)),Math.round(255*r(d,c,b-1/3)),a]}; 20 | k(l,function(a,b){var c=b.props,d=b.cache,f=b.to,e=b.from;h.fn[a]=function(a){f&&!this[d]&&(this[d]=f(this._rgba));if(a===n)return this[d].slice();var b,s=g.type(a),l="array"===s||"object"===s?a:arguments,m=this[d].slice();k(c,function(a,d){var b=l["object"===s?a:d.idx];null==b&&(b=m[d.idx]);m[d.idx]=p(b,d)});return e?(b=h(e(m)),b[d]=m,b):h(m)};k(c,function(d,b){h.fn[d]||(h.fn[d]=function(c){var e=g.type(c),f="alpha"===d?this._hsla?"hsla":"rgba":a,h=this[f](),k=h[b.idx];if("undefined"===e)return k; 21 | "function"===e&&(c=c.call(this,k),e=g.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=y.exec(c))&&(c=k+parseFloat(e[2])*("+"===e[1]?1:-1));h[b.idx]=c;return this[f](h)})})});h.hook=function(a){a=a.split(" ");k(a,function(a,c){g.cssHooks[c]={set:function(a,b){var e,j="";if("transparent"!==b&&("string"!==g.type(b)||(e=u(b)))){b=h(e||b);if(!v.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===j||"transparent"===j)&&e&&e.style;)try{j=g.css(e,"backgroundColor"),e=e.parentNode}catch(k){}b= 22 | b.blend(j&&"transparent"!==j?j:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(l){}}};g.fx.step[c]=function(a){a.colorInit||(a.start=h(a.elem,c),a.end=h(a.end),a.colorInit=!0);g.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");g.cssHooks.borderColor={expand:function(a){var b={};k(["Top","Right","Bottom","Left"],function(c, 23 | d){b["border"+d+"Color"]=a});return b}};q=g.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery); -------------------------------------------------------------------------------- /www/js/json3.min.js: -------------------------------------------------------------------------------- 1 | /*! JSON v3.2.4 | http://bestiejs.github.com/json3 | Copyright 2012, Kit Cambridge | http://kit.mit-license.org */ 2 | ;(function(){var e=void 0,i=!0,k=null,l={}.toString,m,n,p="function"===typeof define&&define.c,q=!p&&"object"==typeof exports&&exports;q||p?"object"==typeof JSON&&JSON?p?q=JSON:(q.stringify=JSON.stringify,q.parse=JSON.parse):p&&(q=this.JSON={}):q=this.JSON||(this.JSON={});var r,t,u,x,z,B,C,D,E,F,G,H,I,J=new Date(-3509827334573292),K,O,P;try{J=-109252==J.getUTCFullYear()&&0===J.getUTCMonth()&&1==J.getUTCDate()&&10==J.getUTCHours()&&37==J.getUTCMinutes()&&6==J.getUTCSeconds()&&708==J.getUTCMilliseconds()}catch(Q){} 3 | function R(b){var c,a,d,j=b=="json";if(j||b=="json-stringify"||b=="json-parse"){if(b=="json-stringify"||j){if(c=typeof q.stringify=="function"&&J){(d=function(){return 1}).toJSON=d;try{c=q.stringify(0)==="0"&&q.stringify(new Number)==="0"&&q.stringify(new String)=='""'&&q.stringify(l)===e&&q.stringify(e)===e&&q.stringify()===e&&q.stringify(d)==="1"&&q.stringify([d])=="[1]"&&q.stringify([e])=="[null]"&&q.stringify(k)=="null"&&q.stringify([e,l,k])=="[null,null,null]"&&q.stringify({A:[d,i,false,k,"\x00\u0008\n\u000c\r\t"]})== 4 | '{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'&&q.stringify(k,d)==="1"&&q.stringify([1,2],k,1)=="[\n 1,\n 2\n]"&&q.stringify(new Date(-864E13))=='"-271821-04-20T00:00:00.000Z"'&&q.stringify(new Date(864E13))=='"+275760-09-13T00:00:00.000Z"'&&q.stringify(new Date(-621987552E5))=='"-000001-01-01T00:00:00.000Z"'&&q.stringify(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(f){c=false}}if(!j)return c}if(b=="json-parse"||j){if(typeof q.parse=="function")try{if(q.parse("0")===0&&!q.parse(false)){d= 5 | q.parse('{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');if(a=d.a.length==5&&d.a[0]==1){try{a=!q.parse('"\t"')}catch(o){}if(a)try{a=q.parse("01")!=1}catch(g){}}}}catch(h){a=false}if(!j)return a}return c&&a}} 6 | if(!R("json")){J||(K=Math.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(b,c){return O[c]+365*(b-1970)+K((b-1969+(c=+(c>1)))/4)-K((b-1901+c)/100)+K((b-1601+c)/400)});if(!(m={}.hasOwnProperty))m=function(b){var c={},a;if((c.__proto__=k,c.__proto__={toString:1},c).toString!=l)m=function(a){var b=this.__proto__,a=a in(this.__proto__=k,this);this.__proto__=b;return a};else{a=c.constructor;m=function(b){var c=(this.constructor||a).prototype;return b in this&&!(b in c&&this[b]===c[b])}}c= 7 | k;return m.call(this,b)};n=function(b,c){var a=0,d,j,f;(d=function(){this.valueOf=0}).prototype.valueOf=0;j=new d;for(f in j)m.call(j,f)&&a++;d=j=k;if(a)a=a==2?function(a,b){var c={},d=l.call(a)=="[object Function]",f;for(f in a)!(d&&f=="prototype")&&!m.call(c,f)&&(c[f]=1)&&m.call(a,f)&&b(f)}:function(a,b){var c=l.call(a)=="[object Function]",d,f;for(d in a)!(c&&d=="prototype")&&m.call(a,d)&&!(f=d==="constructor")&&b(d);(f||m.call(a,d="constructor"))&&b(d)};else{j=["valueOf","toString","toLocaleString", 8 | "propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];a=function(a,b){var c=l.call(a)=="[object Function]",d;for(d in a)!(c&&d=="prototype")&&m.call(a,d)&&b(d);for(c=j.length;d=j[--c];m.call(a,d)&&b(d));}}a(b,c)};R("json-stringify")||(r={"\\":"\\\\",'"':'\\"',"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},t=function(b,c){return("000000"+(c||0)).slice(-b)},u=function(b){for(var c='"',a=0,d;d=b.charAt(a);a++)c=c+('\\"\u0008\u000c\n\r\t'.indexOf(d)>-1?r[d]:r[d]=d<" "? 9 | "\\u00"+t(2,d.charCodeAt(0).toString(16)):d);return c+'"'},x=function(b,c,a,d,j,f,o){var g=c[b],h,s,v,w,L,M,N,y,A;if(typeof g=="object"&&g){h=l.call(g);if(h=="[object Date]"&&!m.call(g,"toJSON"))if(g>-1/0&&g<1/0){if(P){v=K(g/864E5);for(h=K(v/365.2425)+1970-1;P(h+1,0)<=v;h++);for(s=K((v-P(h,0))/30.42);P(h,s+1)<=v;s++);v=1+v-P(h,s);w=(g%864E5+864E5)%864E5;L=K(w/36E5)%24;M=K(w/6E4)%60;N=K(w/1E3)%60;w=w%1E3}else{h=g.getUTCFullYear();s=g.getUTCMonth();v=g.getUTCDate();L=g.getUTCHours();M=g.getUTCMinutes(); 10 | N=g.getUTCSeconds();w=g.getUTCMilliseconds()}g=(h<=0||h>=1E4?(h<0?"-":"+")+t(6,h<0?-h:h):t(4,h))+"-"+t(2,s+1)+"-"+t(2,v)+"T"+t(2,L)+":"+t(2,M)+":"+t(2,N)+"."+t(3,w)+"Z"}else g=k;else if(typeof g.toJSON=="function"&&(h!="[object Number]"&&h!="[object String]"&&h!="[object Array]"||m.call(g,"toJSON")))g=g.toJSON(b)}a&&(g=a.call(c,b,g));if(g===k)return"null";h=l.call(g);if(h=="[object Boolean]")return""+g;if(h=="[object Number]")return g>-1/0&&g<1/0?""+g:"null";if(h=="[object String]")return u(g);if(typeof g== 11 | "object"){for(b=o.length;b--;)if(o[b]===g)throw TypeError();o.push(g);y=[];c=f;f=f+j;if(h=="[object Array]"){s=0;for(b=g.length;s0){d="";for(a>10&&(a=10);d.length-1)H++;else{if("{}[]:,".indexOf(a)>-1){H++;return a}if(a=='"'){d="@";for(H++;H-1){d=d+B[a];H++}else if(a=="u"){j=++H;for(f=H+4;H="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F"||C()}d=d+z("0x"+b.slice(j,H))}else C()}else{if(a=='"')break; 14 | d=d+a;H++}}if(b.charAt(H)=='"'){H++;return d}}else{j=H;if(a=="-"){o=i;a=b.charAt(++H)}if(a>="0"&&a<="9"){for(a=="0"&&(a=b.charAt(H+1),a>="0"&&a<="9")&&C();H="0"&&a<="9");H++);if(b.charAt(H)=="."){for(f=++H;f="0"&&a<="9");f++);f==H&&C();H=f}a=b.charAt(H);if(a=="e"||a=="E"){a=b.charAt(++H);(a=="+"||a=="-")&&H++;for(f=H;f="0"&&a<="9");f++);f==H&&C();H=f}return+b.slice(j,H)}o&&C();if(b.slice(H,H+4)=="true"){H=H+4;return i}if(b.slice(H,H+5)== 15 | "false"){H=H+5;return false}if(b.slice(H,H+4)=="null"){H=H+4;return k}}C()}}return"$"},E=function(b){var c,a;b=="$"&&C();if(typeof b=="string"){if(b.charAt(0)=="@")return b.slice(1);if(b=="["){for(c=[];;a||(a=i)){b=D();if(b=="]")break;if(a)if(b==","){b=D();b=="]"&&C()}else C();b==","&&C();c.push(E(b))}return c}if(b=="{"){for(c={};;a||(a=i)){b=D();if(b=="}")break;if(a)if(b==","){b=D();b=="}"&&C()}else C();(b==","||typeof b!="string"||b.charAt(0)!="@"||D()!=":")&&C();c[b.slice(1)]=E(D())}return c}C()}return b}, 16 | G=function(b,c,a){a=F(b,c,a);a===e?delete b[c]:b[c]=a},F=function(b,c,a){var d=b[c],j;if(typeof d=="object"&&d)if(l.call(d)=="[object Array]")for(j=d.length;j--;)G(d,j,a);else n(d,function(b){G(d,b,a)});return a.call(b,c,d)},q.parse=function(b,c){var a,d;H=0;I=b;a=E(D());D()!="$"&&C();H=I=k;return c&&l.call(c)=="[object Function]"?F((d={},d[""]=a,d),"",c):a})}p&&define(function(){return q}); 17 | }()); -------------------------------------------------------------------------------- /www/js/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}pa?0:d.max6*c? 12 | a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var y=/^([\-+])=\s*(\d+\.?\d*)/,x=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16), 13 | parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],h=g.Color=function(a,b,c,d){return new g.Color.fn.parse(a,b,c,d)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0, 14 | type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},t={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},v=h.support={},w=g("

")[0],q,k=g.each;w.style.cssText="background-color:rgba(1,1,1,.5)";v.rgba=-1g.inArray(null,f[b].slice(0, 16 | 3))&&(f[b][3]=1,c.from&&(f._rgba=c.from(f[b])))}),this},is:function(a){var b=h(a),c=!0,d=this;k(l,function(a,e){var j,g=b[e.cache];g&&(j=d[e.cache]||e.to&&e.to(d._rgba)||[],k(e.props,function(a,d){if(null!=g[d.idx])return c=g[d.idx]===j[d.idx]}));return c});return c},_space:function(){var a=[],b=this;k(l,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=h(a),d=c._space(),f=l[d],e=0===this.alpha()?h("transparent"):this,j=e[f.cache]||f.to(e._rgba),g=j.slice(),c=c[f.cache]; 17 | k(f.props,function(a,d){var f=d.idx,e=j[f],h=c[f],k=t[d.type]||{};null!==h&&(null===e?g[f]=h:(k.mod&&(h-e>k.mod/2?e+=k.mod:e-h>k.mod/2&&(e-=k.mod)),g[f]=p((h-e)*b+e,d)))});return this[d](g)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=h(a)._rgba;return h(g.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=g.map(this._rgba,function(a,d){return null==a?2d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+g.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;l.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null, 19 | null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var f=Math.max(b,c,d),e=Math.min(b,c,d),j=f-e,g=f+e,h=0.5*g;return[Math.round(e===f?0:b===f?60*(c-d)/j+360:c===f?60*(d-b)/j+120:60*(b-c)/j+240)%360,0===j?0:0.5>=h?j/g:j/(2-g),h,null==a?1:a]};l.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2];a=a[3];c=0.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*r(d,c,b+1/3)),Math.round(255*r(d,c,b)),Math.round(255*r(d,c,b-1/3)),a]}; 20 | k(l,function(a,b){var c=b.props,d=b.cache,f=b.to,e=b.from;h.fn[a]=function(a){f&&!this[d]&&(this[d]=f(this._rgba));if(a===n)return this[d].slice();var b,s=g.type(a),l="array"===s||"object"===s?a:arguments,m=this[d].slice();k(c,function(a,d){var b=l["object"===s?a:d.idx];null==b&&(b=m[d.idx]);m[d.idx]=p(b,d)});return e?(b=h(e(m)),b[d]=m,b):h(m)};k(c,function(d,b){h.fn[d]||(h.fn[d]=function(c){var e=g.type(c),f="alpha"===d?this._hsla?"hsla":"rgba":a,h=this[f](),k=h[b.idx];if("undefined"===e)return k; 21 | "function"===e&&(c=c.call(this,k),e=g.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=y.exec(c))&&(c=k+parseFloat(e[2])*("+"===e[1]?1:-1));h[b.idx]=c;return this[f](h)})})});h.hook=function(a){a=a.split(" ");k(a,function(a,c){g.cssHooks[c]={set:function(a,b){var e,j="";if("transparent"!==b&&("string"!==g.type(b)||(e=u(b)))){b=h(e||b);if(!v.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===j||"transparent"===j)&&e&&e.style;)try{j=g.css(e,"backgroundColor"),e=e.parentNode}catch(k){}b= 22 | b.blend(j&&"transparent"!==j?j:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(l){}}};g.fx.step[c]=function(a){a.colorInit||(a.start=h(a.elem,c),a.end=h(a.end),a.colorInit=!0);g.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");g.cssHooks.borderColor={expand:function(a){var b={};k(["Top","Right","Bottom","Left"],function(c, 23 | d){b["border"+d+"Color"]=a});return b}};q=g.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery); -------------------------------------------------------------------------------- /www/releases/0.2.1/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Chris Oakman 2 | http://autocompletejs.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /www/releases/0.2.1/autocomplete-0.2.1.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * AutoCompleteJS v0.2.1 3 | * http://autocompletejs.com/ 4 | * 5 | * Copyright 2013 Chris Oakman 6 | * Released under the MIT license 7 | * http://autocompletejs.com/license 8 | * 9 | * Date: 09 Apr 2013 10 | */ 11 | 12 | div.autocomplete_internal_container { 13 | border: 2px solid #ccc; 14 | color: #333; 15 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 16 | font-size: 14px; 17 | font-style: normal; 18 | font-weight: normal; 19 | line-height: 20px; 20 | padding: 4px; 21 | -webkit-border-radius: 8px; 22 | -moz-border-radius: 8px; 23 | border-radius: 8px; 24 | } 25 | div.autocomplete_internal_container div.placeholder { 26 | color: #777; 27 | float: left; 28 | font-size: 16px; 29 | line-height: 20px; 30 | margin: 10px 0 0 0; 31 | } 32 | div.autocomplete_internal_container input.autocomplete-input { 33 | background: transparent; 34 | border: 0px; 35 | -webkit-box-shadow: none; 36 | -moz-box-shadow: none; 37 | box-shadow: none; 38 | color: #000; 39 | float: left; 40 | font-size: 16px; 41 | height: 20px; 42 | line-height: 20px; 43 | margin: 10px 0px; 44 | outline: none; 45 | padding: 0px; 46 | vertical-align: middle; 47 | width: 120px; 48 | } 49 | div.autocomplete_internal_container div.token-group { 50 | background: #eee; 51 | border: 1px solid #ccc; 52 | cursor: pointer; 53 | float: left; 54 | margin: 4px; 55 | padding: 4px 6px; 56 | -webkit-border-radius: 6px; 57 | -moz-border-radius: 6px; 58 | border-radius: 6px; 59 | } 60 | div.autocomplete_internal_container div.token-group span.remove-token-group { 61 | font-size: 11px; 62 | margin-right: 2px; 63 | } 64 | div.autocomplete_internal_container div.selected { 65 | background: #b0d1f9; 66 | background: -moz-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 67 | background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#d2e6fd),color-stop(100%,#b0d1f9)); 68 | background: -webkit-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 69 | background: -o-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 70 | background: -ms-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 71 | background: linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 72 | } 73 | div.autocomplete_internal_container span.token { 74 | margin: 0px 2px; 75 | } 76 | div.autocomplete_internal_container ul.dropdown { 77 | background: #e3e3e3; 78 | border: 1px solid #ccc; 79 | margin: 12px 0px 0px 0px; 80 | max-height: 300px; 81 | min-width: 140px; 82 | overflow-x: visible; 83 | overflow-y: auto; 84 | padding: 0px; 85 | position: absolute; 86 | z-index: 10; 87 | } 88 | div.autocomplete_internal_container ul.dropdown li { 89 | background: #f9f9f9; 90 | border-bottom: 1px solid #d8d8d8; 91 | font-size: 13px; 92 | list-style: none; 93 | margin: 0px; 94 | padding: 4px; 95 | } 96 | div.autocomplete_internal_container ul.dropdown li span.children-indicator { 97 | float: right; 98 | } 99 | div.autocomplete_internal_container ul.dropdown li.option { 100 | cursor: pointer; 101 | } 102 | div.autocomplete_internal_container ul.dropdown li.highlighted { 103 | background: #00519d; 104 | color: white; 105 | } 106 | div.autocomplete_internal_container ul.dropdown li.last { 107 | border-bottom: 0px; 108 | } 109 | div.autocomplete_internal_container div.clear7282 { 110 | clear: both; 111 | } 112 | -------------------------------------------------------------------------------- /www/releases/0.2.1/autocomplete-0.2.1.min.css: -------------------------------------------------------------------------------- 1 | /*! AutoCompleteJS v0.2.1 | (c) 2013 Chris Oakman | MIT License autocompletejs.com/license */ 2 | div.autocomplete_internal_container{border:2px solid #ccc;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;padding:4px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}div.autocomplete_internal_container div.placeholder{color:#777;float:left;font-size:16px;line-height:20px;margin:10px 0 0 0}div.autocomplete_internal_container input.autocomplete-input{background:transparent;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#000;float:left;font-size:16px;height:20px;line-height:20px;margin:10px 0;outline:0;padding:0;vertical-align:middle;width:120px}div.autocomplete_internal_container div.token-group{background:#eee;border:1px solid #ccc;cursor:pointer;float:left;margin:4px;padding:4px 6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}div.autocomplete_internal_container div.token-group span.remove-token-group{font-size:11px;margin-right:2px}div.autocomplete_internal_container div.selected{background:#b0d1f9;background:-moz-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#d2e6fd),color-stop(100%,#b0d1f9));background:-webkit-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-o-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-ms-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:linear-gradient(top,#d2e6fd 0,#b0d1f9 100%)}div.autocomplete_internal_container span.token{margin:0 2px}div.autocomplete_internal_container ul.dropdown{background:#e3e3e3;border:1px solid #ccc;margin:12px 0 0 0;max-height:300px;min-width:140px;overflow-x:visible;overflow-y:auto;padding:0;position:absolute;z-index:10}div.autocomplete_internal_container ul.dropdown li{background:#f9f9f9;border-bottom:1px solid #d8d8d8;font-size:13px;list-style:none;margin:0;padding:4px}div.autocomplete_internal_container ul.dropdown li span.children-indicator{float:right}div.autocomplete_internal_container ul.dropdown li.option{cursor:pointer}div.autocomplete_internal_container ul.dropdown li.highlighted{background:#00519d;color:white}div.autocomplete_internal_container ul.dropdown li.last{border-bottom:0}div.autocomplete_internal_container div.clear7282{clear:both} -------------------------------------------------------------------------------- /www/releases/0.2.1/autocomplete-0.2.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/releases/0.2.1/autocomplete-0.2.1.zip -------------------------------------------------------------------------------- /www/releases/0.2.1/docs/autocomplete-0.2.1-docs_files/jquery.color.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Color Animations v07cdc1850d 3 | * https://github.com/jquery/jquery-color 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * Date: 06 Feb 2013 10 | */ 11 | (function(g,n){function p(a,b,c){var d=t[b.type]||{};if(null==a)return c||!b.def?null:b.def;a=d.floor?~~a:parseFloat(a);return isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max6*c? 12 | a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var y=/^([\-+])=\s*(\d+\.?\d*)/,x=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16), 13 | parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],h=g.Color=function(a,b,c,d){return new g.Color.fn.parse(a,b,c,d)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0, 14 | type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},t={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},v=h.support={},w=g("

")[0],q,k=g.each;w.style.cssText="background-color:rgba(1,1,1,.5)";v.rgba=-1g.inArray(null,f[b].slice(0, 16 | 3))&&(f[b][3]=1,c.from&&(f._rgba=c.from(f[b])))}),this},is:function(a){var b=h(a),c=!0,d=this;k(l,function(a,e){var j,g=b[e.cache];g&&(j=d[e.cache]||e.to&&e.to(d._rgba)||[],k(e.props,function(a,d){if(null!=g[d.idx])return c=g[d.idx]===j[d.idx]}));return c});return c},_space:function(){var a=[],b=this;k(l,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=h(a),d=c._space(),f=l[d],e=0===this.alpha()?h("transparent"):this,j=e[f.cache]||f.to(e._rgba),g=j.slice(),c=c[f.cache]; 17 | k(f.props,function(a,d){var f=d.idx,e=j[f],h=c[f],k=t[d.type]||{};null!==h&&(null===e?g[f]=h:(k.mod&&(h-e>k.mod/2?e+=k.mod:e-h>k.mod/2&&(e-=k.mod)),g[f]=p((h-e)*b+e,d)))});return this[d](g)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=h(a)._rgba;return h(g.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=g.map(this._rgba,function(a,d){return null==a?2d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+g.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;l.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null, 19 | null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var f=Math.max(b,c,d),e=Math.min(b,c,d),j=f-e,g=f+e,h=0.5*g;return[Math.round(e===f?0:b===f?60*(c-d)/j+360:c===f?60*(d-b)/j+120:60*(b-c)/j+240)%360,0===j?0:0.5>=h?j/g:j/(2-g),h,null==a?1:a]};l.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2];a=a[3];c=0.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*r(d,c,b+1/3)),Math.round(255*r(d,c,b)),Math.round(255*r(d,c,b-1/3)),a]}; 20 | k(l,function(a,b){var c=b.props,d=b.cache,f=b.to,e=b.from;h.fn[a]=function(a){f&&!this[d]&&(this[d]=f(this._rgba));if(a===n)return this[d].slice();var b,s=g.type(a),l="array"===s||"object"===s?a:arguments,m=this[d].slice();k(c,function(a,d){var b=l["object"===s?a:d.idx];null==b&&(b=m[d.idx]);m[d.idx]=p(b,d)});return e?(b=h(e(m)),b[d]=m,b):h(m)};k(c,function(d,b){h.fn[d]||(h.fn[d]=function(c){var e=g.type(c),f="alpha"===d?this._hsla?"hsla":"rgba":a,h=this[f](),k=h[b.idx];if("undefined"===e)return k; 21 | "function"===e&&(c=c.call(this,k),e=g.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=y.exec(c))&&(c=k+parseFloat(e[2])*("+"===e[1]?1:-1));h[b.idx]=c;return this[f](h)})})});h.hook=function(a){a=a.split(" ");k(a,function(a,c){g.cssHooks[c]={set:function(a,b){var e,j="";if("transparent"!==b&&("string"!==g.type(b)||(e=u(b)))){b=h(e||b);if(!v.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===j||"transparent"===j)&&e&&e.style;)try{j=g.css(e,"backgroundColor"),e=e.parentNode}catch(k){}b= 22 | b.blend(j&&"transparent"!==j?j:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(l){}}};g.fx.step[c]=function(a){a.colorInit||(a.start=h(a.elem,c),a.end=h(a.end),a.colorInit=!0);g.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");g.cssHooks.borderColor={expand:function(a){var b={};k(["Top","Right","Bottom","Left"],function(c, 23 | d){b["border"+d+"Color"]=a});return b}};q=g.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery); -------------------------------------------------------------------------------- /www/releases/0.3.0/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Chris Oakman 2 | http://autocompletejs.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /www/releases/0.3.0/autocomplete-0.3.0.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * autocomplete.js v0.3.0 3 | * http://autocompletejs.com/ 4 | * 5 | * Copyright 2013 Chris Oakman 6 | * Released under the MIT license 7 | * http://autocompletejs.com/license 8 | * 9 | * Date: 20 Oct 2013 10 | */ 11 | 12 | div.clear-53545 { 13 | clear: both; 14 | } 15 | 16 | div.autocomplete-container-7a26d { 17 | border: 2px solid #ccc; 18 | color: #333; 19 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 20 | font-size: 14px; 21 | font-style: normal; 22 | font-weight: normal; 23 | line-height: 20px; 24 | padding: 4px; 25 | -webkit-border-radius: 8px; 26 | -moz-border-radius: 8px; 27 | border-radius: 8px; 28 | } 29 | 30 | div.placeholder-d722a { 31 | color: #777; 32 | float: left; 33 | font-size: 16px; 34 | line-height: 20px; 35 | margin: 10px 0 0 0; 36 | } 37 | 38 | input.input-8f2fe { 39 | background: transparent; 40 | border: 0; 41 | -webkit-box-shadow: none; 42 | -moz-box-shadow: none; 43 | box-shadow: none; 44 | color: #000; 45 | float: left; 46 | font-size: 16px; 47 | height: 20px; 48 | line-height: 20px; 49 | margin: 10px 0; 50 | outline: none; 51 | padding: 0; 52 | vertical-align: middle; 53 | width: 120px; 54 | } 55 | 56 | div.token-group-c7334 { 57 | background: #eee; 58 | border: 1px solid #ccc; 59 | cursor: pointer; 60 | float: left; 61 | margin: 4px; 62 | padding: 4px 6px; 63 | -webkit-border-radius: 6px; 64 | -moz-border-radius: 6px; 65 | border-radius: 6px; 66 | } 67 | 68 | span.remove-token-group-53474 { 69 | font-size: 11px; 70 | margin-right: 2px; 71 | } 72 | 73 | div.selected-token-group-359b9 { 74 | background: #b0d1f9; 75 | background: -moz-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 76 | background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#d2e6fd),color-stop(100%,#b0d1f9)); 77 | background: -webkit-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 78 | background: -o-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 79 | background: -ms-linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 80 | background: linear-gradient(top,#d2e6fd 0%,#b0d1f9 100%); 81 | } 82 | 83 | span.token-container-75233 { 84 | margin: 0 2px; 85 | } 86 | 87 | ul.dropdown-a3d44 { 88 | background: #e3e3e3; 89 | border: 1px solid #ccc; 90 | margin: 12px 0 0 0; 91 | max-height: 300px; 92 | min-width: 140px; 93 | overflow-x: visible; 94 | overflow-y: auto; 95 | padding: 0; 96 | position: absolute; 97 | z-index: 10; 98 | } 99 | 100 | li.list-item-d13e9 { 101 | background: #f9f9f9; 102 | border-bottom: 1px solid #d8d8d8; 103 | font-size: 13px; 104 | list-style: none; 105 | margin: 0; 106 | padding: 4px; 107 | } 108 | 109 | li.option-7b59f { 110 | cursor: pointer; 111 | } 112 | 113 | li.highlighted-ea4c1 { 114 | background: #00519d; 115 | color: #fff; 116 | } 117 | 118 | li.last-option-c1e64 { 119 | border-bottom: 0; 120 | } 121 | 122 | span.children-indicator-ca540 { 123 | float: right; 124 | } -------------------------------------------------------------------------------- /www/releases/0.3.0/autocomplete-0.3.0.min.css: -------------------------------------------------------------------------------- 1 | /*! autocomplete.js v0.3.0 | (c) 2013 Chris Oakman | MIT License autocompletejs.com/license */ 2 | div.clear-53545{clear:both}div.autocomplete-container-7a26d{border:2px solid #ccc;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;padding:4px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}div.placeholder-d722a{color:#777;float:left;font-size:16px;line-height:20px;margin:10px 0 0 0}input.input-8f2fe{background:transparent;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#000;float:left;font-size:16px;height:20px;line-height:20px;margin:10px 0;outline:0;padding:0;vertical-align:middle;width:120px}div.token-group-c7334{background:#eee;border:1px solid #ccc;cursor:pointer;float:left;margin:4px;padding:4px 6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}span.remove-token-group-53474{font-size:11px;margin-right:2px}div.selected-token-group-359b9{background:#b0d1f9;background:-moz-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#d2e6fd),color-stop(100%,#b0d1f9));background:-webkit-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-o-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:-ms-linear-gradient(top,#d2e6fd 0,#b0d1f9 100%);background:linear-gradient(top,#d2e6fd 0,#b0d1f9 100%)}span.token-container-75233{margin:0 2px}ul.dropdown-a3d44{background:#e3e3e3;border:1px solid #ccc;margin:12px 0 0 0;max-height:300px;min-width:140px;overflow-x:visible;overflow-y:auto;padding:0;position:absolute;z-index:10}li.list-item-d13e9{background:#f9f9f9;border-bottom:1px solid #d8d8d8;font-size:13px;list-style:none;margin:0;padding:4px}li.option-7b59f{cursor:pointer}li.highlighted-ea4c1{background:#00519d;color:#fff}li.last-option-c1e64{border-bottom:0}span.children-indicator-ca540{float:right} -------------------------------------------------------------------------------- /www/releases/0.3.0/autocomplete-0.3.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakmac/autocompletejs/b4ee22803e6baaf5c0006b5f7ac9872403238e93/www/releases/0.3.0/autocomplete-0.3.0.zip --------------------------------------------------------------------------------