branch develop updated (5733f5e4 -> d9a84856)
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 5733f5e4 correction petit erreur UI et méthode de Coombs new d9a84856 fixes #89 on ne recharge pas le sondage si l'utilisateur ne change pas (c'est ce qui femrait l'ecran de connexion) 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 d9a8485646d93afa9ee50a62f7aae70f19bc4f11 Author: Kevin Morin <morin@codelutin.com> Date: Thu Aug 3 15:46:26 2017 +0200 fixes #89 on ne recharge pas le sondage si l'utilisateur ne change pas (c'est ce qui femrait l'ecran de connexion) Summary of changes: pollen-ui-riot-js/src/main/web/js/Session.js | 18 +++++++++++------- .../src/main/web/tag/PollenHeader.tag.html | 7 ++----- pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html | 6 ++++-- .../src/main/web/tag/poll/Results.tag.html | 6 ++++-- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 8 +++++--- 5 files changed, 26 insertions(+), 19 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 develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit d9a8485646d93afa9ee50a62f7aae70f19bc4f11 Author: Kevin Morin <morin@codelutin.com> Date: Thu Aug 3 15:46:26 2017 +0200 fixes #89 on ne recharge pas le sondage si l'utilisateur ne change pas (c'est ce qui femrait l'ecran de connexion) --- pollen-ui-riot-js/src/main/web/js/Session.js | 18 +++++++++++------- .../src/main/web/tag/PollenHeader.tag.html | 7 ++----- pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html | 6 ++++-- .../src/main/web/tag/poll/Results.tag.html | 6 ++++-- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 8 +++++--- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/js/Session.js b/pollen-ui-riot-js/src/main/web/js/Session.js index 0bcd8e4c..bd294085 100644 --- a/pollen-ui-riot-js/src/main/web/js/Session.js +++ b/pollen-ui-riot-js/src/main/web/js/Session.js @@ -76,8 +76,9 @@ class Session { this.datetimeInputSupported = (input.value !== notADateValue); bus.on("unauthorize", () => { + var oldUser = this.user; this.user = null; - bus.trigger("user", this.user); + bus.trigger("user", this.user, oldUser); }); } @@ -88,8 +89,9 @@ class Session { updateUser() { if (this.isConnected()) { this.connect().then(user => { + var oldUser = this.user; this.user = user; - bus.trigger("user", user); + bus.trigger("user", user, oldUser); }); } } @@ -134,26 +136,28 @@ class Session { return authService.userPromise(auth).then((user) => { if (!user) { logger.info("SignIn error"); + var oldUser = this.user; this.user = null; - bus.trigger("user", this.user); + bus.trigger("user", this.user, oldUser); return Promise.reject(); } logger.info("SignIn user::"); logger.info(user); pageTracker.trackLogin(); + var oldUser = this.user; this.user = user; - bus.trigger("user", this.user); + bus.trigger("user", this.user, oldUser); + return this.user; }); - }); - } signOut() { return authService.signOut().then(() => { + var oldUser = this.user; this.user = null; - bus.trigger("user", this.user); + bus.trigger("user", this.user, oldUser); return this.user; }); } diff --git a/pollen-ui-riot-js/src/main/web/tag/PollenHeader.tag.html b/pollen-ui-riot-js/src/main/web/tag/PollenHeader.tag.html index 14e3003e..3dbdf8e9 100644 --- a/pollen-ui-riot-js/src/main/web/tag/PollenHeader.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/PollenHeader.tag.html @@ -79,11 +79,8 @@ require("./popup/FeedbackModal.tag.html"); }; this.signOut = () => { - let callback = () => { - route("home"); - }; - session.signOut().then(callback, callback); - + route("home"); + session.signOut(); }; 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 0ec44ba2..b1cea547 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 @@ -147,8 +147,10 @@ require("./Report.tag.html"); route("/"); }); - this.listen("user", () => { - this.poll.reloadPoll().then(() => {}, () =>{}); + this.listen("user", (user, oldUser) => { + if (user != oldUser) { + this.poll.reloadPoll().then(() => {}, () =>{}); + } }); this.closePoll = (e) => { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Results.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Results.tag.html index 70dfb1e6..1410c03e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Results.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Results.tag.html @@ -52,8 +52,10 @@ require("../voteCountingType/CoombsDetailResult.tag.html"); this.listen("poll", this.onPollChange); this.listen("user", () => { - this.poll.loadResults(); - this.update(); + if (user != oldUser) { + this.poll.loadResults(); + this.update(); + } }); </script> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html index 68625f60..29e86fba 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html @@ -209,9 +209,11 @@ require("../components/HumanInput.tag.html"); }; this.listen("poll", this.onPollChange); - this.listen("user", () => { - this.poll.loadVotes(); - this.update(); + this.listen("user", (user, oldUser) => { + if (user != oldUser) { + this.poll.loadVotes(); + this.update(); + } }); this.voteInEdition = null; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm