diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-10-03 17:42:12 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-10-03 17:42:49 +0200 |
commit | 2afaba240006f95350f8f3425a17ac1fd5ffdace (patch) | |
tree | 0edcee667eb779454f68d2e60ec663612de15784 /js/build/app.js | |
parent | f1d0e020e44214768b7df14bef694952299513d3 (diff) |
fix #863
Diffstat (limited to 'js/build/app.js')
-rw-r--r-- | js/build/app.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/js/build/app.js b/js/build/app.js index 46e5e30bd..f320b0f84 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -2969,11 +2969,17 @@ app.directive('newsSearch', ["$document", "$location", function ($document, $loc var box = $('#searchbox'); box.val($location.search().search); - box.on('search', function () { - var value = $(this).val(); + var doSearch = function () { + var value = box.val(); scope.$apply(function () { scope.onSearch(value); }); + }; + + box.on('search keyup', function (event) { + if (event.type === 'search' || event.keyCode === 13) { + doSearch(); + } }); // carry over search on route change @@ -2989,6 +2995,7 @@ app.directive('newsSearch', ["$document", "$location", function ($document, $loc } }; }]); + app.directive('newsStickyMenu', function () { 'use strict'; |