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 0bb01354c5b6a360820443b86f217978b6c6fde6 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Aug 1 15:48:39 2014 +0200 delete callBack for popup choice --- .../src/main/webapp/js/controllers/pollCtrl.js | 28 ++++++++++------------ .../src/main/webapp/partials/inline-poll.html | 2 +- 2 files changed, 14 insertions(+), 16 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 e1e4241..1c8e103 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -367,15 +367,15 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr if (angular.isDefined($scope.restError)) { delete $scope.restError.choice; } - popupChoice(choice, 'Ajout d\'un Choix', $scope.callBackAddChoice); + popupChoice(choice, 'Ajout d\'un Choix'); } $scope.editChoice = function (choice) { - popupChoice(choice, 'Edition du Choix', $scope.callBackEditChoice); + popupChoice(choice, 'Edition du Choix'); } - $scope.callBackAddChoice = function (choice) { + $scope.saveAddChoice = function (choice) { if (angular.isDefined($routeParams.pollId)) { var saveChoice = angular.copy(choice); @@ -391,9 +391,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr // add null in vote angular.forEach($scope.data.votants, function (voter) { - if (voter != $scope.data.vote) { - voter.choice.push({choiceId: data.id, voteValue : $scope.getVoteValue(null)}); - } + voter.choice.push({choiceId: data.id, voteValue : $scope.getVoteValue(null)}); }); $rootScope.$broadcast('newSuccess', 'poll.saved'); @@ -403,7 +401,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr } } - $scope.callBackEditChoice = function (choice) { + $scope.saveEditChoice = function (choice) { if (angular.isDefined($routeParams.pollId)) { var saveChoice = angular.copy(choice); @@ -449,18 +447,18 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $scope.saveChoice = function (choice) { if (angular.isDefined(choice)) { if (angular.isDefined(choice.id) && choice.id != null) { - $scope.callBackEditChoice(choice); + $scope.saveEditChoice(choice); } else { - $scope.callBackAddChoice(choice); + $scope.saveAddChoice(choice); } } } - var popupChoice = function (choiceEdit, title, callBack) { + var popupChoice = function (choiceEdit, title) { var choice = angular.copy(choiceEdit); - var modalCallBack = function (choiceEdit, choice, callBack) { + var modalCallBack = function (choiceEdit, choice) { if (! angular.equals(choiceEdit.choiceValue, choice.choiceValue) || choiceEdit.choiceType != choice.choiceType @@ -471,7 +469,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr choiceEdit.choiceType = choice.choiceType; choiceEdit.description = choice.description; - callBack(choiceEdit); + $scope.saveChoice(choiceEdit); } } @@ -510,13 +508,13 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr if (choice.choiceType == 'TEXT') { choice.choiceValue = choice.choiceValueText; - modalCallBack(choiceEdit, choice, callBack) + modalCallBack(choiceEdit, choice); } else if (choice.choiceType == 'DATE') { choice.choiceValue = choice.choiceValueDate; $scope.globalVariables.lastDate = new Date(choice.choiceValueDate); - modalCallBack(choiceEdit, choice, callBack) + modalCallBack(choiceEdit, choice); } else if (choice.choiceType == 'RESOURCE') { var resourceOldId = angular.copy(choiceEdit.choiceValue.id); @@ -535,7 +533,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr choice.choiceValue = choice.choiceValueImage; - modalCallBack(choiceEdit, choice, callBack) + modalCallBack(choiceEdit, choice) } else { choiceEdit.choiceValue.id = resourceOldId; diff --git a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html index 844240d..dc36e4b 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -83,7 +83,7 @@ <!-- end input vote --> <!-- begin print vote --> - <tr ng-repeat="vote in data.votants track by $index" class="pollAnim"> + <tr ng-show="!globalVariables.editMode" ng-repeat="vote in data.votants track by $index" class="pollAnim"> <td class="pollChoice"> <div class="text-muted" ng-hide="vote.onEdit"> {{vote.voterName}} -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.