[pollen] branch develop updated (ec808fc -> 39d2b51)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See http://git.chorem.org/pollen.git from ec808fc email notification new 76f2f12 update angular version and bootstrap-datetimepicker new 39d2b51 fixes #1064 print message when time of endDate is over The 2 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 39d2b51095432408f52087db72de61465c5c2104 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Aug 25 10:28:40 2014 +0200 fixes #1064 print message when time of endDate is over commit 76f2f1275d1bc127f7875a5f701232c1a472241c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Aug 25 10:28:16 2014 +0200 update angular version and bootstrap-datetimepicker Summary of changes: pollen-ui-angular/bower.json | 12 ++++++------ pollen-ui-angular/src/main/webapp/i18n/en.js | 3 ++- pollen-ui-angular/src/main/webapp/i18n/fr.js | 3 ++- .../src/main/webapp/js/controllers/pollCtrl.js | 5 ++--- .../src/main/webapp/partials/poll-info.html | 22 +++++++++++++++------- 5 files changed, 27 insertions(+), 18 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 develop in repository pollen. See http://git.chorem.org/pollen.git commit 76f2f1275d1bc127f7875a5f701232c1a472241c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Aug 25 10:28:16 2014 +0200 update angular version and bootstrap-datetimepicker --- pollen-ui-angular/bower.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pollen-ui-angular/bower.json b/pollen-ui-angular/bower.json index 0a87674..c7be084 100644 --- a/pollen-ui-angular/bower.json +++ b/pollen-ui-angular/bower.json @@ -9,10 +9,10 @@ "tests" ], "dependencies": { - "angular": "1.2.21", - "angular-route": "1.2.21", - "angular-resource": "1.2.21", - "angular-animate": "1.2.21", + "angular": "1.2.23", + "angular-route": "1.2.23", + "angular-resource": "1.2.23", + "angular-animate": "1.2.23", "angular-translate": "2.0.0", "angular-bootstrap": "0.11.0", "bootstrap": "3.1.1", @@ -21,10 +21,10 @@ "less": "1.7.3", "jqplot-bower": "1.0.8", "moment": "2.8.1", - "bootstrap-datetimepicker": "dralagen/bootstrap-datetimepicker#3.1.0", + "bootstrap-datetimepicker": "dralagen/bootstrap-datetimepicker#3.1.1", "font-awesome": "4.1.0" }, "devDependencies": { - "angular-mocks": "1.2.21" + "angular-mocks": "1.2.23" } } -- 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 develop in repository pollen. See http://git.chorem.org/pollen.git commit 39d2b51095432408f52087db72de61465c5c2104 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Aug 25 10:28:40 2014 +0200 fixes #1064 print message when time of endDate is over --- pollen-ui-angular/src/main/webapp/i18n/en.js | 3 ++- pollen-ui-angular/src/main/webapp/i18n/fr.js | 3 ++- .../src/main/webapp/js/controllers/pollCtrl.js | 5 ++--- .../src/main/webapp/partials/poll-info.html | 22 +++++++++++++++------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/i18n/en.js b/pollen-ui-angular/src/main/webapp/i18n/en.js index 3e37db5..0266ea8 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/en.js +++ b/pollen-ui-angular/src/main/webapp/i18n/en.js @@ -78,7 +78,6 @@ var translateEN = { 'poll.saved' : 'Poll saved.', 'poll.created.printLink' : 'You can modify your poll to using this address when you are not connected: {{url}}', 'poll.cloned' : 'Poll cloned', -'poll.closed' : 'Poll closed', 'poll.deleted' : 'Poll deleted', 'poll.restricted.name' : 'Name', 'poll.restricted.mail' : 'E-mail', @@ -123,6 +122,8 @@ var translateEN = { 'poll.config.value.visibility.creator' : 'Creator', 'poll.config.value.visibility.anonymous' : 'Anonymous', 'poll.config.value.visibility.nobody' : 'Nobody', +'poll.info.closed' : 'Poll is closed', +'poll.info.timeoutVote' : 'Poll is finnish at {{time}}', 'poll.info.beginVote' : 'Start of voting {{time}}', 'poll.info.endVote' : 'End of voting {{time}}', 'poll.info.noEndDate' : 'No End Date is fixed', diff --git a/pollen-ui-angular/src/main/webapp/i18n/fr.js b/pollen-ui-angular/src/main/webapp/i18n/fr.js index 38fcc64..cf577de 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/fr.js +++ b/pollen-ui-angular/src/main/webapp/i18n/fr.js @@ -78,7 +78,6 @@ var translateFR = { 'poll.saved' : 'Sondage sauvegardé', 'poll.created.printLink' : 'Garder le lien suivant pour pouvoir modifier votre sondage plus tard, lorsque vous n\'êtes pas connecté : {{url}}', 'poll.cloned' : 'Sondage cloné', -'poll.closed' : 'Sondage clos', 'poll.deleted' : 'Sondage supprimé', 'poll.restricted.name' : 'Nom du votant', 'poll.restricted.mail' : 'Courriel du votant', @@ -123,6 +122,8 @@ var translateFR = { 'poll.config.value.visibility.creator' : 'Créateur', 'poll.config.value.visibility.anonymous' : 'Anonyme', 'poll.config.value.visibility.nobody' : 'Personne', +'poll.info.closed' : 'Le Sondage est clos', +'poll.info.timeoutVote' : 'Le Sondage est finis le {{time}}', 'poll.info.beginVote' : 'Début des votes {{time}}', 'poll.info.endVote' : 'Fin des votes {{time}}', 'poll.info.noEndDate' : 'Aucune date de fin de vote fixé.', 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 a40b281..dafbc1e 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -353,6 +353,8 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr var poll = $scope.data.poll; var now = new Date(); + $scope.timeOfEndVote = moment(poll.endDate).format('LL'); + $scope.timeToBeginVote = moment(poll.beginDate).fromNow(); $scope.timeToEndVote = {}; @@ -1193,9 +1195,6 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr Page.setTitle('title.poll.vote'); var initPoll = function () { - if ($scope.data.poll.isClosed) { - $rootScope.$broadcast('newWarning', 'poll.closed', -1); - } var pollChoicePromise = PollChoice.query({pollId:$routeParams.pollId}, function (choices) { angular.forEach(choices, function (ch, key) { diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-info.html b/pollen-ui-angular/src/main/webapp/partials/poll-info.html index 6a88165..2b90696 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-info.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-info.html @@ -1,38 +1,46 @@ -<div ng-if="data.poll.beginDate >= now" class="anim"> +<div ng-if="data.poll.isClosed" class="anim"> + <h4 class="text-warning">{{ 'poll.info.closed' | translate }}</h4> +</div> + +<div ng-if="!data.poll.isClosed && data.poll.endDate <= now" class="anim"> + <h4 class="text-warning">{{ 'poll.info.timeoutVote' | translate:{'time':timeOfEndVote} }}</h4> +</div> + +<div ng-if="!data.poll.isClosed && data.poll.beginDate >= now" class="anim"> <h4>{{ 'poll.info.beginVote' | translate:{'time':timeToBeginVote} }}</h4> </div> -<div ng-if="data.poll.endDate && data.poll.beginDate < data.poll.endDate && timeToEndVote.value < 100" class="anim"> +<div ng-if="!data.poll.isClosed && data.poll.endDate && data.poll.beginDate < data.poll.endDate && timeToEndVote.value < 100" class="anim"> <h4>{{ 'poll.info.endVote' | translate:{'time':timeToEndVote.label} }}</h4> <div ng-if="timeToEndVote.value > 0" class="anim"> <progressbar max="100" value="timeToEndVote.value" type="{{timeToEndVote.type}}"></progressbar> </div> </div> -<div ng-if="!data.poll.endDate" class="anim"> +<div ng-if="!data.poll.isClosed && !data.poll.endDate" class="anim"> <h4>{{ 'poll.info.noEndDate' | translate }}</h4> </div> -<div ng-if="data.poll.choiceAddAllowed && data.poll.beginChoiceDate >= now" class="anim"> +<div ng-if="!data.poll.isClosed && data.poll.choiceAddAllowed && data.poll.beginChoiceDate >= now" class="anim"> <h4>{{ 'poll.info.beginAddChoiceAllowed' | translate:{'time':timeToBeginAddChoice} }}</h4> </div> -<div ng-if="data.poll.choiceAddAllowed && timeToAddChoice.value < 100" class="anim"> +<div ng-if="!data.poll.isClosed && data.poll.choiceAddAllowed && timeToAddChoice.value < 100" class="anim"> <h4>{{ 'poll.info.endAddChoiceAllowed' | translate:{'time':timeToAddChoice.label} }}</h4> <div ng-if="timeToAddChoice.value > 0" class="anim"> <progressbar max="100" value="timeToAddChoice.value" type="{{timeToAddChoice.type}}"></progressbar> </div> </div> -<div ng-if="data.poll.choiceAddAllowed && (!data.poll.endChoiceDate || data.poll.endChoiceDate > data.poll.beginDate)" class="anim"> +<div ng-if="!data.poll.isClosed && data.poll.choiceAddAllowed && (!data.poll.endChoiceDate || data.poll.endChoiceDate > data.poll.beginDate)" class="anim"> <h4>{{ 'poll.info.addChoiceAllowed.waring' | translate }}</h4> <p> {{ 'poll.info.addChoiceAllowed.waring.help' | translate }} </p> </div> -<div ng-if="data.poll.limitedVote" class="anim"> +<div ng-if="!data.poll.isClosed && data.poll.limitedVote" class="anim"> <h4>{{ 'poll.info.limitedChoice' | translate:{'nb':data.poll.maxChoiceNumber} }}</h4> </div> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm