This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit 6bb1d317eec19d2c67efbcfed89695615c0c50d5 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Wed Jul 2 14:42:26 2014 +0200 fix name result for type date --- .../src/main/webapp/js/controllers/pollCtrl.js | 17 ++++++++++++++--- .../src/main/webapp/partials/poll-result.html | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js index ae27703..68baa88 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1116,8 +1116,8 @@ angular.module('pollControllers', []) }]) -.controller('PollResultCtrl', ['$scope', '$q', '$controller', '$routeParams', 'Poll', 'PollChoice', 'PollVote', '$translate', - function ($scope, $q, $controller, $routeParams, Poll, PollChoice, PollVote, $translate) { +.controller('PollResultCtrl', ['$scope', '$q', '$controller', '$routeParams', 'Poll', 'PollChoice', 'PollVote', '$translate', '$filter', + function ($scope, $q, $controller, $routeParams, Poll, PollChoice, PollVote, $translate, $filter) { $controller('PollCtrl', {$scope:$scope}); $scope.translateTitle = { @@ -1157,7 +1157,18 @@ angular.module('pollControllers', []) if ($scope.data.choices[i].id == value.choiceId) { value.choice = $scope.data.choices[i]; - scores.push([value.choice.name, value.scoreValue]); + switch (value.choice.choiceType) { + case 'TEXT': + scores.push([value.choice.name, value.scoreValue]); + break; + + case 'DATE': + scores.push([$filter('date')(value.choice.date, $scope.globalVariables.dateFormat), value.scoreValue]); + break; + + default: + scores.push([key, value.scoreValue]); + } // finish loop i = $scope.data.choices.length; diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-result.html b/pollen-ui-angular/src/main/webapp/partials/poll-result.html index 5277130..dd918ea 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-result.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-result.html @@ -24,7 +24,7 @@ <th>{{ 'poll.result.score' | translate }}</th> </tr> <tr ng-repeat="score in data.result.scores"> - <th> {{score.choice.name}} </th> + <th> {{ score.choice.name || (score.choice.date | date:globalVariables.dateFormat) }} </th> <td> {{score.scoreValue}} </td> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.