minimum of 2 letters to trigger def search
This commit is contained in:
@@ -175,6 +175,8 @@ $.prototype.addSearch = function(sSection)
|
|||||||
autoFocus: true,
|
autoFocus: true,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
section:sSection,
|
section:sSection,
|
||||||
|
minLength: 2,
|
||||||
|
classes:{'ui-autocomplete':'list-group'},
|
||||||
source: function(oRequest, fResponse) {
|
source: function(oRequest, fResponse) {
|
||||||
var sTerm = removeDiacritics(oRequest.term);
|
var sTerm = removeDiacritics(oRequest.term);
|
||||||
var rMatcher = new RegExp($.ui.autocomplete.escapeRegex(sTerm), 'i');
|
var rMatcher = new RegExp($.ui.autocomplete.escapeRegex(sTerm), 'i');
|
||||||
@@ -204,7 +206,10 @@ $.prototype.addSearch = function(sSection)
|
|||||||
.toggleClass('btn-primary', (asResults.length == 0));
|
.toggleClass('btn-primary', (asResults.length == 0));
|
||||||
|
|
||||||
fResponse(asResults);
|
fResponse(asResults);
|
||||||
}
|
},
|
||||||
|
select: function(event, ui) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.data("ui-autocomplete")._renderItem = function(ul, item) {
|
.data("ui-autocomplete")._renderItem = function(ul, item) {
|
||||||
@@ -243,8 +248,6 @@ $.prototype.addSearch = function(sSection)
|
|||||||
)
|
)
|
||||||
.appendTo(ul);
|
.appendTo(ul);
|
||||||
};
|
};
|
||||||
|
|
||||||
$($(this).data("ui-autocomplete").classesElementLookup['ui-front']).addClass('list-group');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.prototype.appendIcon = function(sIcon, bFull) {
|
$.prototype.appendIcon = function(sIcon, bFull) {
|
||||||
|
|||||||
Reference in New Issue
Block a user