branch feature/multi-ui updated (2cb71b93 -> c11f7f98)
This is an automated email from the git hooks/post-receive script. New change to branch feature/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 2cb71b93 Fix reloading poll permission bug new d04704a0 Fix bug when editing questions when not in creation mode new 7896dacb Remove useless screen new c11f7f98 Fix js compilation problem The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit c11f7f9854da750b2a9507a65138bcbd621e5b5c Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:52:16 2019 +0200 Fix js compilation problem commit 7896dacb21b499d6f3d6157b2fb263b50043eae7 Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:51:01 2019 +0200 Remove useless screen commit d04704a0e657b22a16f4935c5a4bf3d4404f0beb Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:50:02 2019 +0200 Fix bug when editing questions when not in creation mode Summary of changes: pollen-ui-riot-js/src/main/web/js/PollForm.js | 3 +- .../src/main/web/tag/poll/EditPoll.tag.html | 8 +- .../src/main/web/tag/poll/EditQuestions.tag.html | 3 + .../web/tag/poll/EditQuestionsSettings.tag.html | 2 +- .../src/main/web/tag/poll/Summary.tag.html | 16 +-- .../src/main/web/tag/poll/SummaryMulti.tag.html | 144 --------------------- 6 files changed, 11 insertions(+), 165 deletions(-) delete mode 100644 pollen-ui-riot-js/src/main/web/tag/poll/SummaryMulti.tag.html -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 d04704a0e657b22a16f4935c5a4bf3d4404f0beb Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:50:02 2019 +0200 Fix bug when editing questions when not in creation mode --- pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html | 3 +++ 1 file changed, 3 insertions(+) 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 ab58d9dd..a74c87b7 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 @@ -50,6 +50,9 @@ import "./EditQuestionsSettings.tag.html"; this.session = session; this.form = this.opts.form; + if (!this.form.questionEdited) { + this.form.questionEdited=0; + } this.question = this.form.model.questions[this.form.questionEdited]; this.installBundle(this.session, "poll_editQuestions", this.opts.emitter); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 7896dacb21b499d6f3d6157b2fb263b50043eae7 Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:51:01 2019 +0200 Remove useless screen --- pollen-ui-riot-js/src/main/web/js/PollForm.js | 3 +- .../src/main/web/tag/poll/EditPoll.tag.html | 7 +- .../web/tag/poll/EditQuestionsSettings.tag.html | 2 +- .../src/main/web/tag/poll/Summary.tag.html | 16 +-- .../src/main/web/tag/poll/SummaryMulti.tag.html | 144 --------------------- 5 files changed, 8 insertions(+), 164 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/js/PollForm.js b/pollen-ui-riot-js/src/main/web/js/PollForm.js index 897424b2..a7d43904 100644 --- a/pollen-ui-riot-js/src/main/web/js/PollForm.js +++ b/pollen-ui-riot-js/src/main/web/js/PollForm.js @@ -40,8 +40,7 @@ class PollForm { this.stepsMulti = [ "general", "options", - "questions", - "summary" + "questions" ]; this.types = ["FREE", "RESTRICTED", "REGISTERED"]; diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html index 23d602a1..d690bc7c 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html @@ -64,10 +64,9 @@ import "./CheckEmails.tag.html"; <Description if={!showSummary && form.step === 0} form={form} ref="description"/> <Choices if={!showSummary && form.step === 1 && !form.multi} form={form} ref="choices"/> <Settings if={!showSummary && form.step === 2 && !form.multi} form={form} ref="settings"/> - <VoterList if={!showSummary && ((form.step === 3 && ! form.multi) || (form.step === 4 && form.multi)) && form.model.pollType === "RESTRICTED"} form={form} ref="voters"/> + <VoterList if={!showSummary && form.step === 3 && form.model.pollType === "RESTRICTED"} form={form} ref="voters"/> <VoteSettings if={!showSummary && form.step === 1 && form.multi} form={form} ref="voteSettings"/> <EditQuestions if={!showSummary && form.step === 2 && form.multi} form={form} ref="editQuestions"/> - <SummaryMulti if={!showSummary && form.step === 3 && form.multi} form={form} ref="summaryMulti"/> <Summary if={showSummary} form={form}/> <div class="form-footer"> @@ -177,12 +176,8 @@ import "./CheckEmails.tag.html"; this.refs.editQuestions.submit(); } else if (this.form.step === 2) { this.refs.settings.submit(); - } else if (this.form.step === 3 && this.form.multi) { - this.refs.summaryMulti.submit(); } else if (this.form.step === 3) { this.refs.voters.submit(); - } else if (this.form.step === 4) { - this.refs.voters.submit(); } if (!this.form.model.gtuValidated && !this.showSummary && (!this.form.creation || this.form.step === this.form.getSteps(form.multi).length - 1)) { this.form.model.gtuValidated = this.refs.gtuValidation.value(); 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 a568a43f..eccad95d 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 @@ -156,7 +156,7 @@ import "../voteCountingType/MajorityJudgmentConfig.tag.html"; this.question = this.form.model.questions[this.form.questionEdited]; this.installBundle(this.session, "poll_settings", this.opts.emitter); - if (!this.question.voteCountingType) { + if (this.question && !this.question.voteCountingType) { this.question.voteCountingType = "1"; } diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html index aae1b75d..c3f3a4df 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html @@ -29,20 +29,14 @@ <p if="{opts.form.model.description}"> <MultiLineLabel class="italic" - label="{opts.form.model.description}"> + label="{opts.form.model.description}"> </MultiLineLabel> </p> - <div if="{opts.form.model.voteCountingTypeValue}"> - {_t.voteCountingType} : - <strong>{opts.form.model.voteCountingTypeValue.name}</strong> (<em>{opts.form.model.voteCountingTypeValue.helper}</em>) - </div> - </div> - - <div class="summary-part"> - <h3>{_t.choices}</h3> - <div each={choice, index in opts.form.model.questions && opts.form.model.questions[0].choices} class="{odd-row: index % 2 > 0}"> - <ChoiceView choice={choice} showdescription="true" hidereport="true"/> + <div class="summary-part"> + <div each={question, index in opts.form.model.questions}> + <SummaryQuestion question={question} showdescription="true" hidereport="true"/> + </div> </div> </div> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/SummaryMulti.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/SummaryMulti.tag.html deleted file mode 100644 index eb72eafd..00000000 --- a/pollen-ui-riot-js/src/main/web/tag/poll/SummaryMulti.tag.html +++ /dev/null @@ -1,144 +0,0 @@ -<SummaryMulti> - - <div if={successMessage} class="c-alert c-alert--success">{successMessage}</div> - - <div class="summary-part"> - <h2> - {opts.form.model.title} - </h2> - - <p if="{opts.form.model.description}"> - <MultiLineLabel class="italic" - label="{opts.form.model.description}"> - </MultiLineLabel> - </p> - - <div class="summary-part"> - <div each={question, index in opts.form.model.questions}> - <SummaryQuestion question={question} showdescription="true" hidereport="true"/> - </div> - </div> - </div> - - - <script type="es6"> - import "./SummaryQuestion.tag.html"; - import "../components/MultiLineLabel.tag.html"; - - import session from "../../js/Session"; - - this.session = session; - 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(); - }); - }; - - - - this.submit = () => { - }; - - </script> - - <style> - - .summary-part { - margin-bottom: 20px; - line-height: 25px; - } - - .odd-row { - background-color: #eee; - } - - .summary-part-actions { - margin-top: 5px; - display: flex; - } - - .summary-part-actions > .c-input-group { - flex-grow: 0.5; - } - - .summary-part-actions > * { - margin-right: 5px; - } - - .invitations-warning { - font-size: 1em; - } - - ul.suffixes { - margin-left: 2em; - } - - </style> -</SummaryMulti> \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 c11f7f9854da750b2a9507a65138bcbd621e5b5c Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 3 17:52:16 2019 +0200 Fix js compilation problem --- pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html | 1 - 1 file changed, 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html index d690bc7c..b06cf1ab 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html @@ -25,7 +25,6 @@ import "./Choices.tag.html"; import "./Settings.tag.html"; import "./VoteSettings.tag.html"; import "./EditQuestions.tag.html"; -import "./SummaryMulti.tag.html"; import "../voterList/VoterList.tag.html"; import "./Summary.tag.html"; import "../components/HumanInput.tag.html"; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm