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 f1631744b19d1ef226b95effd85ea96acf1cc2af Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Jul 18 16:40:01 2017 +0200 correction sur la soumission des choix --- pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 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 1dc4b270..2c07a18c 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 @@ -5,7 +5,7 @@ require("./Choice.tag.html"); class="o-form-element"> <div class="c-input-group"> <div class="o-field"> - <Choice ref="choice{index}" + <Choice ref="choice" class="choice c-field" name={"choice" + index} disabled={form.hasVotes} @@ -38,7 +38,11 @@ require("./Choice.tag.html"); this.installBundle(this.session, "poll_choices", this.opts.emitter); this.on("mount", () => { - this.refs["choice0"].focus(); + if (Array.isArray(this.refs.choice)) { + this.refs.choice[0].focus(); + } else { + this.refs.choice.focus(); + } }); this.addOneChoice = () => { @@ -46,7 +50,11 @@ require("./Choice.tag.html"); this.submit(); this.form.addNewChoice(); this.update(); - this.refs["choice" + (this.form.choices.length - 1)].focus(); + if (Array.isArray(this.refs.choice)) { + this.refs.choice[this.form.choices.length - 1].focus(); + } else { + this.refs.choice.focus(); + } } }; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.