[pollen] branch feature/waitResourceBeforeSave updated (7cbcdac -> 9e27696)
This is an automated email from the git hooks/post-receive script. New change to branch feature/waitResourceBeforeSave in repository pollen. See http://git.chorem.org/pollen.git from 7cbcdac wait send resource before save choice and add icon loader new 9e27696 show error when no resource has send The 1 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 9e27696cbf53550f606f5630f81d8d19003d97f4 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 21 16:19:29 2014 +0200 show error when no resource has send Summary of changes: pollen-ui-angular/src/main/webapp/i18n/en.js | 1 + pollen-ui-angular/src/main/webapp/i18n/fr.js | 5 +++-- .../src/main/webapp/js/controllers/pollCtrl.js | 14 +++++++++++--- 3 files changed, 15 insertions(+), 5 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 feature/waitResourceBeforeSave in repository pollen. See http://git.chorem.org/pollen.git commit 9e27696cbf53550f606f5630f81d8d19003d97f4 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 21 16:19:29 2014 +0200 show error when no resource has send --- pollen-ui-angular/src/main/webapp/i18n/en.js | 1 + pollen-ui-angular/src/main/webapp/i18n/fr.js | 5 +++-- .../src/main/webapp/js/controllers/pollCtrl.js | 14 +++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/i18n/en.js b/pollen-ui-angular/src/main/webapp/i18n/en.js index 1dafd4f..8ba71b5 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/en.js +++ b/pollen-ui-angular/src/main/webapp/i18n/en.js @@ -98,6 +98,7 @@ var translateEN = { 'poll.config.value.visibility.creator' : 'Creator', 'poll.config.value.visibility.anonymous' : 'Anonymous', 'poll.config.value.visibility.nobody' : 'Nobody', +'poll.error.noResource' : 'No resource has send', 'poll.error.listEmpty' : 'No poll find', 'vote.added' : 'Vote added.', diff --git a/pollen-ui-angular/src/main/webapp/i18n/fr.js b/pollen-ui-angular/src/main/webapp/i18n/fr.js index bdb25c6..fb3ff29 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/fr.js +++ b/pollen-ui-angular/src/main/webapp/i18n/fr.js @@ -75,8 +75,8 @@ var translateFR = { 'poll.result.choice' : 'Choix', 'poll.result.score' : 'Score', 'poll.result.title.zero' : 'Aucun Résultat', -'poll.result.title.one' : 'Résultat : Un votant', -'poll.result.title.other' : 'Résultat : {{nbVoter}} Votants', +'poll.result.title.one' : 'Résultat : Un votant', +'poll.result.title.other' : 'Résultat : {{nbVoter}} Votants', 'poll.config.title.poll' : 'Configuration globale', 'poll.config.title.choice' : 'Configuration des choix', 'poll.config.title.vote' : 'Configuration des votes', @@ -98,6 +98,7 @@ var translateFR = { 'poll.config.value.visibility.creator' : 'Créateur', 'poll.config.value.visibility.anonymous' : 'Anonyme', 'poll.config.value.visibility.nobody' : 'Personne', +'poll.error.noResource' : 'Aucune ressource a envoyer', 'poll.error.listEmpty' : 'Aucun sondage trouvé', 'vote.added' : 'Vote effectué', 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 395eee8..8b66601 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -310,8 +310,8 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr }]) -.controller('PollAdminCtrl', ['$scope', '$controller', '$modal', '$timeout', '$routeParams', 'Poll', - function ($scope, $controller, $modal, $timeout, $routeParams, Poll) { +.controller('PollAdminCtrl', ['$scope', '$rootScope', '$controller', '$modal', '$timeout', '$routeParams', 'Poll', + function ($scope, $rootScope, $controller, $modal, $timeout, $routeParams, Poll) { $controller('PollCtrl', {$scope:$scope}); $scope.tab = $scope.setTab('edit'); @@ -476,7 +476,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr delete choiceEdit.choiceValue.id; choiceEdit.choiceType = 'RESOURCE'; - if (angular.isDefined(choice.choiceValueImage)) { + try { choice.choiceValueImage.promise.$promise.then(function () { if (angular.isUndefined(resourceOldId) || @@ -492,6 +492,14 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr choiceEdit.choiceValue.id = resourceOldId; } }); + + choiceEdit.choiceValue = {meta: choice.choiceValueImage.meta}; + } + catch (e) { + $rootScope.$broadcast('newError', 'poll.error.noResource'); + + choiceEdit.choiceValue.id = resourceOldId; + choiceEdit.choiceType = oldChoiceType; } } }); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm