Add keyboard shortcut for project overview

This commit is contained in:
Frederic Guillot
2016-02-16 21:26:26 -05:00
parent 8936792f6f
commit 4961805e0f
4 changed files with 13 additions and 2 deletions

View File

@@ -40,6 +40,15 @@ Search.prototype.listen = function() {
Search.prototype.keyboardShortcuts = function() {
var self = this;
// Switch view mode for projects: go to the overview page
Mousetrap.bind("v o", function(e) {
var link = $(".view-overview");
if (link.length) {
window.location = link.attr('href');
}
});
// Switch view mode for projects: go to the board
Mousetrap.bind("v b", function(e) {
var link = $(".view-board");