diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 2432c9d8a..b45a01c60 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -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 */) { diff --git a/www/kanban/jkanban_cp.js b/www/kanban/jkanban_cp.js index 2a3c6991b..b5285de27 100644 --- a/www/kanban/jkanban_cp.js +++ b/www/kanban/jkanban_cp.js @@ -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);