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

Merge pull request #252 from dugwood/patch-1

Fix syntax for jsHint
This commit is contained in:
Tomas Kirda 2014-10-06 15:00:48 -05:00
commit 2d7e98fefa

View File

@ -281,9 +281,7 @@
topOverflow = -scrollTop + offset.top - containerHeight,
bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight);
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow)
? 'top'
: 'bottom';
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
}
if (orientation === 'top') {
@ -388,7 +386,7 @@
that.selectHint();
return;
}
// Fall through to RETURN
/* falls through */
case keys.RETURN:
if (that.selectedIndex === -1) {
that.hide();
@ -607,7 +605,11 @@
suggest: function () {
if (this.suggestions.length === 0) {
this.options.showNoSuggestionNotice ? this.noSuggestions() : this.hide();
if (this.options.showNoSuggestionNotice) {
this.noSuggestions();
} else {
this.hide();
}
return;
}
@ -851,7 +853,7 @@
adjustScroll: function (index) {
var that = this,
activeItem = that.activate(index)
activeItem = that.activate(index);
if (!activeItem) {
return;