diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-08-26 22:47:31 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-08-26 22:47:31 -0400 |
commit | 05fb6553471025af8bb090cd812651816c1c59fc (patch) | |
tree | 9c5f5714b680940882023608d38fbe5b36cc9c6d /assets/js/src | |
parent | bd023430c8b35f655ef031c6c8d4f6f0bdc188f8 (diff) |
Move tasks Gantt chart
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/Search.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/assets/js/src/Search.js b/assets/js/src/Search.js index b35c4b67..acacbaf9 100644 --- a/assets/js/src/Search.js +++ b/assets/js/src/Search.js @@ -32,6 +32,8 @@ Search.prototype.listen = function() { }; Search.prototype.keyboardShortcuts = function() { + var self = this; + // Switch view mode for projects: go to the board Mousetrap.bind("v b", function(e) { var link = $(".view-board"); @@ -59,6 +61,15 @@ Search.prototype.keyboardShortcuts = function() { } }); + // Switch view mode for projects: go to the gantt chart + Mousetrap.bind("v g", function(e) { + var link = $(".view-gantt"); + + if (link.length) { + window.location = link.attr('href'); + } + }); + // Focus to the search field Mousetrap.bind("f", function(e) { e.preventDefault(); @@ -68,5 +79,18 @@ Search.prototype.keyboardShortcuts = function() { input.focus(); } }); + + // Reset to the search field + Mousetrap.bind("r", function(e) { + e.preventDefault(); + $("#form-search").val("status:open"); + + if ($('#board').length) { + self.app.board.reloadFilters("status:open"); + } + else { + $("form.search").submit(); + } + }); }; |