[pollen] branch develop updated (bd04e9d -> 34a2833)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See http://git.chorem.org/pollen.git from bd04e9d alert can print html, url of vote is now in input new 84eefe6 delete number negatif in voteCounting percentage new 34a2833 cast date to timestamp before send to server 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 34a28335bf93cd0b6679d9b9c649a676b1b9500c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 18:03:03 2014 +0200 cast date to timestamp before send to server commit 84eefe667a281c99483bc50d261c21eda713ace4 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 17:00:35 2014 +0200 delete number negatif in voteCounting percentage Summary of changes: .../src/main/webapp/js/controllers/pollCtrl.js | 26 +++++++++++++++++----- .../votecounting/PercentageVoteCounting.java | 3 +-- 2 files changed, 22 insertions(+), 7 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 http://git.chorem.org/pollen.git commit 84eefe667a281c99483bc50d261c21eda713ace4 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 17:00:35 2014 +0200 delete number negatif in voteCounting percentage --- .../java/org/chorem/pollen/votecounting/PercentageVoteCounting.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java b/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java index b9a1758..5ad1a91 100644 --- a/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java +++ b/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java @@ -72,8 +72,7 @@ public class PercentageVoteCounting extends AbstractVoteCounting<PercentageVoteC @Override public boolean isVoteValueValid(Double voteValue) { - // no validation on not null vote value - return true; + return voteValue == null || 0 <= voteValue && voteValue <= 100; } @Override -- 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 http://git.chorem.org/pollen.git commit 34a28335bf93cd0b6679d9b9c649a676b1b9500c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 18:03:03 2014 +0200 cast date to timestamp before send to server --- .../src/main/webapp/js/controllers/pollCtrl.js | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 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 12e37f3..6e7faa0 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -623,6 +623,13 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr poll.endDate = poll.endDate.getTime(); } + if (angular.isDate(poll.beginChoiceDate)) { + poll.beginChoiceDate = poll.beginChoiceDate.getTime(); + } + if (angular.isDate(poll.endChoiceDate)) { + poll.endChoiceDate = poll.endChoiceDate.getTime(); + } + Poll.add(poll, function (data) { $rootScope.$broadcast('newSuccess', 'poll.saved'); if ($scope.data.poll.pollType != 'FREE') { @@ -994,14 +1001,23 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr }; $scope.savePoll = function () { - if (angular.isDate($scope.data.poll.beginDate)) { - $scope.data.poll.beginDate = $scope.data.poll.beginDate.getTime(); + var savePoll = angular.copy($scope.data.poll); + + if (angular.isDate(savePoll.beginDate)) { + savePoll.beginDate = savePoll.beginDate.getTime(); + } + if (angular.isDate(savePoll.endDate)) { + savePoll.endDate = savePoll.endDate.getTime(); + } + + if (angular.isDate(savePoll.beginChoiceDate)) { + savePoll.beginChoiceDate = savePoll.beginChoiceDate.getTime(); } - if (angular.isDate($scope.data.poll.endDate)) { - $scope.data.poll.endDate = $scope.data.poll.endDate.getTime(); + if (angular.isDate(savePoll.endChoiceDate)) { + savePoll.endChoiceDate = savePoll.endChoiceDate.getTime(); } - $scope.data.poll.$update({permission:$scope.globalVariables.pollToken}, function (data) { + Poll.update({permission:$scope.globalVariables.pollToken}, savePoll, function (data) { $rootScope.$broadcast('newSuccess', 'poll.saved'); }, function (error) { angular.extend($scope.restError, error.data); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm