From aa66beb0c74ebaa950a083ed991f6e5f50f9c9ac Mon Sep 17 00:00:00 2001 From: Jefferson Stachelski Date: Thu, 31 Dec 2015 16:52:49 -0200 Subject: Issue #25 - Implemented shortcuts on UI --- web-ui/app/js/search/search_trigger.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web-ui/app/js/search') 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); }); } } -- cgit v1.2.3