branch develop updated (e486b50 -> a0d1a9e)
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 e486b50 raccourcissmeent des libellés new a0d1a9e fixes #52 Add a message panel on top of the screen to display custom messages 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 a0d1a9e1927dfbcd46f5c6db09185a75842bbe16 Author: Kevin Morin <morin@codelutin.com> Date: Fri Apr 14 14:29:46 2017 +0200 fixes #52 Add a message panel on top of the screen to display custom messages Summary of changes: pollen-ui-riot-js/src/main/web/conf.js | 6 ++++- pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html | 31 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) -- 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 a0d1a9e1927dfbcd46f5c6db09185a75842bbe16 Author: Kevin Morin <morin@codelutin.com> Date: Fri Apr 14 14:29:46 2017 +0200 fixes #52 Add a message panel on top of the screen to display custom messages --- pollen-ui-riot-js/src/main/web/conf.js | 6 ++++- pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html | 31 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/conf.js b/pollen-ui-riot-js/src/main/web/conf.js index 1a1424f..5b697ef 100644 --- a/pollen-ui-riot-js/src/main/web/conf.js +++ b/pollen-ui-riot-js/src/main/web/conf.js @@ -11,5 +11,9 @@ window.pollenConf = { defaultDateFormat: "shortDate", defaultTimeFormat: "shortTime", defaultDateTimeFormat: "short", - debugI18n: false + debugI18n: false, + infoMessages: { + fr: ["Pour accéder à vos anciens sondages, allez sur <a href='https://old-pollen.chorem.org'>https://old-pollen.chorem.org</a>."], + en: ["To have access to your previous polls, go to <a href='https://old-pollen.chorem.org'>https://old-pollen.chorem.org</a>."] + } }; diff --git a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html index bae60bc..1438b6f 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html @@ -33,6 +33,7 @@ require("./UserProfile.tag.html"); require("./favoriteList/FavoriteLists.tag.html"); require("./favoriteList/FavoriteList.tag.html"); <Pollen class="body-wrapper"> + <div id="infoMessages"></div> <PollenHeader/> <PollenWaiter parent-id="body-content"/> <div id="body-content" class="body-content"> @@ -47,6 +48,30 @@ require("./favoriteList/FavoriteList.tag.html"); session.start(); this.installBundle(session, "main"); + this.showInfoMessages = (locale) => { + var infoMessages = session.configuration.infoMessages; + if (infoMessages) { + i18nInfoMessages = infoMessages[locale]; + if (i18nInfoMessages) { + var messages = ""; + for (var index in i18nInfoMessages) { + messages += "<div class='infoMessages'>" + i18nInfoMessages[index] + "</div>"; + } + document.getElementById("infoMessages").innerHTML = messages; + } + } + }; + + this.on("mount", () => { + this.showInfoMessages(session.locale); + this.bus.on("locale", this.showInfoMessages); + }); + + this.on("before-unmount", () => { + console.log("um"); + this.bus.off("locale", this.showInfoMessages); + }); + let route = require("riot-route"); route("/poll/create", () => { @@ -187,5 +212,11 @@ require("./favoriteList/FavoriteList.tag.html"); position: relative; } + .infoMessages { + background: #000; + color: #ccc; + padding: 10px; + } + </style> </Pollen> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm