From 8b384d6bb362c8bb103b3f67b5cd54fe747251f4 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Thu, 13 Sep 2018 16:20:42 +0200 Subject: [PATCH] fix jscolor picker for new kanban items and fix the code according to CI --- www/kanban/inner.js | 6 +++--- www/kanban/jkanban.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index a7f73f81e..ed34b837e 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -250,12 +250,12 @@ define([ jscolorL = new window.jscolor(el,{onFineChange: onchange, valueElement:undefined}); jscolorL.show(); var currentColor = boardJSON.color; - if (currentColor == undefined) { - currentColor = '' + if (currentColor === undefined) { + currentColor = ''; } jscolorL.fromString(currentColor); }, - buttonClick: function (el, boardId) { + buttonClick: function (el, boardId, e) { e.stopPropagation(); if (framework.isReadOnly() || framework.isLocked()) { return; } UI.confirm(Messages.kanban_deleteBoard, function (yes) { diff --git a/www/kanban/jkanban.js b/www/kanban/jkanban.js index 0c89abe2e..971226384 100644 --- a/www/kanban/jkanban.js +++ b/www/kanban/jkanban.js @@ -275,6 +275,7 @@ nodeItem.dragendfn = element.dragend; nodeItem.dropfn = element.drop; __onclickHandler(nodeItem); + __onColorClickHandler(nodeItem, "item"); board.appendChild(nodeItem); // send event that board has changed self.onChange();