summaryrefslogtreecommitdiff
path: root/assets/js/src/BoardTask.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-20 16:56:07 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-20 16:56:07 -0400
commit45f21e1cd8e09e39d5f74d8826b27fc202428b3c (patch)
tree225925cf4f6d59310773cd04b4ae1b1d425d6d0e /assets/js/src/BoardTask.js
parent4c733eb715a0939b8a12f68ad97660ffc1933d16 (diff)
Bind keyboard shortcut 'n' to the right view (refactoring)
Diffstat (limited to 'assets/js/src/BoardTask.js')
-rw-r--r--assets/js/src/BoardTask.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/assets/js/src/BoardTask.js b/assets/js/src/BoardTask.js
index 79c55779..2b8ac132 100644
--- a/assets/js/src/BoardTask.js
+++ b/assets/js/src/BoardTask.js
@@ -21,7 +21,9 @@ Kanboard.BoardTask.prototype.listen = function() {
Kanboard.BoardTask.prototype.keyboardShortcuts = function() {
var self = this;
- Mousetrap.bind("n", function() {
- self.app.get("Popover").open($("#board").data("task-creation-url"));
- });
+ if (self.app.hasId("board")) {
+ Mousetrap.bind("n", function () {
+ self.app.get("Popover").open($("#board").data("task-creation-url"));
+ });
+ }
};