diff options
Diffstat (limited to 'assets/js/src/Task.js')
-rw-r--r-- | assets/js/src/Task.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/assets/js/src/Task.js b/assets/js/src/Task.js index 955a5752..cbd7dd56 100644 --- a/assets/js/src/Task.js +++ b/assets/js/src/Task.js @@ -2,6 +2,29 @@ function Task(app) { this.app = app; } +Task.prototype.keyboardShortcuts = function() { + var taskView = $("#task-view"); + var self = this; + + if (taskView.length) { + Mousetrap.bind("e", function() { + self.app.popover.open(taskView.data("edit-url")); + }); + + Mousetrap.bind("c", function() { + self.app.popover.open(taskView.data("comment-url")); + }); + + Mousetrap.bind("s", function() { + self.app.popover.open(taskView.data("subtask-url")); + }); + + Mousetrap.bind("l", function() { + self.app.popover.open(taskView.data("internal-link-url")); + }); + } +}; + Task.prototype.listen = function() { var self = this; var reloadingProjectId = 0; |