diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-25 19:35:48 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-25 19:35:48 -0400 |
commit | f8e3c3b96277dc66a0d378b5d825bf1837daf1ee (patch) | |
tree | a14af7bf10f170938de28c316c1271d247e16d3c /templates/public/index.html | |
parent | 6e6f3c906c59360c792d3387eb0662f7f0f3eddc (diff) | |
parent | 824bd93116c4c0a48d7112ae0bceb46e70851df5 (diff) |
Merge branch 'master-nomake'
Diffstat (limited to 'templates/public/index.html')
-rw-r--r-- | templates/public/index.html | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/public/index.html b/templates/public/index.html index f5470d14..b97c7909 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -237,8 +237,19 @@ 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-field').val(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() { |