This is an automated email from the git hooks/post-receive script. New commit to branch feature/addBuilder in repository pollen. See http://git.chorem.org/pollen.git commit d1be9fad882497b08fa63ba24541ef986bb34043 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Jun 13 14:28:57 2014 +0200 Optimize get Result of poll --- .../src/main/webapp/js/controllers/pollCtrl.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 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 7601924..c3d2c18 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -902,19 +902,10 @@ angular.module('pollControllers', []) var votesPromise = PollVote.query({pollId:$routeParams.pollId}, function (votes) { $scope.data.votants = votes; - angular.forEach($scope.data.votants, function (vote) { - angular.forEach(vote.choice, function (choice) { - if (choice.voteValue != null && choice.voteValue != 0.0) { - choice.voteValue = true; - } - else { - choice.voteValue = false; - } - }) - }) + $scope.data.result.nbVotant = $scope.data.votants.length; }).$promise; - $q.all([choicesPromise, votesPromise]).then(function () { + choicesPromise.then(function () { Poll.result({pollId:$routeParams.pollId}, function (result) { $scope.data.result = result; angular.forEach(result.scores, function(value, key) { @@ -925,7 +916,6 @@ angular.module('pollControllers', []) } } }) - $scope.data.result.nbVotant = $scope.data.votants.length; }); }); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm