diff --git a/scripts/common.js b/scripts/common.js index fc65800..dd65341 100644 --- a/scripts/common.js +++ b/scripts/common.js @@ -175,6 +175,8 @@ $.prototype.addSearch = function(sSection) autoFocus: true, delay: 0, section:sSection, + minLength: 2, + classes:{'ui-autocomplete':'list-group'}, source: function(oRequest, fResponse) { var sTerm = removeDiacritics(oRequest.term); var rMatcher = new RegExp($.ui.autocomplete.escapeRegex(sTerm), 'i'); @@ -204,7 +206,10 @@ $.prototype.addSearch = function(sSection) .toggleClass('btn-primary', (asResults.length == 0)); fResponse(asResults); - } + }, + select: function(event, ui) { + return false; + } } ) .data("ui-autocomplete")._renderItem = function(ul, item) { @@ -243,8 +248,6 @@ $.prototype.addSearch = function(sSection) ) .appendTo(ul); }; - - $($(this).data("ui-autocomplete").classesElementLookup['ui-front']).addClass('list-group'); } $.prototype.appendIcon = function(sIcon, bFull) {