// jkanban init (function() { if (document.getElementById("myKanban")) { var KanbanTest = new jKanban({ element: "#myKanban", gutter: "10px", widthBoard: "450px", click: el => { let jkanbanInfoModal = document.getElementById("jkanban-info-modal"); let jkanbanInfoModalTaskId = document.querySelector( "#jkanban-info-modal #jkanban-task-id" ); let jkanbanInfoModalTaskTitle = document.querySelector( "#jkanban-info-modal #jkanban-task-title" ); let jkanbanInfoModalTaskAssignee = document.querySelector( "#jkanban-info-modal #jkanban-task-assignee" ); let jkanbanInfoModalTaskDescription = document.querySelector( "#jkanban-info-modal #jkanban-task-description" ); let taskId = el.getAttribute("data-eid"); let taskTitle = el.querySelector('p.text').innerHTML; let taskAssignee = el.getAttribute("data-assignee"); let taskDescription = el.getAttribute("data-description"); jkanbanInfoModalTaskId.value = taskId; jkanbanInfoModalTaskTitle.value = taskTitle; jkanbanInfoModalTaskAssignee.value = taskAssignee; jkanbanInfoModalTaskDescription.value = taskDescription; }, buttonClick: function(el, boardId) { if ( document.querySelector("[data-id='" + boardId + "'] .itemform") === null ) { // create a form to enter element var formItem = document.createElement("form"); formItem.setAttribute("class", "itemform"); formItem.innerHTML = `
`; KanbanTest.addForm(boardId, formItem); formItem.addEventListener("submit", function(e) { e.preventDefault(); var text = e.target[0].value; let newTaskId = "_" + text.toLowerCase().replace(/ /g, "_") + boardId; KanbanTest.addElement(boardId, { id: newTaskId, title: text, class: ["rounded-lg"] }); formItem.parentNode.removeChild(formItem); }); document.getElementById("kanban-cancel-item").onclick = function() { formItem.parentNode.removeChild(formItem); }; } }, addItemButton: true, boards: [{ id: "_backlog", title: "Backlog", item: [{ id: "_task_1_title_id", title: '

Click me to change title

', class: ["rounded-lg"] }, { id: "_task_2_title_id", title: '

Drag me to "In progress" section

', class: ["rounded-lg"] }, { id: "_task_do_something_id", title: 'Pending

Website Design: New cards for blog section and profile details

3
Image placeholderImage placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] }, ] }, { id: "_progress", title: "In progress", item: [{ id: "_task_3_title_id", title: 'Errors

Fix Firefox errors

11
Image placeholderImage placeholder
', class: ["rounded-lg"] }, { id: "_task_4_title_id", title: 'Updates

Argon Dashboard PRO - Angular 11

3
Image placeholderImage placeholder
', class: ["rounded-lg"] }, { id: "_task_do_something_4_id", title: 'Updates

Vue 3 Updates

9
Image placeholderImage placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] } ] }, { id: "_working", title: "In review", item: [{ id: "_task_do_something_2_id", title: 'In Testing

Responsive Changes

11
Image placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] }, { id: "_task_run_id", title: 'In review

Change images dimension

Image placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] }, { id: "_task_do_something_3_id", title: 'In Review

Update Links

6
Image placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] } ] }, { id: "_done", title: "Done", item: [{ id: "_task_all_right_id", title: 'Done

Redesign for the home page

8
Image placeholderImage placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] }, { id: "_task_ok_id", title: 'Done

Schedule winter campaign

2
Image placeholderImage placeholder
', assignee: "Done Joe", description: "This task's description is for something, but not for anything", class: ["rounded-lg"] } ] } ] }); var addBoardDefault = document.getElementById("jkanban-add-new-board"); addBoardDefault.addEventListener("click", function() { let newBoardName = document.getElementById("jkanban-new-board-name") .value; let newBoardId = "_" + newBoardName.toLowerCase().replace(/ /g, "_"); KanbanTest.addBoards([{ id: newBoardId, title: newBoardName, item: [] }]); document.querySelector('#new-board-modal').classList.remove('show'); document.querySelector('body').classList.remove('modal-open'); document.querySelector('.modal-backdrop').remove(); }); var updateTask = document.getElementById("jkanban-update-task"); updateTask.addEventListener("click", function() { let jkanbanInfoModalTaskId = document.querySelector( "#jkanban-info-modal #jkanban-task-id" ); let jkanbanInfoModalTaskTitle = document.querySelector( "#jkanban-info-modal #jkanban-task-title" ); let jkanbanInfoModalTaskAssignee = document.querySelector( "#jkanban-info-modal #jkanban-task-assignee" ); let jkanbanInfoModalTaskDescription = document.querySelector( "#jkanban-info-modal #jkanban-task-description" ); KanbanTest.replaceElement(jkanbanInfoModalTaskId.value, { title: jkanbanInfoModalTaskTitle.value, assignee: jkanbanInfoModalTaskAssignee.value, description: jkanbanInfoModalTaskDescription.value }); jkanbanInfoModalTaskId.value = jkanbanInfoModalTaskId.value; jkanbanInfoModalTaskTitle.value = jkanbanInfoModalTaskTitle.value; jkanbanInfoModalTaskAssignee.value = jkanbanInfoModalTaskAssignee.value; jkanbanInfoModalTaskDescription.value = jkanbanInfoModalTaskDescription.value; document.querySelector('#jkanban-info-modal').classList.remove('show'); document.querySelector('body').classList.remove('modal-open'); document.querySelector('.modal-backdrop').remove(); }); } })();