01/02: edit title, reload page for new cloned poll
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 f34304bb84b757ab31900103bdb1295ecc09a5b0 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Wed Jul 2 10:18:58 2014 +0200 edit title, reload page for new cloned poll --- .../src/main/java/org/chorem/pollen/services/service/PollService.java | 2 ++ pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java index a33d04c..ffdbf77 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java @@ -229,6 +229,8 @@ public class PollService extends PollenServiceSupport { clonedPoll.setBeginChoiceDate(null); clonedPoll.setEndChoiceDate(null); + clonedPoll.setTitle(clonedPoll.getTitle() + " (clone)"); + List<ChoiceBean> clonedChoices = getChoiceService().getChoices(pollId); for (ChoiceBean choice : clonedChoices) { choice.setEntityId(null); 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 09c8e9e..fc54416 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -239,9 +239,9 @@ angular.module('pollControllers', []) $scope.clonePoll = function () { if (angular.isDefined($scope.data.poll.id)) { Poll.clone({pollId: $scope.data.poll.id, permission: $scope.globalVariables.pollToken}, {}, function (data) { - console.log(data); $rootScope.$broadcast('newSuccess', 'poll.cloned'); $location.url('/poll/edit/'+data.id); + $route.reload(); }); } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm