From 4d799a85525d0ab505a525420de556baedfadb0f Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 25 Sep 2019 14:52:24 +0200 Subject: [PATCH] Fix kanban items issues --- www/kanban/inner.js | 2 +- www/kanban/jkanban.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 609e5ac31..74abb7f8d 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -139,7 +139,7 @@ define([ // Remove the input $(el).text(name); // Save the value for the correct board - var board = $(el.parentNode.parentNode.parentNode).attr("data-id"); + var board = $(el).closest('.kanban-board').attr("data-id"); var pos = kanban.findElementPosition(el.parentNode); kanban.getBoardJSON(board).item[pos].title = name; kanban.onChange(); diff --git a/www/kanban/jkanban.js b/www/kanban/jkanban.js index a44aefed9..aa3f6c922 100644 --- a/www/kanban/jkanban.js +++ b/www/kanban/jkanban.js @@ -271,7 +271,10 @@ if (element.id) { nodeItem.setAttribute('data-eid', element.id) } - nodeItem.innerHTML = element.title; + var nodeItemText = document.createElement('div'); + nodeItemText.classList.add('kanban-item-text'); + nodeItemText.innerHTML = element.title; + nodeItem.appendChild(nodeItemText); //add function nodeItem.clickfn = element.click; nodeItem.dragfn = element.drag;