branch feature/april updated (861b3dd6 -> ef820b70)
This is an automated email from the git hooks/post-receive script. New change to branch feature/april in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 861b3dd6 refs #233 : Results page is ok \o/ new e5ec0f5b refs #233 : Results on vote page is ok new ef820b70 refs #233 : Votes Table is now ok 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 ef820b701db338b62f55e7d67b5c8960024077c6 Author: jcouteau <couteau@codelutin.com> Date: Thu Jan 10 13:47:10 2019 +0100 refs #233 : Votes Table is now ok commit e5ec0f5be21ef0afceec49deee0993f4d0c2ff1b Author: jcouteau <couteau@codelutin.com> Date: Thu Jan 10 13:26:51 2019 +0100 refs #233 : Results on vote page is ok Summary of changes: .../main/java/org/chorem/pollen/rest/api/v1/VoteApi.java | 2 +- pollen-ui-riot-js/src/main/web/js/Poll.js | 3 ++- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 13 +++++++++---- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 2 +- pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html | 2 +- 5 files changed, 14 insertions(+), 8 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/april in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit e5ec0f5be21ef0afceec49deee0993f4d0c2ff1b Author: jcouteau <couteau@codelutin.com> Date: Thu Jan 10 13:26:51 2019 +0100 refs #233 : Results on vote page is ok --- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 089741f6..e934ad47 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 @@ -205,16 +205,21 @@ this.pollTypeCheckbox = poll2.questions[0].voteCountingTypeValue && poll2.questions[0].voteCountingTypeValue.renderType === "checkbox"; this.pollTypeSelect = poll2.questions[0].voteCountingTypeValue && poll2.questions[0].voteCountingTypeValue.renderType === "select"; this.pollTypeCoombs = poll2.questions[0].voteCountingType && poll2.questions[0].voteCountingType === 7; - this.onVoteChanged(); - this.update(); }); } else { this.pollTypeCheckbox = poll2.questions[0].voteCountingTypeValue && poll2.questions[0].voteCountingTypeValue.renderType === "checkbox"; this.pollTypeSelect = poll2.questions[0].voteCountingTypeValue && poll2.questions[0].voteCountingTypeValue.renderType === "select"; this.pollTypeCoombs = poll2.questions[0].voteCountingType && poll2.questions[0].voteCountingType === 7; - this.onVoteChanged(); - this.update(); } + this.resultsLoaded = poll2.questions[0].results !== undefined; + if (!this.resultsLoaded) { + this.poll.loadResults(poll2.questions[0].id).then(() => { + }); + } + this.onVoteChanged(); + this.update(); + + }; this.listen("poll", this.onPollChange); -- 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/april in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit ef820b701db338b62f55e7d67b5c8960024077c6 Author: jcouteau <couteau@codelutin.com> Date: Thu Jan 10 13:47:10 2019 +0100 refs #233 : Votes Table is now ok --- .../src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java | 2 +- pollen-ui-riot-js/src/main/web/js/Poll.js | 3 ++- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 2 +- pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java index adb3be41..e8cea259 100644 --- a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java +++ b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java @@ -59,7 +59,7 @@ public class VoteApi { @GET public PaginationResultBean<VoteBean> getVotes(@Context VoteService voteService, @PathParam("pollId") PollenEntityId<Poll> pollId, - @PathParam("questionId") PollenEntityId<Poll> questionId, + @PathParam("questionId") PollenEntityId<Question> questionId, @BeanParam PaginationParameterBean paginationParameter) { return voteService.getVotes(pollId.getEntityId(), questionId.getEntityId(), paginationParameter); 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 73094c00..e8bc808f 100644 --- a/pollen-ui-riot-js/src/main/web/js/Poll.js +++ b/pollen-ui-riot-js/src/main/web/js/Poll.js @@ -127,7 +127,8 @@ class Poll { if (this._initPromise) { return voteService.getVotes(this.id, questionId, pagination, this.getPermission()).then((result) => { if (this.voteIsVisible) { - this.voteCount = result.pagination.count; + //TODO JC190110-Should use questionId + this.questions[0].voteCount = result.pagination.count; } return result; }); 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 22e4e859..a9e0443a 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 @@ -69,7 +69,7 @@ </form> <!-- Show votes --> - <VotesTable if="{poll.voteCount > 0}" on-edit-vote={editVote}/> + <VotesTable if="{poll.questions[0] && poll.questions[0].voteCount > 0}" on-edit-vote={editVote}/> </div> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html index e6cfed79..b118c2e3 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/VotesTable.tag.html @@ -114,7 +114,7 @@ }; this.lazyLoad = pagination => { - return this.poll.loadLazyVotes(pagination).then((result) => { + return this.poll.loadLazyVotes(this.poll.questions[0].id, pagination).then((result) => { this.loaded = result.pagination.count > 0; this.update(); return result; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm