branch develop updated (1f0b53c -> 4a48b23)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 1f0b53c gestion des participant d'un sondage : fix test new 4a48b23 fixes #66 Type de sondage dans la description The 1 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 4a48b234aa7b31d5237fda36793a2e39d79a6a3d Author: Kevin Morin <morin@codelutin.com> Date: Tue May 16 18:07:22 2017 +0200 fixes #66 Type de sondage dans la description Summary of changes: pollen-ui-riot-js/src/main/web/css/main.css | 4 ++++ pollen-ui-riot-js/src/main/web/i18n.json | 2 ++ .../src/main/web/tag/poll/Poll.tag.html | 27 ++++++++++++++++++++++ .../src/main/web/tag/poll/Settings.tag.html | 13 +++++++++++ 4 files changed, 46 insertions(+) -- 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 develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 4a48b234aa7b31d5237fda36793a2e39d79a6a3d Author: Kevin Morin <morin@codelutin.com> Date: Tue May 16 18:07:22 2017 +0200 fixes #66 Type de sondage dans la description --- pollen-ui-riot-js/src/main/web/css/main.css | 4 ++++ pollen-ui-riot-js/src/main/web/i18n.json | 2 ++ .../src/main/web/tag/poll/Poll.tag.html | 27 ++++++++++++++++++++++ .../src/main/web/tag/poll/Settings.tag.html | 13 +++++++++++ 4 files changed, 46 insertions(+) diff --git a/pollen-ui-riot-js/src/main/web/css/main.css b/pollen-ui-riot-js/src/main/web/css/main.css index 37405bb..10adfa9 100644 --- a/pollen-ui-riot-js/src/main/web/css/main.css +++ b/pollen-ui-riot-js/src/main/web/css/main.css @@ -137,3 +137,7 @@ button.c-button { ul { margin-left: .5em; } + +.cursor-pointer { + cursor: pointer; +} \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/i18n.json b/pollen-ui-riot-js/src/main/web/i18n.json index c1499fb..b926236 100644 --- a/pollen-ui-riot-js/src/main/web/i18n.json +++ b/pollen-ui-riot-js/src/main/web/i18n.json @@ -31,6 +31,7 @@ "poll_CREATED": "Créé", "poll_createdBy": "Créé par", "poll_createdIn": "le", + "poll_voteCountingType": "Type de sondage : ", "poll_beginChoiceFrom": "ajout de choix à partir du", "poll_votingFrom": "ouverture à partir du", "poll_votingFromTo": "jusqu'au", @@ -440,6 +441,7 @@ "poll_CREATED": "Created", "poll_createdBy": "Create by", "poll_createdIn": "in", + "poll_voteCountingType": "Poll type: ", "poll_beginChoiceFrom": "add choice from", "poll_votingFrom": "voting from", "poll_votingFromTo": "to", diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html index eae9ce3..6d56136 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html @@ -143,6 +143,16 @@ require("../popup/QrCodeButton.tag.html"); {__.beginChoiceTo} {formatDate(poll.endChoiceDate)} </div> + <div class="poll-vote-counting-type" if="{poll.voteCountingTypeValue}"> + {__.voteCountingType} {poll.voteCountingTypeValue.name} + <i class="fa fa-question-circle cursor-pointer" aria-hidden="true" onclick="{toggleHelp}"></i> + </div> + + <div id="voteCountingTypeHelper" + ref="voteCountingTypeHelper" + show="{showVoteCountingTypeHelper}"> + </div> + <div class="poll-voting" if={poll.status === "VOTING"}> <span if={poll.voteCount === 0}>{__.noVote}</span> @@ -173,11 +183,16 @@ require("../popup/QrCodeButton.tag.html"); this.selectedTab = this.opts.tabName || "votes"; + this.showVoteCountingTypeHelper = false; + this.poll = require("../../js/Poll"); this.onPollChange = poll => { this.poll = poll; this.update(); this.bus.trigger("pageChanged", poll.title); + if (poll && poll.voteCountingTypeValue && this.refs.voteCountingTypeHelper) { + this.refs.voteCountingTypeHelper.innerHTML = poll.voteCountingTypeValue.helper; + } }; this.bus.on("poll", this.onPollChange); @@ -222,6 +237,10 @@ require("../popup/QrCodeButton.tag.html"); this.bus.off("poll", this.onPollChange); }); + this.toggleHelp = () => { + this.showVoteCountingTypeHelper = !this.showVoteCountingTypeHelper; + }; + </script> <style> @@ -299,5 +318,13 @@ require("../popup/QrCodeButton.tag.html"); font-weight: normal; } + #voteCountingTypeHelper { + margin: 5px; + padding: 5px; + border: 1px solid #CCC; + border-radius: 5px; + background-color: #EEE; + } + </style> </Poll> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html index 6426841..24c4a3f 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html @@ -71,6 +71,10 @@ {type.name} </option> </select> + <p> + <i class="fa fa-question-circle" aria-hidden="true"></i> + <span ref="voteCountingTypeHelper"></span> + </p> </div> </div> </div> @@ -334,6 +338,9 @@ this.installBundle(this.session, "poll_settings"); this.form = this.opts.form; + if (!this.form.model.voteCountingType) { + this.form.model.voteCountingType = "1"; + } this.showOptions = this.form.showOptions; this.showHelp = false; @@ -348,8 +355,13 @@ if (!this.form.model.creatorEmail) { this.refs.voteNotification.value = "NEVER"; } + this.updateVoteCountingTypeHelp(); }); + this.updateVoteCountingTypeHelp = () => { + this.refs.voteCountingTypeHelper.innerHTML = this.voteCountingTypes.get(this.form.model.voteCountingType.toString()).helper; + }; + this.updateDisableNotifyMeBeforePollEnds = () => { this.disableNotifyMeBeforePollEnds = !this.form.model.creatorEmail || !this.form.model.votePeriod || !this.refs.endDate.value; this.notifyMeBeforePollEnds &= !this.disableNotifyMeBeforePollEnds; @@ -396,6 +408,7 @@ this.form.model.voteCountingType = e.target.value; this.canLimitNumberOfChoices = this.voteCountingTypes.get(this.form.model.voteCountingType).canLimitNumberOfChoices; this.form.model.limitChoices &= this.canLimitNumberOfChoices; + this.updateVoteCountingTypeHelp(); }; this.toggleNotifyMeBeforePollEnds = e => { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm