This is an automated email from the git hooks/post-receive script. New commit to branch feature/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit a05c2a273f452c0f7e87082057c9e72184efcb88 Author: jcouteau <couteau@codelutin.com> Date: Tue Oct 29 14:18:31 2019 +0100 [ISO] lint --- pollen-ui-riot-js/src/main/web/js/Poll.js | 31 +++++++++++----------- .../src/main/web/tag/poll/EditVote.tag.html | 2 +- .../src/main/web/tag/poll/VotesTable.tag.html | 4 +-- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/js/Poll.js b/pollen-ui-riot-js/src/main/web/js/Poll.js index 1c6b6abf..483602d6 100644 --- a/pollen-ui-riot-js/src/main/web/js/Poll.js +++ b/pollen-ui-riot-js/src/main/web/js/Poll.js @@ -171,27 +171,28 @@ class Poll { this.questions.forEach(function(question) { if (questionId === question.id) { let indexResult = 0; - question.choices = resultsArray[indexResult++]; - question.choiceCount = this.choices.length; + question.choices = resultsArray[indexResult++]; + question.choiceCount = this.choices.length; - question.voteCountingTypeValue = resultsArray[indexResult++]; + question.voteCountingTypeValue = resultsArray[indexResult++]; - if (this.resultIsVisible) { - question.results = resultsArray[indexResult++]; - question.choices.forEach(choice => { - choice.score = question.results.scores.find(score => score.choiceId === choice.id); - }); - } + if (this.resultIsVisible) { + question.results = resultsArray[indexResult++]; + question.choices.forEach(choice => { + choice.score = question.results.scores.find(score => score.choiceId === choice.id); + }); + } - if (this.canVote) { - this.voterName = resultsArray[indexResult++].voterName; - } + if (this.canVote) { + this.voterName = resultsArray[indexResult++].voterName; + } - pageTracker.trackPoll(); + pageTracker.trackPoll(); - bus.trigger("question", question); - return Promise.resolve(this); + bus.trigger("question", question); + return Promise.resolve(this); } + return true; }); return Promise.reject(); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html index ca4f8d67..90e852aa 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html @@ -229,7 +229,7 @@ this.multi = multi2; }; - this.onPollChange = poll2 => { + this.onPollChange = poll2 => { this.poll = poll2; this.question = this.poll.questions[0]; if (this.question) { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html index 8367e683..122ae651 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html @@ -241,12 +241,12 @@ } }; - this.on('mount', function() { + this.on("mount", function() { //first load //FIXME JC191023 Ça semble pas être la bonne façon de faire :( mais ça marche ! this.loadVoteCountingTypeValue(); this.refresh(); - }) + }); </script> <style> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.