Closed drmatrix closed 3 years ago
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/riktar/jkanban
Same here ! It doesn't work. @drmatrix please, did you find a solution ? Thanks
Are you using the property correctly? Are you using some event? Please uncomment dragItems at my fiddle and see it's actually working. https://jsfiddle.net/marcosrocha85/Lk9t483r/
@marcosrocha85 Thanks for quick reply, I mean it doesn't work for a given board, not the whole jkanban. So if I have Draft, ToDo, Done, Cancelled boards, is there a way to disable dragItems only for Draft board ? Thanks
@AEK-BKF sure it has. Take a look at this fiddle:
var kanban = new jKanban({
element: '#myboard',
dropEl: function(el, target, source, sibling) {
// eg: if (["_todo","_cancel","_done"].indexOf(target.parentElement.dataset.id) == -1)
if (!yourCoolValidationHere) {
kanban.drake.cancel(true);
return;
}
// do your logic as save to database or ask user for confirmation (I use it for as to move to Done)
}
}
I made a table in database where I created the workflow for the boards (columns) and check if the target board is allowed to receive an item from source board. If cannot, I cancel the drake event and the item is not moved, otherwise I save the new column in database and update all cards sort order for target board.
@marcosrocha85 Thank you so much :))))
hi im trying to give user permission about draggable items the "dragItems :" even set to false the items still draggable