Fix null item in kanban
This commit is contained in:
parent
3f77a800cf
commit
b558d6e354
@ -286,7 +286,7 @@ define([
|
||||
kanban.inEditMode = true;
|
||||
// create a form to enter element
|
||||
var boardId = $(el.parentNode.parentNode).attr("data-id");
|
||||
var $item = $('<div>', {'class': 'kanban-item'});
|
||||
var $item = $('<div>', {'class': 'kanban-item new-item'});
|
||||
var $input = getInput().val(name).appendTo($item);
|
||||
kanban.addForm(boardId, $item[0]);
|
||||
$input.focus();
|
||||
|
||||
@ -147,9 +147,13 @@
|
||||
self.drake = self.dragula(self.boardContainer, {
|
||||
moves: function (el, source, handle, sibling) {
|
||||
if (self.options.readOnly) { return false; }
|
||||
if (el.classList.contains('new-item')) { return false; }
|
||||
return handle.classList.contains('kanban-item');
|
||||
},
|
||||
accepts: function (el, target, source, sibling) {
|
||||
if (sibling === null) {
|
||||
return false;
|
||||
}
|
||||
if (self.options.readOnly) { return false; }
|
||||
return true;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user