From 60be4df76e02afdf4dd62f8e03505d55c0ed119e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Sat, 23 Feb 2019 23:07:54 +0100 Subject: Allow swimlane creation from template Mix lists with same name to avoid duplicates --- client/components/swimlanes/swimlanes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/components/swimlanes/swimlanes.js') diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index bdaed81d..b4277d4f 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -154,8 +154,8 @@ BlazeComponent.extendComponent({ BlazeComponent.extendComponent({ onCreated() { - currentBoard = Boards.findOne(Session.get('currentBoard')); - this.isListTemplatesSwimlane = currentBoard.isTemplatesBoard() && this.currentData().isListTemplatesSwimlane(); + this.currentBoard = Boards.findOne(Session.get('currentBoard')); + this.isListTemplatesSwimlane = this.currentBoard.isTemplatesBoard() && this.currentData().isListTemplatesSwimlane(); this.currentSwimlane = this.currentData(); }, @@ -176,14 +176,14 @@ BlazeComponent.extendComponent({ boardId: Session.get('currentBoard'), sort: $('.list').length, type: (this.isListTemplatesSwimlane)?'template-list':'list', - swimlaneId: (this.isListTemplatesSwimlane)?this.currentSwimlane._id:'', + swimlaneId: (this.currentBoard.isTemplatesBoard())?this.currentSwimlane._id:'', }); titleInput.value = ''; titleInput.focus(); } }, - 'click .js-list-template': Popup.open('searchCard'), + 'click .js-list-template': Popup.open('searchElement'), }]; }, }).register('addListForm'); -- cgit v1.2.3-1-g7c22