Remove translatable text and blocking 'confirm' dialog from jkanban.js

This commit is contained in:
yflory
2018-05-16 16:18:44 +02:00
parent 0ab27427bc
commit 087e346685
2 changed files with 23 additions and 11 deletions

View File

@@ -193,7 +193,24 @@ define([
};
},
addItemButton: true,
boards: boards
boards: boards,
dragcancelEl: function (el, boardId) {
// XXX
var pos = kanban.findElementPosition(el);
UI.confirm("Are you sure...??", function (yes) {
if (!yes) { return; }
var board;
kanban.options.boards.some(function (b) {
if (b.id === boardId) {
return (board = b);
}
});
if (!board) { return; }
board.item.splice(pos, 1);
$(el).remove();
kanban.onChange();
});
}
});
var addBoardDefault = document.getElementById('kanban-addboard');