Skip to content

Commit 0ba374d

Browse files
author
Tomas Kirda
committed
Rev for 1.3.0 release
1 parent f756a44 commit 0ba374d

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devbridge-autocomplete",
3-
"version": "1.2.27",
3+
"version": "1.3.0",
44
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
55
"authors": [
66
"Tomas Kirda"

devbridge-autocomplete.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ajax",
77
"autocomplete"
88
],
9-
"version": "1.2.27",
9+
"version": "1.3.0",
1010
"author": {
1111
"name": "Tomas Kirda",
1212
"url": "https://github.com/tkirda"

dist/jquery.autocomplete.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Ajax Autocomplete for jQuery, version 1.2.27
3-
* (c) 2015 Tomas Kirda
2+
* Ajax Autocomplete for jQuery, version 1.3.0
3+
* (c) 2017 Tomas Kirda
44
*
55
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
66
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
@@ -67,6 +67,7 @@
6767
deferRequestBy: 0,
6868
params: {},
6969
formatResult: Autocomplete.formatResult,
70+
formatGroup: Autocomplete.formatGroup,
7071
delimiter: null,
7172
zIndex: 9999,
7273
type: 'GET',
@@ -143,6 +144,10 @@
143144
.replace(/&lt;(\/?strong)&gt;/g, '<$1>');
144145
};
145146

147+
Autocomplete.formatGroup = function (suggestion, category) {
148+
return '<div class="autocomplete-group"><strong>' + category + '</strong></div>';
149+
};
150+
146151
Autocomplete.prototype = {
147152

148153
killerFn: null,
@@ -671,7 +676,7 @@
671676

672677
category = currentCategory;
673678

674-
return '<div class="autocomplete-group"><strong>' + category + '</strong></div>';
679+
return options.formatGroup(suggestion, category);
675680
};
676681

677682
if (options.triggerSelectOnValidInput && that.isExactMatch(value)) {
@@ -742,6 +747,10 @@
742747
if (options.width === 'auto') {
743748
width = that.el.outerWidth();
744749
container.css('width', width > 0 ? width : 300);
750+
} else if(options.width === 'flex') {
751+
// Trust the source! Unset the width property so it will be the max length
752+
// the containing elements.
753+
container.css('width', '');
745754
}
746755
},
747756

dist/jquery.autocomplete.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function(grunt) {
55
var banner = [
66
'/**',
77
'* Ajax Autocomplete for jQuery, version ' + pkg.version,
8-
'* (c) 2014 Tomas Kirda',
8+
'* (c) 2017 Tomas Kirda',
99
'*',
1010
'* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.',
1111
'* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devbridge-autocomplete",
3-
"version": "1.2.27",
3+
"version": "1.3.0",
44
"description": "Autocomplete provides suggestions while you type into the text field.",
55
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
66
"author": "Tomas Kirda (https://twitter.com/tkirda)",

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Ajax Autocomplete for jQuery, version %version%
3-
* (c) 2015 Tomas Kirda
3+
* (c) 2017 Tomas Kirda
44
*
55
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
66
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete

0 commit comments

Comments
 (0)