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 b5474b149d63e6ca25c9028902c0d63071f58476 Author: Kevin Morin <morin@codelutin.com> Date: Tue Apr 18 17:54:08 2017 +0200 déplacement des traductions dans les tags --- pollen-ui-riot-js/src/main/web/i18n.json | 3 ++- pollen-ui-riot-js/src/main/web/js/Poll.js | 3 --- pollen-ui-riot-js/src/main/web/tag/PollenErrorManager.tag.html | 2 +- pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html | 4 +++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/i18n.json b/pollen-ui-riot-js/src/main/web/i18n.json index 34e36ce..2d4118f 100644 --- a/pollen-ui-riot-js/src/main/web/i18n.json +++ b/pollen-ui-riot-js/src/main/web/i18n.json @@ -2,6 +2,7 @@ "fr": { "pagination_all": "Tous", "pagination_resultsPerPage": "Résultats par page", + "poll_403": "Erreur : le sondage n'est pas accessible", "poll_closePoll": "Clôturer le sondage", "poll_reopenPoll": "Réouvrir le sondage", "poll_deletePoll": "Supprimer le sondage", @@ -356,12 +357,12 @@ "favoriteList_member_ldap_placeholder": "L'adresse de l'annuaire LDAP", "favoriteList_member_add": "Ajouter", "error_manager_403": "Erreur : Accès refusé", - "error_manager_poll_403": "Erreur : le sondage n'est pas accessible", "error_manager_500": "Erreur : Service indisponible" }, "en": { "pagination_all": "All", "pagination_resultsPerPage": "Results per page", + "poll_403": "Error : the poll is not available", "poll_choices": "Choices", "poll_votes": "Votes", "poll_settings": "Settings", diff --git a/pollen-ui-riot-js/src/main/web/js/Poll.js b/pollen-ui-riot-js/src/main/web/js/Poll.js index 0524bc6..b63720f 100644 --- a/pollen-ui-riot-js/src/main/web/js/Poll.js +++ b/pollen-ui-riot-js/src/main/web/js/Poll.js @@ -36,9 +36,6 @@ class Poll { this.results = undefined; bus.trigger("poll", this); return Promise.resolve(this); - }, - (error) => { - bus.trigger("error", new Error("poll_" + error.status)); }); return this._initPromise; diff --git a/pollen-ui-riot-js/src/main/web/tag/PollenErrorManager.tag.html b/pollen-ui-riot-js/src/main/web/tag/PollenErrorManager.tag.html index be3e39a..d5b0d48 100644 --- a/pollen-ui-riot-js/src/main/web/tag/PollenErrorManager.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/PollenErrorManager.tag.html @@ -2,7 +2,7 @@ <div each={error in errors} class="pollen-error" id="{error.id}"> <div class="close-error" onclick="{closeError(error.id)}"><i class="fa fa-times" aria-hidden="true"></i></div> - {_l(error.message)} + {error.message} </div> <style> 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 e18412d..a9ddba5 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 @@ -176,7 +176,9 @@ require("../popup/QrCodeButton.tag.html"); }; this.bus.on("poll", this.onPollChange); - this.poll.init(this.opts.pollId, this.opts.voteId, this.opts.permission); + this.poll.init(this.opts.pollId, this.opts.voteId, this.opts.permission).catch((error) => { + this.bus.trigger("error", new Error(this._l(error.status))); + }); this.closePoll = (e) => { e.preventDefault(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.