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 30e666436ca75b1c171d3397d1814a7ca7013359 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Jun 13 09:50:46 2014 +0200 confrim delete poll --- .../src/main/webapp/js/controllers/pollCtrl.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 879495e..7601924 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -619,10 +619,18 @@ angular.module('pollControllers', []) } $scope.deletePoll = function () { - $scope.data.poll.$remove({permission:$scope.globalVariables.permission}, function() { - $location.path('/'); - }); - } + var confirmMessage; + $translate('action.message.confirmDelete').then(function (msg) { + confirmMessage = msg; + }).then( function () { + var confirmDelete = confirm(confirmMessage); + if (confirmDelete == true) { + $scope.data.poll.$remove({permission:$scope.globalVariables.permission}, function() { + $location.path('/'); + }); + } + }); + }; }]) .controller('PollVoteCtrl', ['$scope', '$q', '$controller', '$routeParams', 'Poll', 'PollChoice', 'PollVote', '$translate', -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm