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 de619c576837efa63deb9c3e27ccddbacb4f0399 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Jun 6 14:41:29 2014 +0200 fix résult --- pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js | 4 ++-- pollen-ui-angular/src/main/webapp/js/services.js | 4 ++++ 2 files changed, 6 insertions(+), 2 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 eb3953b..0b2b942 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -572,7 +572,7 @@ angular.module('pollControllers', []) $scope.pageSize = conf.commentDefaultPageSize; $scope.urlPagination = $scope.setUrl(['page', 'pageSize']); - var paginationParameter = {pageSize:$scope.pageSize}; + var paginationParameter = {pageSize:$scope.pageSize, order:'postDate', desc:true}; if (angular.isDefined($routeParams.page)) { if (angular.isDefined($routeParams.pageSize)) { paginationParameter = {pageSize:$routeParams.pageSize}; @@ -664,7 +664,7 @@ angular.module('pollControllers', []) }).$promise; $q.all([choicesPromise, votesPromise]).then(function () { - Poll.get({pollId:$routeParams.pollId, cmd:'results'}, function (result) { + Poll.result({pollId:$routeParams.pollId}, function (result) { $scope.data.result = result; angular.forEach(result.scores, function(value, key) { for (var i = 0; i < $scope.data.choices.length; i++) { diff --git a/pollen-ui-angular/src/main/webapp/js/services.js b/pollen-ui-angular/src/main/webapp/js/services.js index e78438f..be047a0 100644 --- a/pollen-ui-angular/src/main/webapp/js/services.js +++ b/pollen-ui-angular/src/main/webapp/js/services.js @@ -26,6 +26,10 @@ angular.module('pollenServices', ['ngResource']) method : 'GET', url : conf.restURL+'/polls/new' }, + 'result' : { + method : 'GET', + url : conf.restURL+'/polls/:pollId/results' + }, 'add' : { method : 'POST', transformRequest : function (data, headersGetter) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.