Added new keyboard shortcut for task view
This commit is contained in:
@@ -12,6 +12,7 @@ function App() {
|
||||
this.column = new Column(this);
|
||||
this.file = new FileUpload(this);
|
||||
this.keyboardShortcuts();
|
||||
this.task.keyboardShortcuts();
|
||||
this.chosen();
|
||||
this.poll();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user