Bind keyboard shortcuts to the right view (refactoring)

This commit is contained in:
Frederic Guillot
2016-03-20 16:22:00 -04:00
parent f77d6c590b
commit 77c84410ec
3 changed files with 11 additions and 7 deletions

View File

@@ -20,9 +20,11 @@ Kanboard.BoardHorizontalScrolling.prototype.listen = function() {
Kanboard.BoardHorizontalScrolling.prototype.keyboardShortcuts = function() {
var self = this;
Mousetrap.bind("c", function() {
self.toggle();
});
if (self.app.hasId("board")) {
Mousetrap.bind("c", function () {
self.toggle();
});
}
};
Kanboard.BoardHorizontalScrolling.prototype.onBoardRendered = function() {