percentage result round + minor language fix
This commit is contained in:
parent
167884e565
commit
4174b88987
2 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ app.views.Poll = app.views.Base.extend({
|
|||
for(index = 0; index < answers.length; ++index) {
|
||||
var percentage = 0;
|
||||
if(this.poll.participation_count != 0) {
|
||||
percentage = answers[index].vote_count / this.poll.participation_count * 100;
|
||||
percentage = Math.round(answers[index].vote_count / this.poll.participation_count * 100);
|
||||
}
|
||||
var progressBar = this.$(".poll_progress_bar[data-answerid="+answers[index].id+"]");
|
||||
progressBar.parent().next().html(" - " + percentage + "%");
|
||||
|
|
|
|||
|
|
@ -180,4 +180,4 @@ en:
|
|||
one: "1 vote so far"
|
||||
other: "<%=count%> votes so far"
|
||||
show_result: "Show result"
|
||||
close_result: "Close result"
|
||||
close_result: "Hide result"
|
||||
Loading…
Reference in a new issue