diff options
Diffstat (limited to 'templates/public')
-rw-r--r-- | templates/public/index.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/public/index.html b/templates/public/index.html index 58dd372..515ce58 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -224,8 +224,18 @@ function setupTypeahead() { matcher: function(item) { return true; }, sorter: function(items) { return items; }, menu: '<ul class="pkgsearch-typeahead"></ul>', - items: 10 + items: 10, + updater: function(item) { + $('#pkgsearch-form').submit(); + return item; + } }).attr('autocomplete', 'off'); + $('#pkgsearch-field').keyup(function(e) { + if (e.keyCode === 13 && + $('ul.pkgsearch-typeahead li.active').size() === 0) { + $('#pkgsearch-form').submit(); + } + }); } function setupKonami() { var konami = new Konami(function() { |