branch feature/display_nice_tooltips updated (55ff3b3d -> e07c3ab7)
This is an automated email from the git hooks/post-receive script. New change to branch feature/display_nice_tooltips in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git omits 55ff3b3d Affichage des tooltip sur la gauche lors du vote omits 76b60c3b Ajout de la possibilité d'afficher des Tooltips sur le composant ChoiceView adds 3d2d2a53 Singularisation de termes adds 070a5c22 fixes #184 Wrong display of yes/no votes adds 16365cc6 Plus grandes miniatures (quasi illisible avant modif) adds eff81bf5 Utilisation d'unité relatives adds 91d0b0c8 Merge branch 'feature/taille_des_images' into 'develop' new c508eda4 Ajout de la possibilité d'afficher des Tooltips sur le composant ChoiceView new e07c3ab7 Affichage des tooltip sur la gauche lors du vote This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (55ff3b3d) \ N -- N -- N refs/heads/feature/display_nice_tooltips (e07c3ab7) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 2 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 e07c3ab7a8abf51366eba271d439a224f4c52977 Author: Arnaud Thimel <thimel@codelutin.com> Date: Tue Jan 2 17:58:04 2018 +0100 Affichage des tooltip sur la gauche lors du vote commit c508eda4904c430f8ceddfe2267188240e6c971a Author: Arnaud Thimel <thimel@codelutin.com> Date: Tue Jan 2 17:57:46 2018 +0100 Ajout de la possibilité d'afficher des Tooltips sur le composant ChoiceView Summary of changes: pollen-ui-riot-js/src/main/web/i18n/en.json | 12 ++++++------ pollen-ui-riot-js/src/main/web/i18n/fr.json | 10 +++++----- pollen-ui-riot-js/src/main/web/tag/poll/ChoiceView.tag.html | 3 ++- pollen-ui-riot-js/src/main/web/tag/poll/Results.tag.html | 2 +- pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html | 10 +++++++--- .../main/web/tag/voteCountingType/BordaDetailResult.tag.html | 2 +- .../web/tag/voteCountingType/CoombsDetailResult.tag.html | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) -- 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/display_nice_tooltips in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit c508eda4904c430f8ceddfe2267188240e6c971a Author: Arnaud Thimel <thimel@codelutin.com> Date: Tue Jan 2 17:57:46 2018 +0100 Ajout de la possibilité d'afficher des Tooltips sur le composant ChoiceView --- pollen-ui-riot-js/package.json | 3 +- pollen-ui-riot-js/src/main/web/css/main.css | 90 +++++++++++++++++++++- .../src/main/web/tag/poll/ChoiceView.tag.html | 9 +++ 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/pollen-ui-riot-js/package.json b/pollen-ui-riot-js/package.json index de44ac51..797ba568 100644 --- a/pollen-ui-riot-js/package.json +++ b/pollen-ui-riot-js/package.json @@ -52,6 +52,7 @@ "qrcode-generator": "^1.3.0", "remarkable": "^1.7.1", "riot": "^3.6.1", - "riot-route": "^3.1.2" + "riot-route": "^3.1.2", + "tooltip.js":"^1.1.7" } } 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 41769f89..8d7aefcc 100644 --- a/pollen-ui-riot-js/src/main/web/css/main.css +++ b/pollen-ui-riot-js/src/main/web/css/main.css @@ -490,4 +490,92 @@ pollenfooter a:hover { .u-highest { z-index: 100; -} \ No newline at end of file +} + +/* Tooltips */ + +.tooltip { + position: absolute; + background: #343A40; + color: #FFFFFF; + width: 300px; + border-radius: 4px; + box-shadow: 0 0 2px rgba(0,0,0,0.5); + padding: 10px; + text-align: center; + font-size: .9em; +} +.style5 .tooltip { + background: #1E252B; + color: #FFFFFF; + max-width: 200px; + width: auto; + font-size: .8rem; + padding: .5em 1em; +} +.tooltip .tooltip-arrow { + width: 0; + height: 0; + border-style: solid; + position: absolute; + margin: 5px; +} + +.tooltip .tooltip-arrow { + border-color: #343A40; +} +.style5 .tooltip .tooltip-arrow { + border-color: #1E252B; +} +.tooltip[x-placement^="top"] { + margin-bottom: 5px; +} +.tooltip[x-placement^="top"] .tooltip-arrow { + border-width: 5px 5px 0 5px; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + bottom: -5px; + left: calc(50% - 5px); + margin-top: 0; + margin-bottom: 0; +} +.tooltip[x-placement^="bottom"] { + margin-top: 5px; +} +.tooltip[x-placement^="bottom"] .tooltip-arrow { + border-width: 0 5px 5px 5px; + border-left-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + top: -5px; + left: calc(50% - 5px); + margin-top: 0; + margin-bottom: 0; +} +.tooltip[x-placement^="right"] { + margin-left: 5px; +} +.tooltip[x-placement^="right"] .tooltip-arrow { + border-width: 5px 5px 5px 0; + border-left-color: transparent; + border-top-color: transparent; + border-bottom-color: transparent; + left: -5px; + top: calc(50% - 5px); + margin-left: 0; + margin-right: 0; +} +.tooltip[x-placement^="left"] { + margin-right: 5px; +} +.tooltip[x-placement^="left"] .tooltip-arrow { + border-width: 5px 0 5px 5px; + border-top-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + right: -5px; + top: calc(50% - 5px); + margin-left: 0; + margin-right: 0; +} diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/ChoiceView.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/ChoiceView.tag.html index 4443ca0a..bd06f05e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/ChoiceView.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/ChoiceView.tag.html @@ -94,6 +94,7 @@ require("../components/MultiLineLabel.tag.html"); <script type="es6"> this.session = require("../../js/Session"); this.resourceService = require("../../js/ResourceService"); + let Tooltip = require("tooltip.js"); this.installBundle(this.session, "choice"); this.showModalImage = false; @@ -125,6 +126,14 @@ require("../components/MultiLineLabel.tag.html"); } }; + if (this.opts.tooltipPlacement) { + this.on('mount', function(){ + // On a besoin du premier div (.choice-view) car ça ne fonctionne pas sur le composant directement + let elem = this.root.children[0]; + let tooltip = new Tooltip.default(elem, {placement: this.opts.tooltipPlacement}); + }); + } + this.listen("escape", this.onEscape); </script> -- 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/display_nice_tooltips in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit e07c3ab7a8abf51366eba271d439a224f4c52977 Author: Arnaud Thimel <thimel@codelutin.com> Date: Tue Jan 2 17:58:04 2018 +0100 Affichage des tooltip sur la gauche lors du vote --- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html index 3f670177..06f17118 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html @@ -50,7 +50,7 @@ <div each={choice, index in poll.choices} class="choice separator-top"> <div class="choice-vote separator-right"> <div class="choice-value"> - <ChoiceView choice={choice} center="true"></ChoiceView> + <ChoiceView choice={choice} center="true" tooltip-placement="left"></ChoiceView> </div> <div class="current-choice" if={poll.canVote || voteInEdition}> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm