1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/assets/js/src/BoardTask.js
2016-04-27 20:50:42 +02:00

29 lines
798 B
JavaScript

Kanboard.BoardTask = function(app) {
this.app = app;
};
Kanboard.BoardTask.prototype.listen = function() {
var self = this;
$(document).on("click", ".task-board-change-assignee", function(e) {
e.preventDefault();
e.stopPropagation();
self.app.get("Popover").open($(this).data('url'));
});
$(document).on("click", ".task-board", function(e) {
if (e.target.tagName != "A" && e.target.tagName != "IMG") {
window.location = $(this).data("task-url");
}
});
};
Kanboard.BoardTask.prototype.keyboardShortcuts = function() {
var self = this;
if (self.app.hasId("board")) {
Mousetrap.bind("n", function () {
self.app.get("Popover").open($("#board").data("task-creation-url"));
});
}
};