branch develop updated (55e0db1c -> 56c2b402)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 55e0db1c correction couleur des commentaires new 56c2b402 Borda : mise a jour du nombre de rangs si le nombre de choix change The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 56c2b402472427ce558501e603c1422b64ef03f7 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 10 16:25:22 2017 +0200 Borda : mise a jour du nombre de rangs si le nombre de choix change Summary of changes: .../src/main/web/tag/voteCountingType/BordaConfig.tag.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 56c2b402472427ce558501e603c1422b64ef03f7 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 10 16:25:22 2017 +0200 Borda : mise a jour du nombre de rangs si le nombre de choix change --- .../src/main/web/tag/voteCountingType/BordaConfig.tag.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaConfig.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaConfig.tag.html index e15a2653..3db0b682 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaConfig.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaConfig.tag.html @@ -75,9 +75,18 @@ require("./MaxChoicesNumberConfig.tag.html"); if (!this.opts.config.pointsByRank) { this.updatePointsByRank(); + } else { + let length = this.opts.config.maxChoiceNumber || this.opts.countChoices; + if (this.opts.config.pointsByRank.length < length) { + let nbRankToAdd = length - this.opts.config.pointsByRank.length; + let nextRanks = new Array(nbRankToAdd).fill(0); + this.opts.config.pointsByRank = this.opts.config.pointsByRank.concat(nextRanks); + } else if (this.opts.config.pointsByRank.length > length) { + let nbRankToRemove = this.opts.config.pointsByRank.length - length; + this.opts.config.pointsByRank.splice(length, nbRankToRemove); + } } - </script> <style> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm