Fix kanban creation

pull/1/head
yflory 7 years ago
parent 95218f0fa1
commit 884f2b465d

@ -30,6 +30,7 @@ define([
var COLORS = ['yellow', 'green', 'orange', 'blue', 'red', 'purple', 'cyan', 'lightgreen', 'lightblue'];
var addRemoveItemButton = function (framework, kanban) {
if (!kanban) { return; }
if (framework.isReadOnly() || framework.isLocked()) { return; }
var $container = $(kanban.element);
$container.find('.kanban-remove-item').remove();
@ -325,6 +326,7 @@ define([
}
framework.onEditableChange(function (unlocked) {
if (framework.isReadOnly()) { return; }
if (!kanban) { return; }
if (unlocked) {
addRemoveItemButton(framework, kanban);
kanban.options.readOnly = false;
@ -357,7 +359,11 @@ define([
});
framework.setContentGetter(function () {
if (!kanban) { return; }
if (!kanban) {
return {
content: []
};
}
var content = kanban.getBoardsJSON();
verbose("Content current value is " + content);
return {
@ -369,6 +375,10 @@ define([
$("#cp-app-kanban-content").focus();
});
framework.onDefaultContentNeeded(function () {
kanban = initKanban(framework);
});
framework.start();
};

Loading…
Cancel
Save