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 2a8772a2bbb41eefdfe4e61d946c675f8dee2f7b Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 15:15:21 2014 +0200 print alert info with link of my vote admin --- .../src/main/webapp/js/controllers/pollCtrl.js | 24 +++++++++++++++------- .../src/main/webapp/partials/inline-poll.html | 6 +++++- 2 files changed, 22 insertions(+), 8 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 0e44e0c..cc02944 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -30,14 +30,18 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr ['$scope', '$rootScope', '$controller', '$sce', '$timeout', '$routeParams', '$location', 'SessionStorage', '$translate', '$route', '$q', 'Poll', 'PollenResource', 'Page', 'DateFormat', function ( $scope, $rootScope, $controller, $sce, $timeout, $routeParams, $location, SessionStorage, $translate, $route, $q, Poll, PollenResource, Page, DateFormat) { $scope.setTab = function (defaultValue) { - if (angular.isDefined($route.current.params.tab)) { - return $route.current.params.tab; - } - if (angular.isDefined($route.current)) { - var params = $route.current.$$route.originalPath.split('/'); - return params[2]; + if (angular.isDefined($route.current.params.tab)) { + return $route.current.params.tab; + } + + if (angular.isDefined($route.current.$$route) + && angular.isDefined($route.current.$$route.originalPath)) { + var params = $route.current.$$route.originalPath.split('/'); + + return params[2]; + } } if (angular.isDefined(defaultValue)) { @@ -1105,11 +1109,17 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $scope.data.vote.id = returnRequest.id; $scope.data.vote.permission = returnRequest.permission; + angular.forEach($scope.data.vote.choice, function (choice) { + if (choice.voteValue == "") { + delete choice.voteValue; + } + }); + $scope.data.votants.push(angular.copy($scope.data.vote)); $rootScope.$broadcast('newSuccess', 'vote.added'); initVote(); - $rootScope.$on('newInfo', $scope.globalVariables.baseUrl+'#/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission, -1); + $rootScope.$broadcast('newInfo', $scope.globalVariables.baseUrl+'#/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission, -1); $location.url('/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission); }, function (error) { if (angular.isDefined(error.data["voter.name"])) { 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 9137fa3..ebef8ae 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -86,7 +86,11 @@ <!-- begin print vote --> <tr ng-repeat="vote in data.votants track by $index" class="pollAnim"> <td class="pollChoice"> {{vote.voterName}}</td> - <td ng-repeat="choice in vote.choice" class="pollChoice" ng-class="{voteTrue:choice.voteValue != null, voteFalse:(choice.voteValue == null || (choice.voteValue == false && data.voteCountingType.renderType == 'checkbox'))}"> + <td ng-repeat="choice in vote.choice" + class="pollChoice" + ng-class="{ + voteTrue:choice.voteValue != null, + voteFalse:(choice.voteValue == null || (choice.voteValue == false && data.voteCountingType.renderType == 'checkbox'))}"> <div ng-show="data.voteCountingType.renderType == 'checkbox'"> <input type="checkbox" ng-model="choice.voteValue" disabled /> </div> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.