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 e96c9b2230047a21bc2449378a9c6d66c2091fb9 Author: jcouteau <couteau@codelutin.com> Date: Wed Oct 23 10:15:08 2019 +0200 Lint modifs --- pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html | 1 - pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html | 5 +++-- .../src/main/web/tag/poll/EditQuestionsSettings.tag.html | 8 ++++---- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 6 +++--- pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html | 4 ++-- pollen-ui-riot-js/src/main/web/tag/poll/Result.tag.html | 4 ++-- pollen-ui-riot-js/src/main/web/tag/poll/Vote.tag.html | 6 ++---- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 4 +--- pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html | 2 +- .../src/main/web/tag/voteCountingType/BordaDetailResult.tag.html | 2 +- .../main/web/tag/voteCountingType/CondorcetDetailResult.tag.html | 2 +- .../web/tag/voteCountingType/InstantRunoffDetailResult.tag.html | 2 +- .../tag/voteCountingType/MajorityJudgmentDetailResult.tag.html | 2 +- 13 files changed, 22 insertions(+), 26 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html index 69022e74..06cdc07e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html @@ -120,7 +120,6 @@ .sort((c1, c2) => Math.sign(c1.choice.choiceOrder - c2.choice.choiceOrder)); for (let index = 0, l = choicesDrag.length; index < l; index++) { - console.log("Try setting position", currentY); let choiceDrag = choicesDrag[index]; choiceDrag.setPosition(0, currentY); currentY += choiceDrag.root.offsetHeight; diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html index de0c0c1c..0cef6ea0 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html @@ -51,7 +51,7 @@ import "./EditQuestionsSettings.tag.html"; this.session = session; this.form = this.opts.form; if (!this.form.questionEdited) { - this.form.questionEdited=0; + this.form.questionEdited = 0; } this.question = this.form.model.questions[this.form.questionEdited]; this.installBundle(this.session, "poll_editQuestions", this.opts.emitter); @@ -71,10 +71,11 @@ import "./EditQuestionsSettings.tag.html"; if (!confirm) { return Promise.reject(); } + return Promise.resolve(); }).then(() => { this.form.deleteQuestion(); if (this.form.questionEdited >= this.form.model.questions.length) { - this.form.questionEdited = this.form.model.questions.length -1; + this.form.questionEdited = this.form.model.questions.length - 1; } this.reloadQuestion(); }); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestionsSettings.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestionsSettings.tag.html index eac19b01..6b29e24c 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestionsSettings.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestionsSettings.tag.html @@ -236,11 +236,11 @@ import "../voteCountingType/MajorityJudgmentConfig.tag.html"; if (!this.showOptions && this.form.creation) { this.form.setQuestionDefaultSettings(this.question); } else if (!this.form.hasVotes) { - this.question.addChoices = this.refs.addChoices.checked; - this.question.beginChoiceDate = this.refs.addChoices.checked ? this.refs.beginChoiceDate.getValue() : undefined; - this.question.endChoiceDate = this.refs.addChoices.checked ? this.refs.endChoiceDate.getValue() : undefined; + this.question.addChoices = this.refs.addChoices.checked; + this.question.beginChoiceDate = this.refs.addChoices.checked ? this.refs.beginChoiceDate.getValue() : undefined; + this.question.endChoiceDate = this.refs.addChoices.checked ? this.refs.endChoiceDate.getValue() : undefined; - this.question.voteCountingConfig = this.refs.config ? this.refs.config.getConfig() : {}; + this.question.voteCountingConfig = this.refs.config ? this.refs.config.getConfig() : {}; } }; 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 952dc388..0ccbf223 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 @@ -191,9 +191,9 @@ this.voting = false; - this.question = opts.question; + this.question = this.opts.question; - this.multi = opts.multi; + this.multi = this.opts.multi; this.poll = poll; if (this.question) { @@ -321,7 +321,7 @@ this.voteInEdition = null; if (this.question.canVote) { if (!this.multi) { - this.refs.voterName.value = null; + this.refs.voterName.value = null; } this.question.choices.forEach(choice => { let input = this.refs[choice.id + "_voteValue"]; diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html index e3fc412e..05a0684b 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html @@ -138,8 +138,8 @@ this.orderedAllChoices = false; this.poll = poll; - this.question = opts.question; - this.multi = opts.multi; + this.question = this.opts.question; + this.multi = this.opts.multi; if (this.question) { this.poll.loadForVotes(this.question.id).then(() => { this.update(); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Result.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Result.tag.html index e13b7c4b..caeb4845 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Result.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Result.tag.html @@ -84,7 +84,7 @@ import "../voteCountingType/MajorityJudgmentDetailResult.tag.html"; this.poll = poll; - this.question = opts.question; + this.question = this.opts.question; if (this.question) { this.poll.loadResults(this.question.id); } @@ -114,7 +114,7 @@ import "../voteCountingType/MajorityJudgmentDetailResult.tag.html"; }; this.onQuestionChange = question2 => { - this.question=question2; + this.question = question2; this.loaded = !this.question.resultIsVisible || this.question.results !== undefined; this.resultsLoaded = this.question.results !== undefined; if (!this.resultsLoaded) { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Vote.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Vote.tag.html index c01201e9..58a3219a 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Vote.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Vote.tag.html @@ -93,7 +93,6 @@ import session from "../../js/Session"; import moment from "moment"; import poll from "../../js/Poll.js"; - import route from "riot-route/lib/tag"; this.loaded = false; this.moment = moment; @@ -104,7 +103,7 @@ this.poll = poll; - this.question = opts.question; + this.question = this.opts.question; this.choiceToAdd = this.poll.initChoice(); @@ -128,7 +127,7 @@ }; this.onQuestionChange = question2 => { - this.question=question2; + this.question = question2; this.update(); }; @@ -142,7 +141,6 @@ }; this.saveVote = (vote) => { - let oldPermission = this.poll.getPermission(); let promise = vote.id ? this.poll.updateVote(this.question.id, vote) : this.poll.addVote(this.question.id, vote); return promise.then(result => { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html index a02d0057..cac6a841 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html @@ -49,7 +49,6 @@ import session from "../../js/Session"; import moment from "moment"; import poll from "../../js/Poll.js"; - import route from "riot-route/lib/tag"; this.loaded = false; this.moment = moment; @@ -77,7 +76,6 @@ this.listen("poll", this.onPollChange); this.nextQuestion = () => { - //TODO gérer le cas dernière question if (this.questionToVote === this.poll.questions.length - 1) { //last question, thank you and back to home page //TODO @@ -89,7 +87,7 @@ } }; - this.previousQuestion = (e) => { + this.previousQuestion = () => { this.questionToVote = this.questionToVote - 1; this.question = this.poll.questions[this.questionToVote]; this.bus.trigger("question", 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 173810d4..16ee6320 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 @@ -108,7 +108,7 @@ this.poll = poll; - this.question = opts.question; + this.question = this.opts.question; this.pagination = { order: "topiaCreateDate", diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaDetailResult.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaDetailResult.tag.html index 6219b836..d2635a56 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaDetailResult.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/BordaDetailResult.tag.html @@ -67,7 +67,7 @@ import "../poll/ChoiceView.tag.html"; this.onPollChange = poll2 => { //reload question - _this=this; + let _this = this; poll2.questions.forEach(function(question) { if (_this.question.id === question.id) { _this.question = question; diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CondorcetDetailResult.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CondorcetDetailResult.tag.html index 70f1d8fd..e99d29f5 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CondorcetDetailResult.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/CondorcetDetailResult.tag.html @@ -64,7 +64,7 @@ import "../poll/ChoiceView.tag.html"; this.onPollChange = poll2 => { //reload question - _this=this; + let _this = this; poll2.questions.forEach(function(question) { if (_this.question.id === question.id) { _this.question = question; diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/InstantRunoffDetailResult.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/InstantRunoffDetailResult.tag.html index 34a15b0f..1732c51e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/InstantRunoffDetailResult.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/InstantRunoffDetailResult.tag.html @@ -55,7 +55,7 @@ import "../poll/ChoiceView.tag.html"; this.onPollChange = poll2 => { //reload question - _this=this; + let _this = this; poll2.questions.forEach(function(question) { if (_this.question.id === question.id) { _this.question = question; diff --git a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/MajorityJudgmentDetailResult.tag.html b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/MajorityJudgmentDetailResult.tag.html index 1da5ad68..eaa9ad77 100644 --- a/pollen-ui-riot-js/src/main/web/tag/voteCountingType/MajorityJudgmentDetailResult.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/voteCountingType/MajorityJudgmentDetailResult.tag.html @@ -76,7 +76,7 @@ import "../poll/ChoiceView.tag.html"; this.poll = poll; this.onPollChange = poll2 => { //reload question - _this=this; + let _this = this; poll2.questions.forEach(function(question) { if (_this.question.id === question.id) { _this.question = question; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.