From f80369bfb8c577375398b00ffb51af64d62324be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Juli=C3=A1n?= Date: Wed, 25 Jun 2014 13:07:57 +0200 Subject: [PATCH] Fixed visual percentages bar --- app/coffee/modules/common/directives.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/coffee/modules/common/directives.coffee b/app/coffee/modules/common/directives.coffee index 8da60b54..8a4bc82e 100644 --- a/app/coffee/modules/common/directives.coffee +++ b/app/coffee/modules/common/directives.coffee @@ -39,11 +39,11 @@ DateRangeDirective = -> SprintProgressBarDirective = -> - renderProgress = ($el, percentage) -> + renderProgress = ($el, percentage, visual_percentage) -> if $el.is(".current-progress") $el.css("width", "#{percentage}%") else - $el.find(".current-progress").css("width", "#{percentage}%") + $el.find(".current-progress").css("width", "#{visual_percentage}%") $el.find(".number").html("#{percentage} %") link = ($scope, $el, $attrs) -> @@ -51,7 +51,8 @@ SprintProgressBarDirective = -> closedPoints = sprint.closed_points totalPoints = sprint.total_points percentage = Math.round(100 * (closedPoints/totalPoints)) - renderProgress($el, percentage) + visual_percentage = Math.round(98 * (closedPoints/totalPoints)) #Visual hack for .current-progress bar + renderProgress($el, percentage, visual_percentage) return {link: link}