summaryrefslogtreecommitdiff
path: root/web-ui/app/js/search
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-12-31 16:52:49 -0200
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-12-31 16:52:49 -0200
commitaa66beb0c74ebaa950a083ed991f6e5f50f9c9ac (patch)
treee0df762cef10651b025058fb75733f5e125b6e98 /web-ui/app/js/search
parent111205c8cd74d553201b42db3041d870ae833165 (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.js5
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);
});
}
}