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 80383cf1286b286f8744962339c8d5e9da50d268 Author: Kevin Morin <morin@codelutin.com> Date: Tue Sep 12 19:29:36 2017 +0200 fixes #136 Méthode de vote pluis explicite --- .../src/main/web/help/voteCountingTypes-en.html | 10 ++++++++++ .../src/main/web/help/voteCountingTypes-fr.html | 10 ++++++++++ .../src/main/web/tag/poll/Settings.tag.html | 21 ++++++++++++++++++++- pollen-ui-riot-js/webpack.config.js | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-en.html b/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-en.html new file mode 100644 index 00000000..fe504edd --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-en.html @@ -0,0 +1,10 @@ +<p> + Pour mieux comprendre les différents types de scrutin, nous vous conseillons de regarder cette petite vidéo <em>Monsieur le président, avez-vous vraiment gagné cette élection ?</em> réalisée par <em>La statistique expliquée à mon chat</em> : +</p> +<div style="margin: 10px auto;"> + <video controls id="voteCountingTypesHelpVideo"> + <source src="/help/voteCountingType/voteCountingTypes.webm" type="video/webm"> + <source src="/help/voteCountingType/voteCountingTypes.mp4" type="video/mp4"> + Votre navigateur ne supporte pas la balise vidéo. Pour la voir, recherchez <em>Monsieur le président, avez-vous vraiment gagné cette élection ?</em> sur votre moteur de recherche. + </video> +</div> \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-fr.html b/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-fr.html new file mode 100644 index 00000000..b77df1eb --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/help/voteCountingTypes-fr.html @@ -0,0 +1,10 @@ +<p> + Pour mieux comprendre les différents types de scrutin, nous vous conseillons de regarder cette petite vidéo <em>Monsieur le président, avez-vous vraiment gagné cette élection ?</em> réalisée par <em>La statistique expliquée à mon chat</em> : +</p> +<div style="margin: 10px auto;"> + <video controls id="voteCountingTypesHelpVideo"> + <source src="/help/voteCountingTypes.webm" type="video/webm"/> + <source src="/help/voteCountingTypes.mp4" type="video/mp4"/> + Votre navigateur ne supporte pas la balise vidéo. Pour la voir, recherchez <em>Monsieur le président, avez-vous vraiment gagné cette élection ?</em> sur votre moteur de recherche. + </video> +</div> \ No newline at end of file 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 41456b7e..91e296ad 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 @@ -67,7 +67,11 @@ require("../components/date-time-picker.tag.html"); <div class="settings-options-row"> <div class="form-section"> - <h4><i class="fa fa-cog"></i> {__.nav_voteCountingType}</h4> + <h4> + <i class="fa fa-cog"></i> + {__.nav_voteCountingType} + <i class="info-label fa fa-question-circle" aria-hidden="true" onclick="{toggleVoteCountingTypeHelp}"></i> + </h4> <div class="o-form-element select-or-radio"> <fieldset class="o-fieldset choice-radio" disabled={form.hasVotes || opts.form.model.closed}> @@ -384,6 +388,21 @@ require("../components/date-time-picker.tag.html"); this.updateVoteCountingTypeHelp(); }); + this.toggleVoteCountingTypeHelp = () => { + fetch("/help/voteCountingTypes-" + this.session.locale + ".html").then(response => { + return response.text(); + }) + .then(content => { + return this.info(this.__.nav_voteCountingType, content, null, "info"); + }).then(() => { + let video = document.getElementById("voteCountingTypesHelpVideo"); + if (video) { + video.pause(); + } + }); + + }; + this.updateVoteCountingTypeHelp = () => { this.refs.voteCountingTypeHelper.innerHTML = this.voteCountingTypes.get(this.form.model.voteCountingType.toString()).helper; this.update(); diff --git a/pollen-ui-riot-js/webpack.config.js b/pollen-ui-riot-js/webpack.config.js index 11ae81fb..842da4d2 100644 --- a/pollen-ui-riot-js/webpack.config.js +++ b/pollen-ui-riot-js/webpack.config.js @@ -37,6 +37,7 @@ module.exports = { return content.toString().replace("POLLEN_API_URL", JSON.stringify(process.env.POLLEN_SERVER_CONTEXT || "http://opensource.brickred.com:8888/pollen-rest-api")); }}, {from: "src/main/web/index.html"}, + {from: "src/main/web/help", to: "help"}, {from: "src/main/web/home", to: "home"}, {from: "src/main/web/robots.txt"}, {from: "src/main/web/img", to: "img"}, -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.