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 6cea7d1705bb8124b4899fc75a4734dc52d26664 Author: Kevin Morin <morin@codelutin.com> Date: Thu Sep 7 17:37:30 2017 +0200 fixes #139 Les sauts de ligne ne sont pas affihés dans les descriptions --- pollen-ui-riot-js/src/main/web/css/main.css | 4 ++++ .../src/main/web/tag/components/MultiLineLabel.tag.html | 17 +++++++++++++++++ pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html | 2 +- .../src/main/web/tag/poll/ChoiceView.tag.html | 7 +++++-- .../src/main/web/tag/poll/Comments.tag.html | 3 ++- pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html | 3 ++- .../src/main/web/tag/poll/Summary.tag.html | 7 ++++++- 7 files changed, 37 insertions(+), 6 deletions(-) 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 59c2433c..6b1dbfaf 100644 --- a/pollen-ui-riot-js/src/main/web/css/main.css +++ b/pollen-ui-riot-js/src/main/web/css/main.css @@ -477,4 +477,8 @@ pollenfooter a:hover { .align-center { text-align: center; + } + + .italic { + font-style: italic; } \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/tag/components/MultiLineLabel.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/MultiLineLabel.tag.html new file mode 100644 index 00000000..b887b17f --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/tag/components/MultiLineLabel.tag.html @@ -0,0 +1,17 @@ +<MultiLineLabel> + + <span ref="label"></span> + + <script> + this.on("mount", () => { + let labelText; + if (this.opts.label) { + labelText = this.opts.label; + } else { + labelText = ""; + } + this.refs.label.innerText = labelText; + }); + </script> + +</MultiLineLabel> \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html index c8b0ca42..479195fe 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html @@ -114,7 +114,7 @@ require("../components/time-picker.tag.html"); this.originalFile = this.opts.choice.choiceType === "RESOURCE" ? this.opts.choice.choiceValue : null; this.hasNewFile = false; this.valueText = this.opts.choice.choiceType === "TEXT" ? this.opts.choice.choiceValue : null; - this.showDescription = false; + this.showDescription = this.opts.choice.description; if (this.opts.choice.choiceType.startsWith("DATE")) { this.date = { 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 5389dadc..4fc044b3 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 @@ -1,4 +1,5 @@ require("./Report.tag.html"); +require("../components/MultiLineLabel.tag.html"); <ChoiceView> <div class="choice-view {center-choice : opts.center} {with-info : opts.choice.choiceType === 'RESOURCE' || opts.choice.description && !opts.showdescription}" @@ -27,7 +28,9 @@ require("./Report.tag.html"); <div if={opts.choice.choiceType === "RESOURCE" || opts.choice.description && !opts.showdescription} class="info-label"> <i class="fa fa-question-circle" aria-hidden="true"></i> </div> - <span if="{opts.choice.description && opts.showdescription}"> : <em>{opts.choice.description}</em></span> + <span if="{opts.choice.description && opts.showdescription}"> : + <MultiLineLabel class="italic" label="{opts.choice.description}"></MultiLineLabel> + </span> </div> <Report target="{opts.choice}" if="{!opts.hidereport}"/> @@ -62,7 +65,7 @@ require("./Report.tag.html"); </div> </header> <div class="c-card__body"> - {opts.choice.description} + <MultiLineLabel label="{opts.choice.description}"></MultiLineLabel> </div> </div> </div> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html index 065c123e..fa9d5058 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html @@ -1,6 +1,7 @@ require("../Pagination.tag.html"); require("../components/LetterAvatar.tag.html"); require("../components/HumanInput.tag.html"); +require("../components/MultiLineLabel.tag.html"); require("./Report.tag.html"); <Comments> @@ -117,7 +118,7 @@ require("./Report.tag.html"); </div> <div class="comment-text"> <div class="text"> - {element.text} + <MultiLineLabel label="{element.text}"></MultiLineLabel> </div> </div> </div> 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 49d60cfa..0a562b92 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 @@ -4,6 +4,7 @@ require("./Results.tag.html"); require("./Choices.tag.html"); require("./Settings.tag.html"); require("../popup/QrCodeButton.tag.html"); +require("../components/MultiLineLabel.tag.html"); require("./Report.tag.html"); <Poll> @@ -117,7 +118,7 @@ require("./Report.tag.html"); <div class="poll-description left-icon" if="{poll.description}"> <i class="fa fa-info-circle"></i> - <p>{poll.description}</p> + <p><MultiLineLabel label="{poll.description}"></MultiLineLabel></p> </div> <Votes if={selectedTab === "votes"}/> 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 0e38a057..b8fff13f 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 @@ -1,6 +1,7 @@ require("./Choices.tag.html"); require("./Settings.tag.html"); require("../popup/QrCodeButton.tag.html"); +require("../components/MultiLineLabel.tag.html"); <Summary> @@ -11,7 +12,11 @@ require("../popup/QrCodeButton.tag.html"); {opts.form.model.title} </h2> - <p><em>{opts.form.model.description}</em></p> + <p if="{opts.form.model.description}"> + <MultiLineLabel class="italic" + label="{opts.form.model.description}"> + </MultiLineLabel> + </p> <div if="{opts.form.model.voteCountingTypeValue}"> {__.voteCountingType} : -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.