Move tasks Gantt chart

This commit is contained in:
Frederic Guillot
2015-08-26 22:47:31 -04:00
parent bd023430c8
commit 05fb655347
17 changed files with 63 additions and 70 deletions

View File

@@ -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();
}
});
};