Fix Kanban issues

pull/1/head
yflory 4 years ago
parent 96362b20b1
commit 2756e1f2cd

@ -635,7 +635,7 @@ define([
gutter: '5px',
widthBoard: '300px',
buttonContent: '❌',
readOnly: framework.isReadOnly(),
readOnly: framework.isReadOnly() || framework.isLocked(),
tagsAnd: _tagsAnd,
refresh: function () {
onRedraw.fire();
@ -869,7 +869,7 @@ define([
var addBoardDefault = document.getElementById('kanban-addboard');
$(addBoardDefault).attr('title', Messages.kanban_addBoard);
addBoardDefault.addEventListener('click', function () {
if (framework.isReadOnly()) { return; }
if (framework.isReadOnly() || framework.isLocked()) { return; }
/*var counter = 1;
// Get the new board id
@ -1051,7 +1051,7 @@ define([
mkHelpMenu(framework);
}
if (framework.isReadOnly()) {
if (framework.isReadOnly() || framework.isLocked()) {
$container.addClass('cp-app-readonly');
} else {
framework.setFileImporter({}, function (content /*, file */) {

@ -458,13 +458,12 @@ define([
this.moveItem = function (source, eid, board, pos) {
var boards = self.options.boards;
var same = -1;
console.error(source, eid, board, pos);
if (source && boards.data[source]) {
// Remove from this board only
var l = boards.data[source].item;
var idx = l.indexOf(eid);
var idx = l.indexOf(Number(eid));
if (idx !== -1) { l.splice(idx, 1); }
if (source === board) { same = idx; }
if (boards.data[source] === board) { same = idx; }
} else {
// Remove the item from all its board
var from = findItem(eid);

Loading…
Cancel
Save