r3874 - in trunk/pollen-ui-angular/src/main/webapp: . bundle js partials
Author: kmorin Date: 2014-04-11 18:19:20 +0200 (Fri, 11 Apr 2014) New Revision: 3874 Url: http://forge.chorem.org/projects/pollen/repository/revisions/3874 Log: code improvements Added: trunk/pollen-ui-angular/src/main/webapp/bundle/ trunk/pollen-ui-angular/src/main/webapp/bundle/Messages.properties Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js trunk/pollen-ui-angular/src/main/webapp/js/controllers.js trunk/pollen-ui-angular/src/main/webapp/partials/home.html trunk/pollen-ui-angular/src/main/webapp/partials/poll-form.html Added: trunk/pollen-ui-angular/src/main/webapp/bundle/Messages.properties =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/bundle/Messages.properties (rev 0) +++ trunk/pollen-ui-angular/src/main/webapp/bundle/Messages.properties 2014-04-11 16:19:20 UTC (rev 3874) @@ -0,0 +1,196 @@ +### +# #%L +# Pollen :: UI (JS) +# $Id: Messages.properties 3870 2014-03-12 09:46:22Z kmorin $ +# $HeadURL: https://svn.chorem.org/pollen/trunk/pollen-ui-js/src/main/webapp/bundle/Mess... $ +# %% +# Copyright (C) 2009 - 2013 CodeLutin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# #L% +### +pollen.app.title=Pollen + +#common +pollen.common.cancel=Annuler +pollen.common.validate=Valider +pollen.common.format.date.moment=DD/MM/YYYY +pollen.common.format.dateTime.moment=DD/MM/YYYY HH:mm +pollen.common.format.date.input=dd/MM/yyyy +pollen.common.format.dateTime.input=dd/MM/yyyy hh:mm +pollen.common.format.time=HH:mm +pollen.common.date.from=à partir du {0} +pollen.common.date.fromTo=du {0} au {1} +pollen.common.date.to=jusqu'au {0} + +#poll attributes +pollen.poll.description.label=Description +pollen.poll.description.placeholder=Description +pollen.poll.title.label=Titre +pollen.poll.title.placeholder=Titre +pollen.poll.voteCountingType.label=Type de dépouillement +pollen.poll.creator.name.label=Votre nom +pollen.poll.creator.name.placeholder=Votre nom +pollen.poll.creator.email.label=Votre email +pollen.poll.creator.email.placeholder=Votre email +pollen.poll.choice.name.label=Nom +pollen.poll.choice.name.placeholder=Nom +pollen.poll.choice.description.label=Description +pollen.poll.choice.description.placeholder=Description +pollen.poll.beginDate.label=Date de début +pollen.poll.beginDate.placeholder=Date de début +pollen.poll.endDate.label=Date de fin +pollen.poll.endDate.placeholder=Date de fin +pollen.poll.choiceAddAllowed.label=Autoriser l'ajout de choix +pollen.poll.addChoiceBeginDate.label=Date de début d'ajout de choix +pollen.poll.addChoiceBeginDate.placeholder=Date de début d'ajout de choix +pollen.poll.addChoiceEndDate.label=Date de fin d'ajout de choix +pollen.poll.addChoiceEndDate.placeholder=Date de fin d'ajout de choix +pollen.poll.maxChoiceNumber.label=Nombre limite de choix par vote +pollen.poll.maxChoiceNumber.placeholder=Nombre limite de choix par vote +pollen.poll.maxChoiceNumber.help=Laisser vide ou 0 pour ne pas fixer de limite +pollen.poll.commentVisibility.label=Visibilité des commentaires +pollen.poll.commentVisibility.everybody.label=Publique +pollen.poll.commentVisibility.voter.label=Seulement les votants +pollen.poll.commentVisibility.nobody.label=Aucun commentaires +pollen.poll.voteVisibility.label=Visibilité des votes +pollen.poll.voteVisibility.everybody.label=Publique +pollen.poll.voteVisibility.voter.label=Votants +pollen.poll.voteVisibility.creator.label=Créateur +pollen.poll.voteVisibility.anonymous.label=Anonyme +pollen.poll.anonymousVoteAllowed.label=Vote anonyme +pollen.poll.pollType.label=Qui peut voter ? +pollen.poll.pollType.free.label=Libre +pollen.poll.pollType.restricted.label=Restreint +pollen.poll.pollType.group.label=Groupe +pollen.poll.voter.name.label=Nom +pollen.poll.voter.name.placeholder=Nom +pollen.poll.voter.email.label=Email +pollen.poll.voter.email.placeholder=Email +pollen.poll.voter.weight.label=Poids +pollen.poll.voter.weight.placeholder=Poids +pollen.poll.resultVisibility.label=Visibilité des résultats +pollen.poll.resultVisibility.everybody.label=Publique +pollen.poll.resultVisibility.voter.label=Seulement les votants +pollen.poll.resultVisibility.creator.label=Créateur +pollen.poll.continuousResults.label=Résultats continus + +#choice attributes +pollen.choice.description.label=Description +pollen.choice.description.placeholder=Description +pollen.choice.noDescription=Aucune description +pollen.choice.name.label=Titre +pollen.choice.name.placeholder=Titre +pollen.choice.voteType.normal.label=Normal +pollen.choice.voteType.normal.description=Voter pour le ou les choix préférés. +pollen.choice.voteType.percentage.label=Pourcentage +pollen.choice.voteType.percentage.description=Répartir les choix de manière à obtenir 100% au total. +pollen.choice.voteType.condorcet.label=Condorcet +pollen.choice.voteType.condorcet.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_Condorcet'>Pour en savoir plus</a> +pollen.choice.voteType.number.label=Nombre +pollen.choice.voteType.number.description=La réponse est libre, laissez vide ou entrez un nombre entier +pollen.choice.voteType.borda.label=Borda +pollen.choice.voteType.borda.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_Borda'>Pour en savoir plus</a> +pollen.choice.voteType.alternative.label=Vote alternatif +pollen.choice.voteType.alternative.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Vote_alternatif'>Pour en savoir plus</a> +pollen.choice.voteType.coombs.label=Coombs +pollen.choice.voteType.coombs.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_de_Coombs'>Pour en savoir plus</a> + +#user attributes +pollen.user.email.label=Email +pollen.user.email.placeholder=Email +pollen.user.login.label=Login +pollen.user.login.placeholder=Login +pollen.user.name.label=Nom +pollen.user.name.placeholder=Nom +pollen.user.password.label=Mot de passe +pollen.user.password.placeholder=Mot de passe +pollen.user.repeatPassword.label=Répétez le mot de passe +pollen.user.repeatPassword.placeholder=Répétez le mot de passe + +#menu +pollen.menu.home=Accueil +pollen.menu.polls.label=Sondages +pollen.menu.polls.create=Créer un sondage +pollen.menu.polls.list=Mes sondages +pollen.menu.register=Créer un compte +pollen.menu.login.label=S'identifier +pollen.menu.login.form.login.label=Identifiant +pollen.menu.login.form.login.placeholder=Votre identifiant +pollen.menu.login.form.password.label=Mot de passe +pollen.menu.login.form.password.placeholder=Votre mot de passe +pollen.menu.login.form.rememberMe.label=Rester connecté +pollen.menu.login.form.button=M'identifier +pollen.menu.user.profile=Mon profile +pollen.menu.logout=Déconnexion + +#poll creation form +pollen.poll.form.create.button.save=Créer le sondage +pollen.poll.form.create.button.previous=Précedent +pollen.poll.form.create.button.next=Suivant +pollen.poll.form.create.button.addChoice=Ajouter un choix +pollen.poll.form.create.title=Création de sondage +pollen.poll.form.create.step1=Informations générales +pollen.poll.form.create.step2=Définition des choix +pollen.poll.form.create.step3=Options +pollen.poll.form.create.legend.validityDates=Plage de validité +pollen.poll.form.create.legend.choices=Choix +pollen.poll.form.create.legend.votes=Votes +pollen.poll.form.create.legend.results=Resultats + +#poll lists +pollen.polls.created.title=Sondages créés +pollen.polls.created.empty=Vous n'avez créé aucun sondage + +#poll summary +pollen.poll.summary.title=Sondage \'{0}\' +pollen.poll.summary.linkToVote=Lien pour participer : +pollen.poll.summary.part.export.title=Export +pollen.poll.summary.part.export.item.export=Exporter +pollen.poll.summary.part.poll.title=Sondage +pollen.poll.summary.part.poll.item.close=Clore +pollen.poll.summary.part.poll.item.delete=Supprimer +pollen.poll.summary.part.poll.item.duplicate=Dupliquer +pollen.poll.summary.part.poll.item.edit=Modifier +pollen.poll.summary.part.poll.item.history=Historique +pollen.poll.summary.part.poll.item.notification=Notification +pollen.poll.summary.part.voters.title=Participants +pollen.poll.summary.part.voters.item.invite=Inviter des participants +pollen.poll.summary.part.voters.item.contact=Contacter les invités + +#vote +pollen.vote.poll.author=Sondage lancé par {0} +pollen.vote.poll.closed.alert=<strong>Ce sondage est clos.</strong> Vous ne pouvez plus voter. +pollen.vote.choices.list.title=Propositions +pollen.vote.choices.list.button.addChoice=Ajouter un choix +pollen.vote.votes.list.title=Votes +pollen.vote.votes.list.header.voter=Votant +pollen.vote.form.add.field.userName.placeholder=Votre nom +pollen.vote.form.add.button.vote=Voter +pollen.vote.comments.list.title=Commentaires +pollen.vote.comments.list.button.addComment=Ajouter un commentaire +pollen.vote.comments.add.field.userName.placeholder=Votre nom +pollen.vote.comments.add.field.message.placeholder=Votre commentaire + +#user form +pollen.user.form.edit.title.creation=Enregistrement +pollen.user.form.edit.title.update=Compte utilisateur +pollen.user.form.edit.button.create=Créer le compte +pollen.user.form.edit.button.update=Sauvegarder + +#validation +pollen.validation.required=Le champ est obligatoire +pollen.validation.email.format.error=L''email n''est pas valide +pollen.validation.password.length.error=Le mot de passe doit faire au moins 6 caractères +pollen.validation.passwords.different.error=Les deux mots de passes ne correspondent pas \ No newline at end of file Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-05 18:19:28 UTC (rev 3873) +++ trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-11 16:19:20 UTC (rev 3874) @@ -18,12 +18,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -angular.module('pollen', ["pollenServices"]).config(['$routeProvider', function($routeProvider) { +angular.module('pollen', ["pollenControllers", "pollenServices"]) - $routeProvider.when('/', {templateUrl: 'partials/home.html', controller: HomeCtrl}) - .when('/polls', {templateUrl: 'partials/poll-list.html', controller: PollListCtrl}) - .when('/polls/create', {templateUrl: 'partials/poll-form.html', controller: PollCreationCtrl}) - .when('/polls/:pollId', {templateUrl: 'partials/poll-detail.html', controller: PollDetailCtrl}) +.config(['$routeProvider', function($routeProvider) { + + $routeProvider.when('/', {templateUrl: 'partials/home.html', controller: "HomeCtrl"}) + .when('/polls', {templateUrl: 'partials/poll-list.html', controller: "PollListCtrl"}) + .when('/polls/create', {templateUrl: 'partials/poll-form.html', controller: "PollCreationCtrl"}) + .when('/polls/:pollId', {templateUrl: 'partials/poll-detail.html', controller: "PollDetailCtrl"}) .otherwise({redirectTo: '/'}); }]).config(['$httpProvider', function($httpProvider) { Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers.js =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/js/controllers.js 2014-04-05 18:19:28 UTC (rev 3873) +++ trunk/pollen-ui-angular/src/main/webapp/js/controllers.js 2014-04-11 16:19:20 UTC (rev 3874) @@ -18,11 +18,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -function HomeCtrl($scope, $http) { +angular.module('pollenControllers', []).controller('HomeCtrl', ['$scope', '$http', function ($scope, $http) { -} - -function PollCreationCtrl($scope, $http) { +}]).controller('PollCreationCtrl', ['$scope', '$http', function ($scope, $http) { $http.get('http://localhost:8080/pollen/v1/polls/new?choiceType=TEXT').success(function(data) { data.choices = [{}, {}]; $scope.poll = data; @@ -40,15 +38,13 @@ $scope.addChoice = function() { $scope.poll.choices.push({}); } -} -function PollListCtrl($scope, $http) { +}]).controller('PollListCtrl', ['$scope', '$http', function ($scope, $http) { $http.get('http://localhost:8080/pollen/v1/polls').success(function(data) { $scope.polls = data; }); -} -function PollDetailCtrl($scope, $http, $routeParams) { +}]).controller('PollDetailCtrl', ['$scope', '$http', function ($scope, $http, $routeParams) { $http({url: "http://localhost:8080/pollen/v1/polls/" + $routeParams.pollId, method: "GET"}).success(function(data) { $scope.poll = data; }); @@ -83,4 +79,4 @@ this.text = ""; } -} \ No newline at end of file +}]); \ No newline at end of file Modified: trunk/pollen-ui-angular/src/main/webapp/partials/home.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/home.html 2014-04-05 18:19:28 UTC (rev 3873) +++ trunk/pollen-ui-angular/src/main/webapp/partials/home.html 2014-04-11 16:19:20 UTC (rev 3874) @@ -19,5 +19,5 @@ #L% --> <div class="hero-unit"> - <img src="../img/pollen.png"/> + <img src="img/pollen.png"/> </div> \ No newline at end of file Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll-form.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/poll-form.html 2014-04-05 18:19:28 UTC (rev 3873) +++ trunk/pollen-ui-angular/src/main/webapp/partials/poll-form.html 2014-04-11 16:19:20 UTC (rev 3874) @@ -26,7 +26,7 @@ <li ng-class='{ active : step >= 3 }' step="3"><span class='step'>pollen.poll.form.create.step3</span> <span class="divider">/</span></li> </ul> -<form id='pollCreationForm' class="form-horizontal"> +<form id='pollCreationForm' class="form-horizontal" action="http://localhost:8080/pollen/v1/polls"> <!-- Basic info step --> <div class='step1' ng-show="step == 1">
participants (1)
-
kmorin@users.chorem.org