Fix removing a board in kanban
This commit is contained in:
parent
05708f6166
commit
8c342862e7
@ -452,7 +452,7 @@
|
|||||||
this.setBoards = function (boards) {
|
this.setBoards = function (boards) {
|
||||||
//self.element
|
//self.element
|
||||||
for (var i in this.options.boards.list) {
|
for (var i in this.options.boards.list) {
|
||||||
var boardkey = boards.list[i];
|
var boardkey = this.options.boards.list[i];
|
||||||
this.removeBoard(boardkey);
|
this.removeBoard(boardkey);
|
||||||
}
|
}
|
||||||
this.options.boards = boards;
|
this.options.boards = boards;
|
||||||
@ -495,6 +495,8 @@
|
|||||||
if (typeof (board) === 'string' || typeof (board) === "number") {
|
if (typeof (board) === 'string' || typeof (board) === "number") {
|
||||||
id = board;
|
id = board;
|
||||||
board = self.element.querySelector('[data-id="' + board + '"]');
|
board = self.element.querySelector('[data-id="' + board + '"]');
|
||||||
|
} else if (board) {
|
||||||
|
id = board.id;
|
||||||
}
|
}
|
||||||
if (board) {
|
if (board) {
|
||||||
board.remove();
|
board.remove();
|
||||||
@ -504,7 +506,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove duplicates
|
// Remove duplicates
|
||||||
if (id) { $('.kanban-board[data-id="' + board + '"]').remove(); }
|
if (id) { $(self.element).find('.kanban-board[data-id="' + board + '"]').remove(); }
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user