|
|
@ -316,9 +316,7 @@
|
|
|
|
// if add button is true, add button to the board
|
|
|
|
// if add button is true, add button to the board
|
|
|
|
if (addButton) {
|
|
|
|
if (addButton) {
|
|
|
|
var btn = document.createElement("BUTTON");
|
|
|
|
var btn = document.createElement("BUTTON");
|
|
|
|
var t = document.createTextNode(buttonContent);
|
|
|
|
btn.setAttribute("class", "kanban-title-button btn btn-default btn-xs fa fa-times");
|
|
|
|
btn.setAttribute("class", "kanban-title-button btn btn-default btn-xs");
|
|
|
|
|
|
|
|
btn.appendChild(t);
|
|
|
|
|
|
|
|
//var buttonHtml = '<button class="kanban-title-button btn btn-default btn-xs">'+buttonContent+'</button>'
|
|
|
|
//var buttonHtml = '<button class="kanban-title-button btn btn-default btn-xs">'+buttonContent+'</button>'
|
|
|
|
headerBoard.appendChild(btn);
|
|
|
|
headerBoard.appendChild(btn);
|
|
|
|
__onButtonClickHandler(btn, board.id);
|
|
|
|
__onButtonClickHandler(btn, board.id);
|
|
|
@ -348,8 +346,7 @@
|
|
|
|
var footerBoard = document.createElement('footer');
|
|
|
|
var footerBoard = document.createElement('footer');
|
|
|
|
//add button
|
|
|
|
//add button
|
|
|
|
var addBoardItem = document.createElement('button');
|
|
|
|
var addBoardItem = document.createElement('button');
|
|
|
|
$(addBoardItem).text("+")
|
|
|
|
$(addBoardItem).addClass("kanban-additem btn btn-default fa fa-plus");
|
|
|
|
$(addBoardItem).addClass("kanban-additem btn btn-default");
|
|
|
|
|
|
|
|
footerBoard.appendChild(addBoardItem);
|
|
|
|
footerBoard.appendChild(addBoardItem);
|
|
|
|
__onAddItemClickHandler(addBoardItem);
|
|
|
|
__onAddItemClickHandler(addBoardItem);
|
|
|
|
|
|
|
|
|
|
|
@ -459,7 +456,7 @@
|
|
|
|
boardContainerOuter.appendChild(boardContainer);
|
|
|
|
boardContainerOuter.appendChild(boardContainer);
|
|
|
|
var addBoard = document.createElement('div');
|
|
|
|
var addBoard = document.createElement('div');
|
|
|
|
addBoard.id = 'kanban-addboard';
|
|
|
|
addBoard.id = 'kanban-addboard';
|
|
|
|
$(addBoard).text("+");
|
|
|
|
addBoard.setAttribute('class', 'fa fa-plus');
|
|
|
|
boardContainerOuter.appendChild(addBoard);
|
|
|
|
boardContainerOuter.appendChild(addBoard);
|
|
|
|
|
|
|
|
|
|
|
|
self.container = boardContainer;
|
|
|
|
self.container = boardContainer;
|
|
|
@ -502,6 +499,7 @@
|
|
|
|
function __onAddItemClickHandler(nodeItem, clickfn) {
|
|
|
|
function __onAddItemClickHandler(nodeItem, clickfn) {
|
|
|
|
nodeItem.addEventListener('click', function (e) {
|
|
|
|
nodeItem.addEventListener('click', function (e) {
|
|
|
|
e.preventDefault;
|
|
|
|
e.preventDefault;
|
|
|
|
|
|
|
|
e.stopPropagation();
|
|
|
|
self.options.addItemClick(this);
|
|
|
|
self.options.addItemClick(this);
|
|
|
|
if (typeof (this.clickfn) === 'function')
|
|
|
|
if (typeof (this.clickfn) === 'function')
|
|
|
|
this.clickfn(this);
|
|
|
|
this.clickfn(this);
|
|
|
|