diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-12-31 16:52:49 -0200 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-12-31 16:52:49 -0200 |
commit | aa66beb0c74ebaa950a083ed991f6e5f50f9c9ac (patch) | |
tree | e0df762cef10651b025058fb75733f5e125b6e98 /web-ui/app/js/search | |
parent | 111205c8cd74d553201b42db3041d870ae833165 (diff) |
Issue #25 - Implemented shortcuts on UI
Diffstat (limited to 'web-ui/app/js/search')
-rw-r--r-- | web-ui/app/js/search/search_trigger.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web-ui/app/js/search/search_trigger.js b/web-ui/app/js/search/search_trigger.js index 4b9cb1dc..cb670239 100644 --- a/web-ui/app/js/search/search_trigger.js +++ b/web-ui/app/js/search/search_trigger.js @@ -68,6 +68,10 @@ define( } }; + this.shortcutFocusSearchField = function() { + this.$node.find('input[type=search]').focus(); + }; + this.after('initialize', function () { this.render(); this.on(this.select('form'), 'submit', this.search); @@ -75,6 +79,7 @@ define( this.on(this.select('input'), 'blur', this.showSearchTermsAndPlaceHolder); this.on(document, events.ui.tag.selected, this.clearInput); this.on(document, events.ui.tag.select, this.clearInput); + this.on(document, events.shortcuts.focusSearchField, this.shortcutFocusSearchField); }); } } |