"use strict"; // Class definition var KTKanbanBoardDemo = function() { // Private functions var _demo1 = function() { var kanban = new jKanban({ element: '#kt_kanban_1', gutter: '0', widthBoard: '250px', boards: [{ 'id': '_inprocess', 'title': 'در جریان', 'item': [{ 'title': 'می تونید من رو درگ کنید' }, { 'title': 'خرید' } ] }, { 'id': '_working', 'title': 'کار کردن', 'item': [{ 'title': 'کاری بکنید!' }, { 'title': 'اجرا کردن' } ] }, { 'id': '_done', 'title': 'انجام شده', 'item': [{ 'title': 'خیلی خوب' }, { 'title': 'اکی' } ] } ] }); } var _demo2 = function() { var kanban = new jKanban({ element: '#kt_kanban_2', gutter: '0', widthBoard: '250px', boards: [{ 'id': '_inprocess', 'title': 'در جریان', 'class': 'primary', 'item': [{ 'title': 'می تونید من رو درگ کنید', 'class': 'light-primary', }, { 'title': 'خرید', 'class': 'light-primary', } ] }, { 'id': '_working', 'title': 'کار کردن', 'class': 'success', 'item': [{ 'title': 'کاری بکنید!', 'class': 'light-success', }, { 'title': 'اجرا کردن', 'class': 'light-success', } ] }, { 'id': '_done', 'title': 'انجام شده', 'class': 'danger', 'item': [{ 'title': 'خیلی خوب', 'class': 'light-danger', }, { 'title': 'اکی', 'class': 'light-danger', } ] } ] }); } var _demo3 = function() { var kanban = new jKanban({ element: '#kt_kanban_3', gutter: '0', widthBoard: '250px', click: function(el) { alert(el.innerHTML); }, boards: [{ 'id': '_todo', 'title': 'انجام بده', 'class': 'light-primary', 'dragTo': ['_working'], 'item': [{ 'title': 'انجام وظیفه', 'class': 'primary' }, { 'title': 'خرید', 'class': 'primary' } ] }, { 'id': '_working', 'title': 'کار کردن', 'class': 'light-warning', 'item': [{ 'title': 'کاری بکنید!', 'class': 'warning' }, { 'title': 'اجرا کردن', 'class': 'warning' } ] }, { 'id': '_done', 'title': 'انجام شده', 'class': 'light-success', 'dragTo': ['_working'], 'item': [{ 'title': 'خیلی خوب', 'class': 'success' }, { 'title': 'اکی', 'class': 'success' } ] }, { 'id': '_notes', 'title': 'نکات', 'class': 'light-danger', 'item': [{ 'title': 'دست نزن', 'class': 'danger' }, { 'title': 'وارد نشوید', 'class': 'danger' } ] } ] }); } var _demo4 = function() { var kanban = new jKanban({ element: '#kt_kanban_4', gutter: '0', click: function(el) { alert(el.innerHTML); }, boards: [{ 'id': '_backlog', 'title': 'جمع شدن', 'class': 'light-dark', 'item': [{ 'title': `
Pic
بهینه سازی سئو در حال پردازش
`, }, { 'title': `
A.D
حسابرس در حال انجام
`, } ] }, { 'id': '_todo', 'title': 'انجام بده', 'class': 'light-danger', 'item': [{ 'title': `
Pic
راه اندازی سرور تکمیل شده
`, }, { 'title': `
Pic
گزارشگر خبر
`, } ] }, { 'id': '_working', 'title': 'کار کردن', 'class': 'light-primary', 'item': [{ 'title': `
Pic
بازاریابی نقشه ها
`, }, { 'title': `
A.P
حسابرس انجام شده
`, } ] }, { 'id': '_done', 'title': 'انجام شده', 'class': 'light-success', 'item': [{ 'title': `
Pic
بهینه سازی سئو در حال پردازش
`, }, { 'title': `
Pic
مدیر تیم در حال پردازش
`, } ] }, { 'id': '_deploy', 'title': 'استقرار', 'class': 'light-primary', 'item': [{ 'title': `
D.L
بهینه سازی سئو در حال پردازش
`, }, { 'title': `
E.K
مطالعه برنامه ریزی شده
`, } ] } ] }); var toDoButton = document.getElementById('addToDo'); toDoButton.addEventListener('click', function() { kanban.addElement( '_todo', { 'title': `
Pic
مطالعه برنامه ریزی شده
` } ); }); var addBoardDefault = document.getElementById('addDefault'); addBoardDefault.addEventListener('click', function() { kanban.addBoards( [{ 'id': '_default', 'title': 'New Board', 'class': 'primary-light', 'item': [{ 'title': `
Pic
Payment Modules In development
`},{ 'title': `
Pic
New Project در حال انجام
`} ] }] ) }); var removeBoard = document.getElementById('removeBoard'); removeBoard.addEventListener('click', function() { kanban.removeBoard('_done'); }); } // Public functions return { init: function() { _demo1(); _demo2(); _demo3(); _demo4(); } }; }(); jQuery(document).ready(function() { KTKanbanBoardDemo.init(); });