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 96dea9877f262eb09365c63e4d5955838d4b22d6 Author: jcouteau <couteau@codelutin.com> Date: Mon Aug 19 16:29:01 2019 +0200 Multi question poll : - Simplification du composant question --- .../src/main/web/tag/poll/SummaryQuestion.tag.html | 74 ++-------------------- 1 file changed, 5 insertions(+), 69 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/SummaryQuestion.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/SummaryQuestion.tag.html index 9026c828..22e746ab 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/SummaryQuestion.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/SummaryQuestion.tag.html @@ -10,6 +10,11 @@ label="{opts.question.description}"> </MultiLineLabel> </p> + + <div if="{opts.question.voteCountingTypeValue}"> + {_t.voteCountingType} : + <strong>{opts.question.voteCountingTypeValue.name}</strong> (<em>{opts.question.voteCountingTypeValue.helper}</em>) + </div> </div> <div class="summary-part"> @@ -29,75 +34,6 @@ this.installBundle(this.session, "summary"); this.showVoteCountingTypeHelper = false; - this.on("update", () => { - this.voteUrl = window.location.origin + window.location.pathname + "#poll/" + this.opts.form.model.id + "/vote"; - }); - - this.getMembersWarningLabel = () => { - let label; - if (this.opts.form.model.participantInvitedCount === 0) { - label = this._t.membersNoInvited_all; - } else { - let noInvited = this.opts.form.model.participantCount - this.opts.form.model.participantInvitedCount; - if (noInvited > 1) { - label = this._l("membersNoInvited_many", noInvited); - } else { - label = this._t.membersNoInvited_one; - } - } - return label; - }; - - this.getSendInvitationsLabel = () => { - let label; - let noInvited = this.opts.form.model.participantCount - this.opts.form.model.participantInvitedCount; - if (noInvited > 1) { - label = this._l("sendInvitations", noInvited); - } else { - label = this._t.sendInvitation; - } - return label; - }; - - this.copyUrl = (refInputUrl) => () => { - this.refs[refInputUrl].select(); - document.execCommand("copy"); - }; - - this.listen("successMessage", (successMessage) => { - this.successMessage = successMessage; - this.update(); - }); - - this.closePoll = (e) => { - e.preventDefault(); - e.stopPropagation(); - this.opts.form.close().then(() => { - this.update(); - }); - }; - - this.reopenPoll = (e) => { - e.preventDefault(); - e.stopPropagation(); - this.opts.form.reopen().then(() => { - this.update(); - }); - }; - - this.copy = (refInput) => () => { - this.refs[refInput].select(); - document.execCommand("copy"); - }; - - this.sendInvitations = () => { - this.opts.form.sendInvitations() - .then(nbInvitation => { - let message = nbInvitation > 1 ? this._l("sendInvitations_success", nbInvitation) : this._t.sendInvitation_success; - this.bus.trigger("message", message, "info"); - this.update(); - }); - }; </script> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.