Fixed visual percentages bar

stable
Xavier Julián 2014-06-25 13:07:57 +02:00
parent 56780c4613
commit f80369bfb8
1 changed files with 4 additions and 3 deletions

View File

@ -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}