This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 18553eabd19addca211e331b0aa12b575b41f2ff Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Sep 13 11:11:27 2017 +0200 correction affichage coombs --- .../tag/voteCountingType/CoombsDetailResult.tag.html | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CoombsDetailResult.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CoombsDetailResult.tag.html index aa12dd78..969d25bb 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CoombsDetailResult.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CoombsDetailResult.tag.html @@ -4,13 +4,13 @@ require("../poll/ChoiceView.tag.html"); <table class="rounds"> <tr> <td class="cell">{__.rounds}</td> - <td class="cell" each={round, index in rounds}> + <td class="cell" each={round, index in (poll.results && poll.results.detail && poll.results.detail.rounds || [])}> {index + 1} </td> </tr> <tr> <td class="cell separator-top">{__.ranks}</td> - <td class="separator-top" each={round in rounds}> + <td class="separator-top" each={round in (poll.results && poll.results.detail && poll.results.detail.rounds || [])}> <div class="cell2"> <div class="cell"> {parent.__.firstRank} @@ -25,7 +25,7 @@ require("../poll/ChoiceView.tag.html"); <td class="cell separator-top"> <ChoiceView choice={choice} center="true"/> </td> - <td class="separator-top" each={round in rounds}> + <td class="separator-top" each={round in (poll.results && poll.results.detail && poll.results.detail.rounds || [])}> <div class="cell2"> <div class="cell {eliminate: isExclude(choice, round)}"> {getRoundFirstScore(choice, round)} @@ -43,14 +43,7 @@ require("../poll/ChoiceView.tag.html"); this.installBundle(session, "poll_results_coombs"); this.poll = require("../../js/Poll.js"); - this.rounds = []; - - this.onPollChange = poll => { - this.poll = poll; - this.rounds = (poll.results && poll.results.detail && poll.results.detail.rounds) || []; - this.update(); - }; - + this.getRoundFirstScore = (choice, round) => { let rankScore = round.roundChoices.find(r => r.choiceId === choice.id); return rankScore ? rankScore.firstScore || 0 : ""; @@ -65,8 +58,6 @@ require("../poll/ChoiceView.tag.html"); return round.choiceIdsExclude && round.choiceIdsExclude.indexOf(choice.id) >= 0; }; - this.listen("poll", this.onPollChange); - </script> <style> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.