2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 06:07:45 +00:00

Rev for 1.3.0 release

This commit is contained in:
Tomas Kirda 2017-01-20 12:06:07 -06:00
parent f756a441bf
commit 0ba374d7e3
7 changed files with 20 additions and 11 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "devbridge-autocomplete", "name": "devbridge-autocomplete",
"version": "1.2.27", "version": "1.3.0",
"homepage": "https://github.com/devbridge/jQuery-Autocomplete", "homepage": "https://github.com/devbridge/jQuery-Autocomplete",
"authors": [ "authors": [
"Tomas Kirda" "Tomas Kirda"

View File

@ -6,7 +6,7 @@
"ajax", "ajax",
"autocomplete" "autocomplete"
], ],
"version": "1.2.27", "version": "1.3.0",
"author": { "author": {
"name": "Tomas Kirda", "name": "Tomas Kirda",
"url": "https://github.com/tkirda" "url": "https://github.com/tkirda"

View File

@ -1,6 +1,6 @@
/** /**
* Ajax Autocomplete for jQuery, version 1.2.27 * Ajax Autocomplete for jQuery, version 1.3.0
* (c) 2015 Tomas Kirda * (c) 2017 Tomas Kirda
* *
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. * Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
@ -67,6 +67,7 @@
deferRequestBy: 0, deferRequestBy: 0,
params: {}, params: {},
formatResult: Autocomplete.formatResult, formatResult: Autocomplete.formatResult,
formatGroup: Autocomplete.formatGroup,
delimiter: null, delimiter: null,
zIndex: 9999, zIndex: 9999,
type: 'GET', type: 'GET',
@ -143,6 +144,10 @@
.replace(/&lt;(\/?strong)&gt;/g, '<$1>'); .replace(/&lt;(\/?strong)&gt;/g, '<$1>');
}; };
Autocomplete.formatGroup = function (suggestion, category) {
return '<div class="autocomplete-group"><strong>' + category + '</strong></div>';
};
Autocomplete.prototype = { Autocomplete.prototype = {
killerFn: null, killerFn: null,
@ -671,7 +676,7 @@
category = currentCategory; category = currentCategory;
return '<div class="autocomplete-group"><strong>' + category + '</strong></div>'; return options.formatGroup(suggestion, category);
}; };
if (options.triggerSelectOnValidInput && that.isExactMatch(value)) { if (options.triggerSelectOnValidInput && that.isExactMatch(value)) {
@ -742,6 +747,10 @@
if (options.width === 'auto') { if (options.width === 'auto') {
width = that.el.outerWidth(); width = that.el.outerWidth();
container.css('width', width > 0 ? width : 300); container.css('width', width > 0 ? width : 300);
} else if(options.width === 'flex') {
// Trust the source! Unset the width property so it will be the max length
// the containing elements.
container.css('width', '');
} }
}, },

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ module.exports = function(grunt) {
var banner = [ var banner = [
'/**', '/**',
'* Ajax Autocomplete for jQuery, version ' + pkg.version, '* Ajax Autocomplete for jQuery, version ' + pkg.version,
'* (c) 2014 Tomas Kirda', '* (c) 2017 Tomas Kirda',
'*', '*',
'* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.', '* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.',
'* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete', '* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete',

View File

@ -1,6 +1,6 @@
{ {
"name": "devbridge-autocomplete", "name": "devbridge-autocomplete",
"version": "1.2.27", "version": "1.3.0",
"description": "Autocomplete provides suggestions while you type into the text field.", "description": "Autocomplete provides suggestions while you type into the text field.",
"homepage": "https://github.com/devbridge/jQuery-Autocomplete", "homepage": "https://github.com/devbridge/jQuery-Autocomplete",
"author": "Tomas Kirda (https://twitter.com/tkirda)", "author": "Tomas Kirda (https://twitter.com/tkirda)",

View File

@ -1,6 +1,6 @@
/** /**
* Ajax Autocomplete for jQuery, version %version% * Ajax Autocomplete for jQuery, version %version%
* (c) 2015 Tomas Kirda * (c) 2017 Tomas Kirda
* *
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. * Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete