From 646137c0c68a0b08ecaa8ecf38f25b0ebe04dea2 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Thu, 12 Mar 2015 12:00:24 +0100 Subject: [PATCH] bind estimationProcess to a dom element --- app/coffee/modules/common/estimation.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/coffee/modules/common/estimation.coffee b/app/coffee/modules/common/estimation.coffee index f8666078..3ca34f5f 100644 --- a/app/coffee/modules/common/estimation.coffee +++ b/app/coffee/modules/common/estimation.coffee @@ -224,7 +224,12 @@ EstimationsService = ($template, $qqueue, $repo, $confirm, $q) -> @$el.find(".pop-points-open").show() create = ($el, us, project) -> - estimationProcess = new EstimationProcess($el, us, project) + estimationProcess = $el.data("estimationProcess") + + if !estimationProcess + estimationProcess = new EstimationProcess($el, us, project) + $el.data("estimationProcess", estimationProcess) + if estimationProcess.isEditable estimationProcess.bindClickEvents() else