From ef5a56954dd7fab0479bc7d1557ec45cad03b2fb Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Wed, 9 Oct 2019 22:04:31 +0200 Subject: [PATCH] =?UTF-8?q?Kanban:=20Move=20=E2=80=9CAdd=20Item=E2=80=9D?= =?UTF-8?q?=20to=20Header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch moves the button to add new items to kanban boards to the column headers. The reasoning behind this change is that on larger boards the buttons at the bottom may be pushed far away from the actual content, causing users to constantly scroll up and down over the whole page just to add new items. This also helps on mobile devices since you may not see all of the columns there due to the limited screen space. This means that you have to remember which column you are working on to not accidentally add items to the wrong column. This patch makes it clear to which column users add items since the button now resides next to the column title. --- www/kanban/jkanban.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www/kanban/jkanban.js b/www/kanban/jkanban.js index aa3f6c922..48d37e321 100644 --- a/www/kanban/jkanban.js +++ b/www/kanban/jkanban.js @@ -395,17 +395,16 @@ contentBoard.appendChild(nodeItem); } //footer board - var footerBoard = document.createElement('footer'); //add button var addBoardItem = document.createElement('button'); - $(addBoardItem).addClass("kanban-additem btn btn-default fa fa-plus"); - footerBoard.appendChild(addBoardItem); + addBoardItem.setAttribute('title', 'Add new item'); + $(addBoardItem).addClass("btn btn-default fa fa-plus"); + headerBoard.appendChild(addBoardItem); __onAddItemClickHandler(addBoardItem); //board assembly boardNode.appendChild(headerBoard); boardNode.appendChild(contentBoard); - boardNode.appendChild(footerBoard); //board add self.container.appendChild(boardNode); }