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 1b6d9bfb243a985cf795ed62ddb185cf59512957 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Apr 18 13:29:31 2018 +0200 fix #200 : correction du binding de l'affichage de la description --- pollen-ui-riot-js/src/main/web/js/Poll.js | 1 + pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html | 3 +-- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 1 + 3 files changed, 3 insertions(+), 2 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 a2b03aa8..f22ccbce 100644 --- a/pollen-ui-riot-js/src/main/web/js/Poll.js +++ b/pollen-ui-riot-js/src/main/web/js/Poll.js @@ -116,6 +116,7 @@ class Poll { choice.choiceValue = undefined; choice.description = undefined; } + choice.description = undefined; return choice; } diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html index c4939810..86ab407d 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html @@ -138,7 +138,7 @@ require("../components/time-picker.tag.html"); this.originalFile = this.opts.choice.choiceType === "RESOURCE" ? this.opts.choice.choiceValue : null; this.hasNewFile = false; this.valueText = this.opts.choice.choiceType === "TEXT" ? this.opts.choice.choiceValue : null; - this.showDescription = this.opts.choice.description; + this.showDescription = this.opts.choice.description && this.opts.choice.description.length; if (this.opts.choice.choiceType.startsWith("DATE")) { this.date = { @@ -163,7 +163,6 @@ require("../components/time-picker.tag.html"); this.updateChoice(); - this.on("update", this.updateChoice); this.on("mount", this.focus); this.setTextType = () => { 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 06d0964d..595be57c 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 @@ -98,6 +98,7 @@ require("../components/Avatar.tag.html"); this.poll.addChoice(this.choiceToAdd).then(() => { this.addingChoice = false; this.choiceToAdd = this.poll.initChoice(this.choiceToAdd); + this.refs.choice.updateChoice(); this.update(); }, errors => { this.addingChoice = false; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.