"use strict";
// Class definition
var KTJKanbanDemoRich = function() {
// Private functions
var exampleRich = function() {
var kanban = new jKanban({
element: '#kt_docs_jkanban_rich',
gutter: '0',
click: function(el) {
alert(el.innerHTML);
},
boards: [{
'id': '_backlog',
'title': 'Backlog',
'class': 'light-dark',
'item': [{
'title': `
SEO Optimization
In progress
`,
},
{
'title': `
`,
}
]
},
{
'id': '_todo',
'title': 'To Do',
'class': 'light-danger',
'item': [{
'title': `
`,
},
{
'title': `
`,
}
]
},
{
'id': '_working',
'title': 'Working',
'class': 'light-primary',
'item': [{
'title': `
`,
},
{
'title': `
`,
}
]
},
{
'id': '_done',
'title': 'Done',
'class': 'light-success',
'item': [{
'title': `
SEO Optimization
In progress
`,
},
{
'title': `
`,
}
]
},
{
'id': '_deploy',
'title': 'Deploy',
'class': 'light-primary',
'item': [{
'title': `
D.L
SEO Optimization
In progress
`,
},
{
'title': `
E.K
Requirement Study
Scheduled
`,
}
]
}
]
});
var toDoButton = document.getElementById('addToDo');
toDoButton.addEventListener('click', function() {
kanban.addElement(
'_todo', {
'title': `
Requirement Study
Scheduled
`
}
);
});
var addBoardDefault = document.getElementById('addDefault');
addBoardDefault.addEventListener('click', function() {
kanban.addBoards(
[{
'id': '_default',
'title': 'New Board',
'class': 'light-primary',
'item': [{
'title': `
Payment Modules
In development
`},{
'title': `
`}
]
}]
)
});
var removeBoard = document.getElementById('removeBoard');
removeBoard.addEventListener('click', function() {
kanban.removeBoard('_done');
});
}
return {
// Public Functions
init: function() {
exampleRich();
}
};
}();
// On document ready
KTUtil.onDOMContentLoaded(function() {
KTJKanbanDemoRich.init();
});