Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = function(grunt) {
' * <%= pkg.url %>\n' +
' * @author <%= pkg.author %>\n' +
' * @version <%= pkg.version %>\n' +
' * @contributors <%= pkg.contributors %>\n' +
' * Copyright <%= pkg.license.type %> License: <%= pkg.license.url %>\n' +
' */\n'
},
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Łukasz Pawełczak
Copyright (c) 2016 Łukasz Pawełczak

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
59 changes: 50 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,62 @@ Jquery autocomplete plugin
If you are interested in using this jQuery autocomplete plugin on your site, you can find out more details in the
<a href="http://easyautocomplete.com/">EasyAutocomplete - jQuery autocomplete - homepage</a>. You can find there <a href='http://easyautocomplete.com/guide' >full documentation and easy guide</a> on how to use EasyAutocomplete plugin.

###File location:
## Quick example

Javascript:
```Javascript
var options = {

url: "location_to_file.json",

getValue: "name"
};

$("#countries").easyAutocomplete(options);
```

JSON:
```JSON
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Aland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"}
]
```

HTML:
```HTML
<input id="countries"/>
```

## Demo

There are a couple of examples in folder: `demo`.

## Build

To build project(javascript and css) run:

```
grunt build
```

## File location:

* Distribution files Javascript, CSS are in `dist` folder,
* Source files are in the folder `src`,
* Simple examples, that presents usage of plugin can be found in folder `demo`,
* Tests for the plugin are located in folder `test`.

###Building
To build project(javascript and css) run:

`grunt build`

###Running tests
## Run tests
To execute all unit tests, use:

`grunt test`
```
grunt test
```

## License:

###License:
Code released under <a href='http://github.com/pawelczak/EasyAutocomplete/blob/master/LICENSE.txt' >the MIT license</a>.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "EasyAutocomplete",
"description": "EasyAutocomplete is a jQuery autocomplete plugin. Easy to create autocomplete dropdown list for text input fields",
"version": "1.3.4",
"version": "1.3.5",
"authors": [
"Łukasz Pawełczak <lukaspawelczak@gmail.com>"
],
Expand Down
3 changes: 2 additions & 1 deletion dist/easy-autocomplete.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/easy-autocomplete.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/easy-autocomplete.themes.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/easy-autocomplete.themes.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions dist/jquery.easy-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* jQuery plugin for autocompletion
*
* @author Łukasz Pawełczak (http://github.com/pawelczak)
* @version 1.3.4
* @version 1.3.5
* @contributors Łukasz Pawełczak <lukaspawelczak@gmail.com> (http://github.com/pawelczak),Daniel Morgenstern (init) <daniel.morgenstern@init.de> (https://github.com/dmorgenstern-init)
* Copyright License:
*/

Expand Down Expand Up @@ -1292,7 +1293,7 @@ var EasyAutocomplete = (function(scope) {

default:

if (event.keyCode > 40 || event.keyCode === 8) {
if (event.keyCode > 40 || event.keyCode === 8 || event.keyCode === 0) {

var inputPhrase = $field.val();

Expand Down
5 changes: 3 additions & 2 deletions dist/jquery.easy-autocomplete.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/maps/easy-autocomplete.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/maps/easy-autocomplete.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/maps/easy-autocomplete.themes.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/maps/easy-autocomplete.themes.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "easy-autocomplete",
"title": "jQuery plugin for autocompletion",
"author": "Łukasz Pawełczak (http://github.com/pawelczak)",
"version": "1.3.4",
"version": "1.3.5",
"keywords": [
"jquery",
"jquery-plugin",
Expand All @@ -14,7 +14,8 @@
],
"main": "dist/jquery.easy-autocomplete.js",
"contributors": [
"Łukasz Pawełczak <lukaspawelczak@gmail.com> (http://github.com/pawelczak)"
"Łukasz Pawełczak <lukaspawelczak@gmail.com> (http://github.com/pawelczak)",
"Daniel Morgenstern (init) <daniel.morgenstern@init.de> (https://github.com/dmorgenstern-init)"
],
"repository": {
"type": "git",
Expand All @@ -28,7 +29,10 @@
"grunt": "grunt",
"build": "npm run grunt build",
"devel": "npm run grunt devel",
"test": "npm run grunt test"
"test": "npm run grunt test",
"preversion": "npm run test",
"version": "npm run build && git add -A .",
"postversion": "git push && git push --follow-tags"
},
"dependencies": {
"jquery": "*"
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ var EasyAutocomplete = (function(scope) {

default:

if (event.keyCode > 40 || event.keyCode === 8) {
if (event.keyCode > 40 || event.keyCode === 8 || event.keyCode === 0) {

var inputPhrase = $field.val();

Expand Down