Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
July 2014
- 1 participants
- 110 discussions
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 ea617ff0c255cbe53cd0708a15c064e6be2e735b
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 18:11:54 2014 +0200
remove unused file
---
.../src/main/webapp/bundle/Messages.properties | 196 ---------------------
1 file changed, 196 deletions(-)
diff --git a/pollen-ui-angular/src/main/webapp/bundle/Messages.properties b/pollen-ui-angular/src/main/webapp/bundle/Messages.properties
deleted file mode 100644
index 6e9abc0..0000000
--- a/pollen-ui-angular/src/main/webapp/bundle/Messages.properties
+++ /dev/null
@@ -1,196 +0,0 @@
-###
-# #%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/Mes… $
-# %%
-# 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
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
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 e5d2a42e3e907596df2d796cb382d929724e39a0
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 17:57:39 2014 +0200
add license
---
.../src/main/webapp/js/controllers/mainCtrl.js | 20 ++++++++++++
pollen-ui-angular/src/main/webapp/less/style.less | 21 ++++++++++++
.../src/main/webapp/less/variables.less | 21 ++++++++++++
.../src/main/webapp/partials/big-poll.html | 38 ++++++++++------------
.../main/webapp/partials/favoriteList-edit.html | 21 ++++++++++++
.../main/webapp/partials/favoriteList-list.html | 21 ++++++++++++
.../src/main/webapp/partials/home.html | 1 +
.../src/main/webapp/partials/inline-poll.html | 38 ++++++++++------------
.../src/main/webapp/partials/poll-list.html | 20 ++++++++++++
.../src/main/webapp/partials/poll-result.html | 21 ++++++++++++
.../src/main/webapp/partials/user-list.html | 20 ++++++++++++
.../src/main/webapp/partials/user-login.html | 21 ++++++++++++
12 files changed, 223 insertions(+), 40 deletions(-)
diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/mainCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/mainCtrl.js
index 38d47af..0e9ba5e 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/mainCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/mainCtrl.js
@@ -1,3 +1,23 @@
+/*
+ * #%L
+ * Pollen :: UI (Angular)
+ * %%
+ * Copyright (C) 2009 - 2014 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%
+ */
'use strict';
angular.module('PollenMainControllers', ['pollenServices']).controller('MainCtrl', ['$scope', 'Page',
diff --git a/pollen-ui-angular/src/main/webapp/less/style.less b/pollen-ui-angular/src/main/webapp/less/style.less
index 1aa0d5a..97829fe 100644
--- a/pollen-ui-angular/src/main/webapp/less/style.less
+++ b/pollen-ui-angular/src/main/webapp/less/style.less
@@ -1,3 +1,24 @@
+/*
+ * #%L
+ * Pollen :: UI (Angular)
+ * %%
+ * Copyright (C) 2009 - 2014 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%
+ */
+
@import "variables.less";
#pollenMenu {
diff --git a/pollen-ui-angular/src/main/webapp/less/variables.less b/pollen-ui-angular/src/main/webapp/less/variables.less
index 18b3ea0..77ce45a 100644
--- a/pollen-ui-angular/src/main/webapp/less/variables.less
+++ b/pollen-ui-angular/src/main/webapp/less/variables.less
@@ -1,3 +1,24 @@
+/*
+ * #%L
+ * Pollen :: UI (Angular)
+ * %%
+ * Copyright (C) 2009 - 2014 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%
+ */
+
@import "../lib/bootstrap/less/variables.less";
@time-transition : 0.8s;
diff --git a/pollen-ui-angular/src/main/webapp/partials/big-poll.html b/pollen-ui-angular/src/main/webapp/partials/big-poll.html
index 9dc5c09..bdb698f 100644
--- a/pollen-ui-angular/src/main/webapp/partials/big-poll.html
+++ b/pollen-ui-angular/src/main/webapp/partials/big-poll.html
@@ -1,24 +1,22 @@
<!--
- ~
- ~ #%L
- ~ Pollen :: UI (Angular)
- ~ %%
- ~ Copyright (C) 2009 - 2014 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%
- ~
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
-->
<div ng-repeat="choice in data.choices" class="row pollBigChoice">
diff --git a/pollen-ui-angular/src/main/webapp/partials/favoriteList-edit.html b/pollen-ui-angular/src/main/webapp/partials/favoriteList-edit.html
index 47f66fa..0e9e581 100644
--- a/pollen-ui-angular/src/main/webapp/partials/favoriteList-edit.html
+++ b/pollen-ui-angular/src/main/webapp/partials/favoriteList-edit.html
@@ -1,3 +1,24 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
+
<h1> {{ 'user.favoriteList' | translate }} </h1>
<div>
diff --git a/pollen-ui-angular/src/main/webapp/partials/favoriteList-list.html b/pollen-ui-angular/src/main/webapp/partials/favoriteList-list.html
index 8d87f3d..3995423 100644
--- a/pollen-ui-angular/src/main/webapp/partials/favoriteList-list.html
+++ b/pollen-ui-angular/src/main/webapp/partials/favoriteList-list.html
@@ -1,3 +1,24 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
+
<h1> {{ 'user.favoriteList' | translate }} </h1>
<div>
diff --git a/pollen-ui-angular/src/main/webapp/partials/home.html b/pollen-ui-angular/src/main/webapp/partials/home.html
index 846d330..54b879a 100644
--- a/pollen-ui-angular/src/main/webapp/partials/home.html
+++ b/pollen-ui-angular/src/main/webapp/partials/home.html
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
#L%
-->
+
<div>
<img src="img/pollen.png"/>
</div>
\ No newline at end of file
diff --git a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
index f42f38f..4290225 100644
--- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
+++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
@@ -1,24 +1,22 @@
<!--
- ~
- ~ #%L
- ~ Pollen :: UI (Angular)
- ~ %%
- ~ Copyright (C) 2009 - 2014 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%
- ~
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
-->
<table id="poll-inline">
diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-list.html b/pollen-ui-angular/src/main/webapp/partials/poll-list.html
index 1d61471..6217c3c 100644
--- a/pollen-ui-angular/src/main/webapp/partials/poll-list.html
+++ b/pollen-ui-angular/src/main/webapp/partials/poll-list.html
@@ -1,3 +1,23 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
<div ng-if="!data.polls[0]"><h1>{{ 'poll.error.listEmpty' | translate }}</h1></div>
diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-result.html b/pollen-ui-angular/src/main/webapp/partials/poll-result.html
index 3f8a503..9e69c58 100644
--- a/pollen-ui-angular/src/main/webapp/partials/poll-result.html
+++ b/pollen-ui-angular/src/main/webapp/partials/poll-result.html
@@ -1,3 +1,24 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
+
<h1>{{data.poll.title}}</h1>
<h2> <ng-pluralize count="data.result.nbVotant" when="translateTitle"></ng-pluralize> </h2>
diff --git a/pollen-ui-angular/src/main/webapp/partials/user-list.html b/pollen-ui-angular/src/main/webapp/partials/user-list.html
index 02867b7..c605945 100644
--- a/pollen-ui-angular/src/main/webapp/partials/user-list.html
+++ b/pollen-ui-angular/src/main/webapp/partials/user-list.html
@@ -1,3 +1,23 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
<div ng-if="!data.users[0]"><h1>{{ 'user.error.listEmpty' | translate }}</h1></div>
diff --git a/pollen-ui-angular/src/main/webapp/partials/user-login.html b/pollen-ui-angular/src/main/webapp/partials/user-login.html
index e3c18fa..9745533 100644
--- a/pollen-ui-angular/src/main/webapp/partials/user-login.html
+++ b/pollen-ui-angular/src/main/webapp/partials/user-login.html
@@ -1,3 +1,24 @@
+<!--
+ #%L
+ Pollen :: UI (Angular)
+ %%
+ Copyright (C) 2009 - 2014 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%
+ -->
+
<form id='loginForm' ng-submit="login()">
<div class="control-group">
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
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 65cd880fe6177531cb580d5b2c28b6628ff87940
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 17:21:41 2014 +0200
add defaut case in choicetype
---
.../chorem/pollen/services/bean/ChoiceBean.java | 24 ++++++++++------------
.../pollen/services/service/ChoiceService.java | 18 +++++++---------
2 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java b/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java
index 40e8691..aa0bf6b 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/bean/ChoiceBean.java
@@ -61,20 +61,19 @@ public class ChoiceBean extends PollenBean<Choice> {
}
+
+ //TODO agarandel 17/07/14 : review code : is switch case required
switch (entity.getChoiceType()) {
case TEXT:
- setChoiceValue(entity.getChoiceValue());
- break;
-
case DATE:
- setChoiceValue(entity.getChoiceValue());
- break;
-
case IMAGE:
setChoiceValue(entity.getChoiceValue());
break;
+
+ default:
+ throw new UnsupportedOperationException("Unexpected value : " + entity.getChoiceType());
}
setDescription(entity.getDescription());
@@ -92,6 +91,8 @@ public class ChoiceBean extends PollenBean<Choice> {
ChoiceType choiceType = getChoiceType();
if (choiceType != null) {
+
+ //TODO agarandel 17/07/14 : review code : is switch case required
switch (choiceType) {
case TEXT:
entity.setChoiceValue(getChoiceValue());
@@ -99,19 +100,16 @@ public class ChoiceBean extends PollenBean<Choice> {
break;
case DATE:
- if ( getChoiceValue() != null ) {
- entity.setChoiceValue(getChoiceValue());
- }
-
- break;
-
case IMAGE:
if ( getChoiceValue() != null ) {
- entity.setChoiceValue(getChoiceValue());
+ entity.setChoiceValue(getChoiceValue());
}
break;
+
+ default:
+ throw new UnsupportedOperationException("Unexpected value : " + choiceType);
}
}
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
index 90a2dd2..268a212 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
@@ -28,10 +28,8 @@ import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;
import org.chorem.pollen.persistence.entity.*;
import org.chorem.pollen.services.bean.ChoiceBean;
-import org.chorem.pollen.services.bean.PollenEntityId;
import org.chorem.pollen.services.bean.PollenEntityRef;
import org.chorem.pollen.services.service.security.PermissionVerb;
-import org.nuiton.topia.persistence.TopiaIdFactory;
import java.util.ArrayList;
import java.util.Date;
@@ -238,23 +236,18 @@ public class ChoiceService extends PollenServiceSupport {
toSave.setChoiceType(choice.getChoiceType());
+ //TODO agarandel 17/07/14 : review code : is switch case required
switch (toSave.getChoiceType()) {
case TEXT:
-
- toSave.setChoiceValue(choice.getChoiceValue());
-
- break;
-
case DATE:
+ case IMAGE:
toSave.setChoiceValue(choice.getChoiceValue());
-
break;
- case IMAGE:
-
- toSave.setChoiceValue(choice.getChoiceValue());
+ default:
+ throw new UnsupportedOperationException("Unexpected value : " + toSave.getChoiceType());
}
@@ -357,6 +350,9 @@ public class ChoiceService extends PollenServiceSupport {
break;
+ default:
+ throw new UnsupportedOperationException("Unexpected value : " + choice.getChoiceType());
+
}
}
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
17 Jul '14
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 77cdc92bdb9b7f884640e017b64b8ddc15ed3143
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 14:58:57 2014 +0200
choice service : new check when choiceType equal 'IMAGE'
---
.../pollen/services/service/ChoiceService.java | 52 ++++++++++++++--------
.../services/service/PollenResourceService.java | 14 ++++--
.../i18n/pollen-services_en_GB.properties | 2 +
.../i18n/pollen-services_fr_FR.properties | 2 +
.../src/main/webapp/js/controllers/pollCtrl.js | 3 ++
pollen-ui-angular/src/main/webapp/js/directives.js | 5 ++-
6 files changed, 54 insertions(+), 24 deletions(-)
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
index db64ec1..90a2dd2 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
@@ -33,6 +33,7 @@ import org.chorem.pollen.services.bean.PollenEntityRef;
import org.chorem.pollen.services.service.security.PermissionVerb;
import org.nuiton.topia.persistence.TopiaIdFactory;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -174,12 +175,7 @@ public class ChoiceService extends PollenServiceSupport {
if (choice.getChoiceType() == ChoiceType.IMAGE) {
- PollenEntityId<PollenResource> resourceId = PollenEntityId.newId(PollenResource.class);
- resourceId.setReducedId(choice.getChoiceValue());
- TopiaIdFactory topiaIdFactory = serviceContext.getTopiaApplicationContext().getTopiaIdFactory();
- resourceId.decode(topiaIdFactory);
-
- PollenResource resource = getResourceService().getResource0(resourceId.getEntityId());
+ PollenResource resource = getResourceService().getResourceByShortId(choice.getChoiceValue());
getPollenResourceDao().delete(resource);
}
@@ -317,19 +313,16 @@ public class ChoiceService extends PollenServiceSupport {
break;
case DATE:
- Date choiceDate = new Date(Long.parseLong(choice.getChoiceValue()));
-
- boolean dateNotBlank;
- if (choiceDate == null) {
- dateNotBlank = checkNotBlank(errors, "choiceValue", null, l(getLocale(), "pollen.error.choice.choiceDateEmpty"));
- }
- else {
- dateNotBlank = checkNotBlank(errors,
- "choiceValue",
- String.valueOf(choiceDate),
- l(getLocale(), "pollen.error.choice.choiceDateEmpty"));
+ Date choiceDate = null;
+ if (choice.getChoiceValue() != null) {
+ choiceDate = new Date(Long.parseLong(choice.getChoiceValue()));
}
+ boolean dateNotBlank = checkNotBlank(errors,
+ "choiceValue",
+ String.valueOf(choiceDate),
+ l(getLocale(), "pollen.error.choice.choiceDateEmpty"));
+
if (dateNotBlank) {
boolean dateAdded = choiceNames.add(String.valueOf(choiceDate.getTime()));
check(errors, "choiceValue", dateAdded, l(getLocale(), "pollen.error.choice.choiceDateExist"));
@@ -338,7 +331,30 @@ public class ChoiceService extends PollenServiceSupport {
break;
case IMAGE:
- // TODO : verify picture
+
+ PollenResource resource = getResourceService().getResourceByShortId(choice.getChoiceValue());
+
+ boolean resourceExist = checkNotBlank(errors,
+ "choiceValue",
+ resource.getName(),
+ l(getLocale(), "pollen.error.image.notExist"));
+
+ if (resourceExist) {
+ List<String> contentTypeAccepted = new ArrayList<>();
+ contentTypeAccepted.add("image/bmp");
+ contentTypeAccepted.add("image/gif");
+ contentTypeAccepted.add("image/jpeg");
+ contentTypeAccepted.add("image/png");
+ contentTypeAccepted.add("image/vnd.microsoft.icon");
+
+ boolean isImage = contentTypeAccepted.contains(resource.getContentType());
+
+ check(errors,
+ "choiceValue",
+ isImage,
+ l(getLocale(), "pollen.error.image.badFormat"));
+ }
+
break;
}
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenResourceService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenResourceService.java
index 0fae9bb..c4f296e 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenResourceService.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenResourceService.java
@@ -2,10 +2,8 @@ package org.chorem.pollen.services.service;
import org.chorem.pollen.persistence.entity.PollenResource;
import org.chorem.pollen.services.PollenService;
-import org.chorem.pollen.services.bean.PollenEntityRef;
-import org.chorem.pollen.services.bean.ResourceFileBean;
-import org.chorem.pollen.services.bean.ResourceMetaBean;
-import org.chorem.pollen.services.bean.ResourceStreamBean;
+import org.chorem.pollen.services.bean.*;
+import org.nuiton.topia.persistence.TopiaIdFactory;
import java.io.IOException;
import java.sql.SQLException;
@@ -103,4 +101,12 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
return toSave;
}
+ public PollenResource getResourceByShortId(String shortId) {
+ PollenEntityId<PollenResource> resourceId = PollenEntityId.newId(PollenResource.class);
+ resourceId.setReducedId(shortId);
+ TopiaIdFactory topiaIdFactory = serviceContext.getTopiaApplicationContext().getTopiaIdFactory();
+ resourceId.decode(topiaIdFactory);
+
+ return getResource0(resourceId.getEntityId());
+ }
}
diff --git a/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties b/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
index 2ec870f..ba4905e 100644
--- a/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
+++ b/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
@@ -29,6 +29,8 @@ pollen.error.favoriteListMember.email.empty=member email can not be empty
pollen.error.favoriteListMember.email.invalid=member email is not valid
pollen.error.favoriteListMember.name.already.used=member name already used
pollen.error.favoriteListMember.name.empty=member name can not be empty
+pollen.error.image.badFormat=Your Image is in bad format
+pollen.error.image.notExist=Image don't exist
pollen.error.poll.choice.mandatory=At least a choice is mandatory
pollen.error.poll.commentVisibility.mandatory=comment visiblity is mandatory
pollen.error.poll.mismatch.freePoll=cant' have a voter list for a free poll
diff --git a/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties b/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
index 2685800..b37f11a 100644
--- a/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
+++ b/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
@@ -29,6 +29,8 @@ pollen.error.favoriteListMember.email.empty=Le courriel est obligatoire
pollen.error.favoriteListMember.email.invalid=Le courriel du membre est invalide
pollen.error.favoriteListMember.name.already.used=Le nom du membre est déjà utilisé dans cette liste
pollen.error.favoriteListMember.name.empty=Le nom du membre est obligatoire
+pollen.error.image.badFormat=L'image n'est pas du bon format
+pollen.error.image.notExist=L'image n'existe pas sur le serveur
pollen.error.poll.choice.mandatory=Au moins un choix est nécessaire
pollen.error.poll.commentVisibility.mandatory=la visibilité des commentaires est obligatoire
pollen.error.poll.pollType.mandatory=le type de sondage est obligatoire
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 a59d583..95d2ed9 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
@@ -581,6 +581,9 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
if (angular.isDefined(error.data['choice['+index+'].choiceValue'])) {
choice.restError = {choiceValue:error.data['choice['+index+'].choiceValue']};
}
+ else {
+ delete choice.restError;
+ }
});
if (angular.isDefined(error.data.choice)) {
diff --git a/pollen-ui-angular/src/main/webapp/js/directives.js b/pollen-ui-angular/src/main/webapp/js/directives.js
index 478f369..d1c4c01 100644
--- a/pollen-ui-angular/src/main/webapp/js/directives.js
+++ b/pollen-ui-angular/src/main/webapp/js/directives.js
@@ -420,13 +420,14 @@ angular.module('pollenDirective', [])
reader.onload = function (loadEvent) {
var formData = new FormData(element[0].firstChild);
scope.$apply(function () {
- scope.ngModel = { meta: changeEvent.target.files[0], data: loadEvent.target.result};
+ scope.ngModel = { meta: changeEvent.target.files[0] };
});
PollenResource.upload(formData, function (response) {
scope.ngModel.meta.id = response.id;
+ scope.ngModel.id = response.id;
+ scope.ngModel.data = conf.restURL+'/resources/'+response.id;
});
-
}
reader.readAsDataURL( changeEvent.target.files[0] );
});
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
01/02: pom : test karma use maven varible for ignore failure test or skip test
by chorem.org scm 17 Jul '14
by chorem.org scm 17 Jul '14
17 Jul '14
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 56e9dba6125919f44bb02ef39cdd201e8e34b0bb
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 14:36:22 2014 +0200
pom : test karma use maven varible for ignore failure test or skip test
---
pollen-ui-angular/pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pollen-ui-angular/pom.xml b/pollen-ui-angular/pom.xml
index fc9732f..5f53bc8 100644
--- a/pollen-ui-angular/pom.xml
+++ b/pollen-ui-angular/pom.xml
@@ -101,9 +101,9 @@
<autoWatch>false</autoWatch>
<singleRun>true</singleRun>
<colors>true</colors>
- <skipKarma>false</skipKarma>
- <skipTests>false</skipTests>
- <karmaFailureIgnore>false</karmaFailureIgnore>
+ <skipKarma>${maven.test.skip}</skipKarma>
+ <skipTests>${maven.test.skip}</skipTests>
+ <karmaFailureIgnore>${maven.test.failure.ignore}</karmaFailureIgnore>
<reporters>dots,junit</reporters>
</configuration>
</plugin>
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
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 df336c121deeaeb1853af174500b95da7e167f26
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Thu Jul 17 10:08:08 2014 +0200
fix install npm + use local node modules
---
pollen-ui-angular/.gitignore | 1 -
pollen-ui-angular/pom.xml | 3 +--
pollen-ui-angular/src/test/karma.conf.js | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/pollen-ui-angular/.gitignore b/pollen-ui-angular/.gitignore
index 1c7c2ba..09447a5 100644
--- a/pollen-ui-angular/.gitignore
+++ b/pollen-ui-angular/.gitignore
@@ -1,6 +1,5 @@
*.iml
node_modules/*
-test_out/*
src/main/webapp/lib
src/main/webapp/css/style.css
src/main/webapp/js/conf.js
diff --git a/pollen-ui-angular/pom.xml b/pollen-ui-angular/pom.xml
index f224a33..fc9732f 100644
--- a/pollen-ui-angular/pom.xml
+++ b/pollen-ui-angular/pom.xml
@@ -49,7 +49,7 @@
<goal>exec</goal>
</goals>
<configuration>
- <executable>bower</executable>
+ <executable>${basedir}/node_modules/bower/bin/bower</executable>
<arguments>
<argument>install</argument>
</arguments>
@@ -96,7 +96,6 @@
<configuration>
<karmaExecutable>${basedir}/node_modules/karma/bin/karma</karmaExecutable>
<configFile>src/test/karma.conf.js</configFile>
- <junitReportFile>target/test-results.xml</junitReportFile>
<reportsDirectory>${project.build.directory}/karma-reports</reportsDirectory>
<browsers>PhantomJS</browsers>
<autoWatch>false</autoWatch>
diff --git a/pollen-ui-angular/src/test/karma.conf.js b/pollen-ui-angular/src/test/karma.conf.js
index 69eca3a..3959745 100644
--- a/pollen-ui-angular/src/test/karma.conf.js
+++ b/pollen-ui-angular/src/test/karma.conf.js
@@ -86,7 +86,7 @@ module.exports = function(config) {
],
junitReporter : {
- outputFile: 'test_out/unit.xml',
+ outputFile: 'target/karma-reports/unit.xml',
suite: 'unit'
},
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
01/01: classic form for poll-setting and translate poll-setting and align on ':' in i18n/*.js
by chorem.org scm 16 Jul '14
by chorem.org scm 16 Jul '14
16 Jul '14
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 feb2a4820335e86c0171331a31f9071602b53b5a
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Wed Jul 16 17:41:05 2014 +0200
classic form for poll-setting and translate poll-setting and align on ':' in i18n/*.js
---
pollen-ui-angular/src/main/webapp/i18n/en.js | 250 +++++++++++----------
pollen-ui-angular/src/main/webapp/i18n/fr.js | 249 ++++++++++----------
pollen-ui-angular/src/main/webapp/less/style.less | 4 +
.../src/main/webapp/partials/poll-settings.html | 186 ++++++++++-----
4 files changed, 401 insertions(+), 288 deletions(-)
diff --git a/pollen-ui-angular/src/main/webapp/i18n/en.js b/pollen-ui-angular/src/main/webapp/i18n/en.js
index 968332e..1dafd4f 100644
--- a/pollen-ui-angular/src/main/webapp/i18n/en.js
+++ b/pollen-ui-angular/src/main/webapp/i18n/en.js
@@ -1,119 +1,140 @@
var translateEN = {
-'title.home' : 'Home',
-'title.poll.create' : 'Create new poll',
-'title.poll.edit' : 'Edit poll',
-'title.poll.vote' : 'Vote',
-'title.poll.comment' : 'Comment',
-'title.poll.result' : 'Result of poll',
-'title.poll.list' : 'List of poll',
-'title.user.register' : 'Register',
-'title.user.edit' : 'Edit Profile',
-'title.user.forgotPassword' : 'Forget Password',
-'title.user.list' : 'List of user',
-
-'newPoll' : 'New Poll',
-
-'admin' : 'Administration',
-'admin.listPoll' : 'List of Polls',
-'admin.listUser' : 'List of Users',
-'admin.config' : 'Configuration',
-
-'user.edit' : 'Profile',
-'user.listPollCreated' : 'Created Poll',
-'user.listPollParticiped' : 'Participed Poll',
-'user.listPollInvited' : 'Invited Poll',
-
-'user.name' : 'Name',
-'user.mail' : 'e-mail',
-'user.password' : 'Password',
-'user.password2' : 'Confirm',
-'user.passwordNew' : 'New password',
-'user.passwordCurrent' : 'Current password',
-'user.rememberMe' : 'Remember Me',
-'user.forgotPassword' : 'Forgot Password',
-'user.register.success' : 'Register with success',
-'user.edit.success' : 'Save with success',
-'user.forgotPassword.success' : 'Password send by email',
-'user.favoriteList' : 'Favorite list',
-'user.error.password.diff' : 'Passwords not equal',
-'user.error.mail.notFound' : 'E-mail not found',
-'user.error.mail.empty' : 'E-mail can not be empty',
-'user.error.login' : 'Error in e-mail or password',
-'user.error.login.mandatory' : 'You must be connected',
-'user.error.logout.mandatory' : 'You must be disconnected',
-
-'poll.tab.vote' : 'Vote',
-'poll.tab.comment' : 'Comment',
-'poll.tab.result' : 'Result',
-'poll.tab.create' : 'Create',
-'poll.tab.edit' : 'Edit',
-'poll.tab.conf' : 'Configuration',
-'poll.tab.participant' : 'Participants',
-
-'poll.link.edit' : 'Edit poll',
-'poll.link.vote' : 'Vote',
-'poll.link.result' : 'Result of poll',
-'poll.link.clone' : 'Clone this poll',
-'poll.link.export' : 'Export this poll',
-'poll.link.close' : 'Close this poll',
-'poll.link.delete' : 'Delete this poll',
-
-'poll.edit' : 'Click to edit',
-'poll.desc' : 'Description is optional. This message will not visible in vote page.',
-'poll.saved' : 'Poll saved.',
-'poll.cloned' : 'Poll cloned',
-'poll.closed' : 'Poll closed',
-'poll.deleted' : 'Poll deleted',
-'poll.restricted.name' : 'Name',
-'poll.restricted.mail' : 'E-mail',
-'poll.restricted.weight' : 'Weight',
-'poll.restricted.free' : 'Free',
-'poll.restricted.restricted' : 'Restricted',
-'poll.restricted.group' : 'Group',
-'poll.restricted.pollType' : 'Who can vote ?',
-'poll.result.choice' : 'Choice',
-'poll.result.score' : 'Score',
-'poll.result.title.zero' : 'No result',
-'poll.result.title.one' : 'Result : One voter',
-'poll.result.title.other' : 'Result : {{nbVoter}} Voters',
-'poll.error.listEmpty' : 'No poll find',
-
-'vote.added' : 'Vote added.',
-
-'comment' : 'Comment',
-'comment.added' : 'Comment added.',
-'comment.order.toDesc' : 'Ordered by newer date',
-'comment.order.toAsc' : 'Ordered by older date',
-
-'action.logout' : 'Logout',
-'action.login' : 'Login',
-'action.register' : 'Register',
-'action.recovered' : 'Recovered',
-'action.send' : 'Send',
-'action.return' : 'Return',
-'action.cancel' : 'Cancel',
-'action.save' : 'Save',
-'action.edit' : 'Edit',
-'action.delete' : 'Delete',
-'action.vote' : 'Vote',
-'action.comment' : 'Comment',
-'action.restricted.addVoter' : 'Add a Voter',
-'action.restricted.deleteVoter' : 'Delete the Voter',
-'action.restricted.addGroup' : 'Add a Group',
-'action.restricted.deleteGroup' : 'Delete the Group',
-'action.restricted.notify' : 'Notify',
-'action.favoriteList.import.addGroup' : 'Import in new group',
-'action.favoriteList.import.inGroup' : 'Import in this group',
-'action.favoriteList.add' : 'Add favorite list',
-'action.favoriteList.delete' : 'Delete the favorite list',
-'action.favoriteList.addMember' : 'Add a member',
-'action.favoriteList.deleteMember' : 'Delete the member',
-
-'action.message.confirmDelete' : 'Are you sure to delete it?',
-'action.message.confirmClose' : 'Are you sure to close it?',
-
-'error.forbidden' : 'Access forbidden',
+'title.home' : 'Home',
+'title.poll.create' : 'Create new poll',
+'title.poll.edit' : 'Edit poll',
+'title.poll.vote' : 'Vote',
+'title.poll.comment' : 'Comment',
+'title.poll.result' : 'Result of poll',
+'title.poll.list' : 'List of poll',
+'title.user.register' : 'Register',
+'title.user.edit' : 'Edit Profile',
+'title.user.forgotPassword' : 'Forget Password',
+'title.user.list' : 'List of user',
+
+'newPoll' : 'New Poll',
+
+'admin' : 'Administration',
+'admin.listPoll' : 'List of Polls',
+'admin.listUser' : 'List of Users',
+'admin.config' : 'Configuration',
+
+'user.edit' : 'Profile',
+'user.listPollCreated' : 'Created Poll',
+'user.listPollParticiped' : 'Participed Poll',
+'user.listPollInvited' : 'Invited Poll',
+
+'user.name' : 'Name',
+'user.mail' : 'e-mail',
+'user.password' : 'Password',
+'user.password2' : 'Confirm',
+'user.passwordNew' : 'New password',
+'user.passwordCurrent' : 'Current password',
+'user.rememberMe' : 'Remember Me',
+'user.forgotPassword' : 'Forgot Password',
+'user.register.success' : 'Register with success',
+'user.edit.success' : 'Save with success',
+'user.forgotPassword.success' : 'Password send by email',
+'user.favoriteList' : 'Favorite list',
+'user.error.password.diff' : 'Passwords not equal',
+'user.error.mail.notFound' : 'E-mail not found',
+'user.error.mail.empty' : 'E-mail can not be empty',
+'user.error.login' : 'Error in e-mail or password',
+'user.error.login.mandatory' : 'You must be connected',
+'user.error.logout.mandatory' : 'You must be disconnected',
+
+'poll.tab.vote' : 'Vote',
+'poll.tab.comment' : 'Comment',
+'poll.tab.result' : 'Result',
+'poll.tab.create' : 'Create',
+'poll.tab.edit' : 'Edit',
+'poll.tab.conf' : 'Configuration',
+'poll.tab.participant' : 'Participants',
+
+'poll.link.edit' : 'Edit poll',
+'poll.link.vote' : 'Vote',
+'poll.link.result' : 'Result of poll',
+'poll.link.clone' : 'Clone this poll',
+'poll.link.export' : 'Export this poll',
+'poll.link.close' : 'Close this poll',
+'poll.link.delete' : 'Delete this poll',
+
+'poll.edit' : 'Click to edit',
+'poll.desc' : 'Description is optional. This message will not visible in vote page.',
+'poll.saved' : 'Poll saved.',
+'poll.cloned' : 'Poll cloned',
+'poll.closed' : 'Poll closed',
+'poll.deleted' : 'Poll deleted',
+'poll.restricted.name' : 'Name',
+'poll.restricted.mail' : 'E-mail',
+'poll.restricted.weight' : 'Weight',
+'poll.restricted.free' : 'Free',
+'poll.restricted.restricted' : 'Restricted',
+'poll.restricted.group' : 'Group',
+'poll.restricted.pollType' : 'Who can vote ?',
+'poll.result.choice' : 'Choice',
+'poll.result.score' : 'Score',
+'poll.result.title.zero' : 'No result',
+'poll.result.title.one' : 'Result : One voter',
+'poll.result.title.other' : 'Result : {{nbVoter}} Voters',
+'poll.config.title.poll' : 'Global config',
+'poll.config.title.choice' : 'Choice config',
+'poll.config.title.vote' : 'Vote config',
+'poll.config.label.beginDate' : 'Begin date',
+'poll.config.label.endDate' : 'End date',
+'poll.config.label.resultVisibility' : 'Result visibility',
+'poll.config.label.continuousResults' : 'Continuous results',
+'poll.config.label.choiceAddAllowed' : 'Add choice allowed',
+'poll.config.label.beginChoiceDate' : 'Add choice begin date',
+'poll.config.label.endChoiceDate' : 'Add choice end date',
+'poll.config.label.limitedVote' : 'Limited choice',
+'poll.config.label.maxChoiceNumber' : 'Max number of choice',
+'poll.config.label.voteCountingType' : 'Vote counting Type',
+'poll.config.label.voteVisibility' : 'Vote visibility',
+'poll.config.label.anonymousVoteAllowed' : 'Anonymous vote allowed',
+'poll.config.label.commentVisibility' : 'Comment visibility',
+'poll.config.value.visibility.everybody' : 'Everybody',
+'poll.config.value.visibility.voter' : 'Voter',
+'poll.config.value.visibility.creator' : 'Creator',
+'poll.config.value.visibility.anonymous' : 'Anonymous',
+'poll.config.value.visibility.nobody' : 'Nobody',
+'poll.error.listEmpty' : 'No poll find',
+
+'vote.added' : 'Vote added.',
+
+'comment' : 'Comment',
+'comment.added' : 'Comment added.',
+'comment.order.toDesc' : 'Ordered by newer date',
+'comment.order.toAsc' : 'Ordered by older date',
+
+'action.logout' : 'Logout',
+'action.login' : 'Login',
+'action.register' : 'Register',
+'action.recovered' : 'Recovered',
+'action.send' : 'Send',
+'action.return' : 'Return',
+'action.cancel' : 'Cancel',
+'action.save' : 'Save',
+'action.edit' : 'Edit',
+'action.delete' : 'Delete',
+'action.vote' : 'Vote',
+'action.comment' : 'Comment',
+'action.restricted.addVoter' : 'Add a Voter',
+'action.restricted.deleteVoter' : 'Delete the Voter',
+'action.restricted.addGroup' : 'Add a Group',
+'action.restricted.deleteGroup' : 'Delete the Group',
+'action.restricted.notify' : 'Notify',
+'action.favoriteList.import.addGroup' : 'Import in new group',
+'action.favoriteList.import.inGroup' : 'Import in this group',
+'action.favoriteList.add' : 'Add favorite list',
+'action.favoriteList.delete' : 'Delete the favorite list',
+'action.favoriteList.addMember' : 'Add a member',
+'action.favoriteList.deleteMember' : 'Delete the member',
+
+'action.message.confirmDelete' : 'Are you sure to delete it?',
+'action.message.confirmClose' : 'Are you sure to close it?',
+
+'error.forbidden' : 'Access forbidden',
}
@@ -217,3 +238,4 @@ var i18n_EN = {
"id": "en",
"pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
}
+
diff --git a/pollen-ui-angular/src/main/webapp/i18n/fr.js b/pollen-ui-angular/src/main/webapp/i18n/fr.js
index 0b24993..bdb25c6 100644
--- a/pollen-ui-angular/src/main/webapp/i18n/fr.js
+++ b/pollen-ui-angular/src/main/webapp/i18n/fr.js
@@ -1,119 +1,140 @@
var translateFR = {
-'title.home' : 'Accueil',
-'title.poll.create' : 'Création d\'un nouveau sondage',
-'title.poll.edit' : 'Edition du sondage',
-'title.poll.vote' : 'Voter',
-'title.poll.comment' : 'Laisser un Commentaire',
-'title.poll.result' : 'Résultat du sondage',
-'title.poll.list' : 'Liste des sondages',
-'title.user.register' : 'Inscription',
-'title.user.edit' : 'Modification de votre profile',
-'title.user.forgotPassword' : 'Récupération du Mot de Passe',
-'title.user.list' : 'Liste des utilisateurs',
-
-'newPoll' : 'Nouveau Sondage',
-
-'admin' : 'Administration',
-'admin.listPoll' : 'Liste des Sondages',
-'admin.listUser' : 'Liste des Utilisateurs',
-'admin.config' : 'Configuration',
-
-'user.edit' : 'Profile',
-'user.listPollCreated' : 'Sondage Crée',
-'user.listPollParticiped' : 'Sondage Participé',
-'user.listPollInvited' : 'Sondage invité',
-
-'user.name' : 'Votre Nom',
-'user.mail' : 'Courriel',
-'user.password' : 'Mot de passe',
-'user.password2' : 'Confirmation',
-'user.passwordNew' : 'Nouveau Mot de passe',
-'user.passwordCurrent' : 'Mot de passe Actuel',
-'user.rememberMe' : 'Connexion automatique',
-'user.forgotPassword' : 'Mot de passe oublié',
-'user.register.success' : 'Compte enregisté, un mail de validation vient d\'être envoyé..',
-'user.edit.success' : 'Modification effectuée..',
-'user.forgotPassword.success' : 'Un mail de changement de mot de passe vient d\'être envoyé..',
-'user.favoriteList' : 'Liste de Diffusion Favorite',
-'user.error.password.diff' : 'Mot de passe différent',
-'user.error.mail.notFound' : 'Courriel n\'a pas été trouvé',
-'user.error.mail.empty' : 'Courriel ne peux pas être vide',
-'user.error.login' : 'Erreur sur le nom d\'utilisateur ou le mot de passe',
-'user.error.login.mandatory' : 'Accès refusé, vous devez êtes connecté(e)',
-'user.error.logout.mandatory' : 'Accès refusé, vous êtes connecté(e)',
-
-'poll.tab.vote' : 'Voter',
-'poll.tab.comment' : 'Commenter',
-'poll.tab.result' : 'Résultat',
-'poll.tab.create' : 'Créer',
-'poll.tab.edit' : 'Éditer',
-'poll.tab.conf' : 'Configuration',
-'poll.tab.participant' : 'Participants',
-
-'poll.link.edit' : 'Lien d\'édition',
-'poll.link.vote' : 'Lien de partage pour le vote',
-'poll.link.result' : 'Lien du résultat du sondage',
-'poll.link.clone' : 'Cloner le sondage',
-'poll.link.export' : 'Exporter le sondage',
-'poll.link.close' : 'Clore les votes du sondage',
-'poll.link.delete' : 'Supprimer le sondage',
-
-'poll.edit' : 'Clique pour éditer',
-'poll.desc' : 'Description (Facultatif). Ce cadre disparait si aucune description n\'est mise',
-'poll.saved' : 'Sondage sauvegardé',
-'poll.cloned' : 'Sondage cloné',
-'poll.closed' : 'Sondage clos',
-'poll.deleted' : 'Sondage supprimé',
-'poll.restricted.name' : 'Nom du votant',
-'poll.restricted.mail' : 'Courriel du votant',
-'poll.restricted.weight' : 'Poids',
-'poll.restricted.free' : 'Libre',
-'poll.restricted.restricted' : 'Restreint',
-'poll.restricted.group' : 'Groupe',
-'poll.restricted.pollType' : 'Qui peut voter ?',
-'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.error.listEmpty' : 'Aucun sondage trouvé',
-
-'vote.added' : 'Vote effectué',
-
-'comment' : 'Commentaire',
-'comment.added' : 'Commentaire effectué',
-'comment.order.toDesc' : 'Ordonner par le plus récent',
-'comment.order.toAsc' : 'Ordonner par ordre chronologique',
-
-'action.logout' : 'Se Deconnecter',
-'action.login' : 'Se Connecter',
-'action.register' : 'S\'enregistrer',
-'action.recovered' : 'Récupérer',
-'action.send' : 'Envoyer',
-'action.return' : 'Retour',
-'action.cancel' : 'Annuler',
-'action.save' : 'Sauvegarder',
-'action.edit' : 'Modifier',
-'action.delete' : 'Supprimer',
-'action.vote' : 'Voter',
-'action.comment' : 'Commenter',
-'action.restricted.addVoter' : 'Ajouter un Votant',
-'action.restricted.deleteVoter' : 'Supprimer le Votant',
-'action.restricted.addGroup' : 'Ajouter un Groupe de Votant',
-'action.restricted.deleteGroup' : 'Supprimer le Groupe de Votant',
-'action.restricted.notify' : 'Envoyer un mail',
-'action.favoriteList.import.addGroup' : 'Importer dans un nouveau groupe',
-'action.favoriteList.import.inGroup' : 'Importer dans ce groupe',
-'action.favoriteList.add' : 'Créer une nouvelle liste de diffusion',
-'action.favoriteList.delete' : 'Supprimer la liste de diffusion',
-'action.favoriteList.addMember' : 'Ajouter un membre',
-'action.favoriteList.deleteMember' : 'Supprimer le membre',
-
-'action.message.confirmDelete' : 'Êtes vous sûr de vouloir le supprimer?',
-'action.message.confirmClose' : 'Êtes vous sûr de vouloir le fermer?',
-
-'error.forbidden' : 'Accès interdit',
+'title.home' : 'Accueil',
+'title.poll.create' : 'Création d\'un nouveau sondage',
+'title.poll.edit' : 'Edition du sondage',
+'title.poll.vote' : 'Voter',
+'title.poll.comment' : 'Laisser un Commentaire',
+'title.poll.result' : 'Résultat du sondage',
+'title.poll.list' : 'Liste des sondages',
+'title.user.register' : 'Inscription',
+'title.user.edit' : 'Modification de votre profile',
+'title.user.forgotPassword' : 'Récupération du Mot de Passe',
+'title.user.list' : 'Liste des utilisateurs',
+
+'newPoll' : 'Nouveau Sondage',
+
+'admin' : 'Administration',
+'admin.listPoll' : 'Liste des Sondages',
+'admin.listUser' : 'Liste des Utilisateurs',
+'admin.config' : 'Configuration',
+
+'user.edit' : 'Profile',
+'user.listPollCreated' : 'Sondage Crée',
+'user.listPollParticiped' : 'Sondage Participé',
+'user.listPollInvited' : 'Sondage invité',
+
+'user.name' : 'Votre Nom',
+'user.mail' : 'Courriel',
+'user.password' : 'Mot de passe',
+'user.password2' : 'Confirmation',
+'user.passwordNew' : 'Nouveau Mot de passe',
+'user.passwordCurrent' : 'Mot de passe Actuel',
+'user.rememberMe' : 'Connexion automatique',
+'user.forgotPassword' : 'Mot de passe oublié',
+'user.register.success' : 'Compte enregisté, un mail de validation vient d\'être envoyé..',
+'user.edit.success' : 'Modification effectuée..',
+'user.forgotPassword.success' : 'Un mail de changement de mot de passe vient d\'être envoyé..',
+'user.favoriteList' : 'Liste de Diffusion Favorite',
+'user.error.password.diff' : 'Mot de passe différent',
+'user.error.mail.notFound' : 'Courriel n\'a pas été trouvé',
+'user.error.mail.empty' : 'Courriel ne peux pas être vide',
+'user.error.login' : 'Erreur sur le nom d\'utilisateur ou le mot de passe',
+'user.error.login.mandatory' : 'Accès refusé, vous devez êtes connecté(e)',
+'user.error.logout.mandatory' : 'Accès refusé, vous êtes connecté(e)',
+
+'poll.tab.vote' : 'Voter',
+'poll.tab.comment' : 'Commenter',
+'poll.tab.result' : 'Résultat',
+'poll.tab.create' : 'Créer',
+'poll.tab.edit' : 'Éditer',
+'poll.tab.conf' : 'Configuration',
+'poll.tab.participant' : 'Participants',
+
+'poll.link.edit' : 'Lien d\'édition',
+'poll.link.vote' : 'Lien de partage pour le vote',
+'poll.link.result' : 'Lien du résultat du sondage',
+'poll.link.clone' : 'Cloner le sondage',
+'poll.link.export' : 'Exporter le sondage',
+'poll.link.close' : 'Clore les votes du sondage',
+'poll.link.delete' : 'Supprimer le sondage',
+
+'poll.edit' : 'Clique pour éditer',
+'poll.desc' : 'Description (Facultatif). Ce cadre disparait si aucune description n\'est mise',
+'poll.saved' : 'Sondage sauvegardé',
+'poll.cloned' : 'Sondage cloné',
+'poll.closed' : 'Sondage clos',
+'poll.deleted' : 'Sondage supprimé',
+'poll.restricted.name' : 'Nom du votant',
+'poll.restricted.mail' : 'Courriel du votant',
+'poll.restricted.weight' : 'Poids',
+'poll.restricted.free' : 'Libre',
+'poll.restricted.restricted' : 'Restreint',
+'poll.restricted.group' : 'Groupe',
+'poll.restricted.pollType' : 'Qui peut voter ?',
+'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.config.title.poll' : 'Configuration globale',
+'poll.config.title.choice' : 'Configuration des choix',
+'poll.config.title.vote' : 'Configuration des votes',
+'poll.config.label.beginDate' : 'Date de début',
+'poll.config.label.endDate' : 'Date de fin',
+'poll.config.label.resultVisibility' : 'Visibilité des résultats',
+'poll.config.label.continuousResults' : 'Résultat continue',
+'poll.config.label.choiceAddAllowed' : 'Ajout de choix par les votants',
+'poll.config.label.beginChoiceDate' : 'Date de début d\'ajout de choix',
+'poll.config.label.endChoiceDate' : 'Date de fin d\'ajout de choix',
+'poll.config.label.limitedVote' : 'Limiter les votes',
+'poll.config.label.maxChoiceNumber' : 'Nombre max de vote',
+'poll.config.label.voteCountingType' : 'Type de Scrutin',
+'poll.config.label.voteVisibility' : 'Visibilité des votes',
+'poll.config.label.anonymousVoteAllowed' : 'Autoriser les votes anonymes',
+'poll.config.label.commentVisibility' : 'Visibilité des commentaires',
+'poll.config.value.visibility.everybody' : 'Public',
+'poll.config.value.visibility.voter' : 'Votants / Participants',
+'poll.config.value.visibility.creator' : 'Créateur',
+'poll.config.value.visibility.anonymous' : 'Anonyme',
+'poll.config.value.visibility.nobody' : 'Personne',
+'poll.error.listEmpty' : 'Aucun sondage trouvé',
+
+'vote.added' : 'Vote effectué',
+
+'comment' : 'Commentaire',
+'comment.added' : 'Commentaire effectué',
+'comment.order.toDesc' : 'Ordonner par le plus récent',
+'comment.order.toAsc' : 'Ordonner par ordre chronologique',
+
+'action.logout' : 'Se Deconnecter',
+'action.login' : 'Se Connecter',
+'action.register' : 'S\'enregistrer',
+'action.recovered' : 'Récupérer',
+'action.send' : 'Envoyer',
+'action.return' : 'Retour',
+'action.cancel' : 'Annuler',
+'action.save' : 'Sauvegarder',
+'action.edit' : 'Modifier',
+'action.delete' : 'Supprimer',
+'action.vote' : 'Voter',
+'action.comment' : 'Commenter',
+'action.restricted.addVoter' : 'Ajouter un Votant',
+'action.restricted.deleteVoter' : 'Supprimer le Votant',
+'action.restricted.addGroup' : 'Ajouter un Groupe de Votant',
+'action.restricted.deleteGroup' : 'Supprimer le Groupe de Votant',
+'action.restricted.notify' : 'Envoyer un mail',
+'action.favoriteList.import.addGroup' : 'Importer dans un nouveau groupe',
+'action.favoriteList.import.inGroup' : 'Importer dans ce groupe',
+'action.favoriteList.add' : 'Créer une nouvelle liste de diffusion',
+'action.favoriteList.delete' : 'Supprimer la liste de diffusion',
+'action.favoriteList.addMember' : 'Ajouter un membre',
+'action.favoriteList.deleteMember' : 'Supprimer le membre',
+
+'action.message.confirmDelete' : 'Êtes vous sûr de vouloir le supprimer?',
+'action.message.confirmClose' : 'Êtes vous sûr de vouloir le fermer?',
+
+'error.forbidden' : 'Accès interdit',
}
diff --git a/pollen-ui-angular/src/main/webapp/less/style.less b/pollen-ui-angular/src/main/webapp/less/style.less
index 847dba8..1aa0d5a 100644
--- a/pollen-ui-angular/src/main/webapp/less/style.less
+++ b/pollen-ui-angular/src/main/webapp/less/style.less
@@ -128,6 +128,10 @@
transition:margin linear @short-time-transition;
}
+ label.label-block {
+ display:block !important;
+ }
+
}
}
diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html
index 99df8ab..1ea211e 100644
--- a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html
+++ b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html
@@ -20,10 +20,10 @@
-->
<h1>{{data.poll.title}}</h1>
<form class="form-horizontal" novalidate>
- <h4>Confiuration global</h4>
+ <h4>{{ 'poll.config.title.poll' | translate }}</h4>
- <div class="form-group">
- <label class="col-sm-4 control-label" for="beginDate">Date de début : </label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label" for="beginDate">{{ 'poll.config.label.beginDate' | translate }}</label>
<div class="col-sm-8">
<input id="beginDate" class="form-control" type="text"
datepicker-popup="dd/MM/yyyy"
@@ -36,8 +36,8 @@
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label" for="endDate">Date de fin : </label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label" for="endDate">{{ 'poll.config.label.endDate' | translate }}</label>
<div class="col-sm-8">
<input id="endDate" class="form-control" type="text"
datepicker-popup="dd/MM/yyyy"
@@ -49,42 +49,56 @@
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Résultat : </label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.resultVisibility' | translate }}</label>
<div class="col-sm-8">
- <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="EVERYBODY" auto-save="autoSavePoll()" /> Public</label>
- <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="VOTER" auto-save="autoSavePoll()" /> Participants</label>
- <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="CREATOR" auto-save="autoSavePoll()" /> Créateur</label>
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.resultVisibility"
+ name="resultVisibility"
+ value="EVERYBODY"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.everybody' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.resultVisibility"
+ name="resultVisibility"
+ value="VOTER"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.voter' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.resultVisibility"
+ name="resultVisibility"
+ value="CREATOR"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.creator' | translate }}
+ </label>
</div>
- <!--
- <div class="col-sm-8 btn-group">
- <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'EVERYBODY'">Public</button>
- <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'VOTER'">Participants</button>
- <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'CREATOR'">Créateur</button>
- </div>
- -->
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Résultat continue : </label>
- <div class="col-sm-8 btn-group">
- <button class="btn btn-default" ng-model="data.poll.continuousResults" btn-radio="true" auto-save="autoSavePoll()" >Oui</button>
- <button class="btn btn-default" ng-model="data.poll.continuousResults" btn-radio="false" auto-save="autoSavePoll()" >Non</button>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label" for="formContinuousResults">{{ 'poll.config.label.continuousResults' | translate }}</label>
+ <div class="col-sm-8">
+ <input type="checkbox" id="formContinuousResults" ng-model="data.poll.continuousResults" auto-save="autoSavePoll()" />
</div>
</div>
- <h4>Configuration des Choix</h4>
+ <h4>{{ 'poll.config.title.choice' | translate }}</h4>
- <div class="form-group">
- <label class="col-sm-4 control-label">Ajout de choix par les votants :</label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label" for="formChoiceAddAllowed">{{ 'poll.config.label.choiceAddAllowed' | translate }}</label>
<div class="col-sm-8 btn-group">
- <button class="btn btn-default" ng-model="data.poll.choiceAddAllowed" btn-radio="true" auto-save="autoSavePoll()" >Oui</button>
- <button class="btn btn-default" ng-model="data.poll.choiceAddAllowed" btn-radio="false" auto-save="autoSavePoll()" >Non</button>
+ <input type="checkbox" id="formChoiceAddAllowed" ng-model="data.poll.choiceAddAllowed" auto-save="autoSavePoll()" />
</div>
</div>
- <div class="form-group" ng-show="data.poll.choiceAddAllowed">
- <label class="col-sm-4 control-label" for="beginChoiceDate">Date de début : </label>
+ <div class="form-group row" ng-show="data.poll.choiceAddAllowed">
+ <label class="col-sm-4 control-label" for="beginChoiceDate">{{ 'poll.config.label.beginChoiceDate' | translate }}</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="beginChoiceDate"
datepicker-popup="dd/MM/yyyy"
@@ -96,8 +110,8 @@
auto-save="autoSavePoll()" />
</div>
</div>
- <div class="form-group" ng-if="data.poll.choiceAddAllowed" for="endChoiceDate">
- <label class="col-sm-4 control-label">Date de fin : </label>
+ <div class="form-group row" ng-if="data.poll.choiceAddAllowed">
+ <label class="col-sm-4 control-label" for="endChoiceDate">{{ 'poll.config.label.endChoiceDate' | translate }}</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="endChoiceDate"
datepicker-popup="dd/MM/yyyy"
@@ -110,58 +124,110 @@
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Limiter les votes :</label>
- <div class="col-sm-8 btn-group">
- <button class="btn btn-default" ng-model="data.poll.limitedVote" btn-radio="true" auto-save="autoSavePoll()">Oui</button>
- <button class="btn btn-default" ng-model="data.poll.limitedVote" btn-radio="false" auto-save="autoSavePoll()">Non</button>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.limitedVote' | translate }}</label>
+ <div class="col-sm-8">
+ <input type="checkbox" id="formLimitedVote" ng-model="data.poll.limitedVote" auto-save="autoSavePoll()" />
</div>
</div>
- <div class="form-group" ng-show="data.poll.limitedVote">
- <label class="col-sm-4 control-label" for="popMaxChoiceNumber">Nombre de vote :</label>
+ <div class="form-group row" ng-show="data.poll.limitedVote">
+ <label class="col-sm-4 control-label" for="popMaxChoiceNumber">{{ 'poll.config.label.maxChoiceNumber' | translate }}</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="popMaxChoiceNumber" ng-model="data.poll.maxChoiceNumber" auto-save="autoSavePoll()" />
</div>
</div>
- <h4> Configuration des Réponses </h4>
+ <h4>{{ 'poll.config.title.vote' | translate }}</h4>
- <div class="form-group">
- <label class="col-sm-4 control-label">Type : </label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.voteCountingType' | translate }}</label>
<div class="col-sm-8">
- <div class="btn-group">
-
- <button ng-repeat="voteCountingType in data.allVoteCountingType" type="button" class="btn btn-success" ng-model="data.poll.voteCountingType" btn-radio="{{voteCountingType.id}}" auto-save="autoSavePoll()">{{voteCountingType.name}}</button>
-
- </div>
+ <label class="label-block" ng-repeat="voteCountingType in data.allVoteCountingType">
+ <input type="radio"
+ ng-model="data.poll.voteCountingType"
+ value="{{voteCountingType.id}}"
+ auto-save="autoSavePoll()" />
+ {{voteCountingType.name}}
+ </label>
+ <hr/>
<p ng-bind-html="toHTML(voteCountingTypeHelper)"></p>
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Visibilité : </label>
- <div class="col-sm-8 btn-group">
- <button type="button" class="btn btn-success" ng-model="data.poll.voteVisibility" auto-save="autoSavePoll()" btn-radio="'EVERYBODY'">Public</button>
- <button type="button" class="btn btn-success" ng-model="data.poll.voteVisibility" auto-save="autoSavePoll()" btn-radio="'VOTER'">Participants</button>
- <button type="button" class="btn btn-success" ng-model="data.poll.voteVisibility" auto-save="autoSavePoll()" btn-radio="'CREATOR'">Créateur</button>
- <button type="button" class="btn btn-success" ng-model="data.poll.voteVisibility" auto-save="autoSavePoll()" btn-radio="'ANONYMOUS'">Anonyme</button>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.voteVisibility' | translate }}</label>
+ <div class="col-sm-8">
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.voteVisibility"
+ auto-save="autoSavePoll()"
+ value="EVERYBODY" />
+ {{ 'poll.config.value.visibility.everybody' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.voteVisibility"
+ auto-save="autoSavePoll()"
+ value="VOTER" />
+ {{ 'poll.config.value.visibility.voter' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.voteVisibility"
+ auto-save="autoSavePoll()"
+ value="CREATOR" />
+ {{ 'poll.config.value.visibility.creator' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.voteVisibility"
+ auto-save="autoSavePoll()"
+ value="ANONYMOUS" />
+ {{ 'poll.config.value.visibility.anonymous' | translate }}
+ </label>
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Autoriser les votes anonymes :</label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.anonymousVoteAllowed' | translate }}</label>
<div class="col-sm-8 btn-group">
<button class="btn btn-default" ng-model="data.poll.anonymousVoteAllowed" btn-radio="true" auto-save="autoSavePoll()">Oui</button>
<button class="btn btn-default" ng-model="data.poll.anonymousVoteAllowed" btn-radio="false" auto-save="autoSavePoll()">Non</button>
</div>
</div>
- <div class="form-group">
- <label class="col-sm-4 control-label">Visibiliter des commentaires :</label>
+ <div class="form-group row">
+ <label class="col-sm-4 control-label">{{ 'poll.config.label.commentVisibility' | translate }}</label>
<div class="col-sm-8">
- <label><input type="radio" ng-model="data.poll.commentVisibility" name="commentVisibility" value="EVERYBODY" auto-save="autoSavePoll()" /> Public</label>
- <label><input type="radio" ng-model="data.poll.commentVisibility" name="commentVisibility" value="VOTER" auto-save="autoSavePoll()" /> Participants</label>
- <label><input type="radio" ng-model="data.poll.commentVisibility" name="commentVisibility" value="NOBODY" auto-save="autoSavePoll()" /> Personne</label>
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.commentVisibility"
+ name="commentVisibility"
+ value="EVERYBODY"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.everybody' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.commentVisibility"
+ name="commentVisibility"
+ value="VOTER"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.voter' | translate }}
+ </label>
+
+ <label class="label-block">
+ <input type="radio"
+ ng-model="data.poll.commentVisibility"
+ name="commentVisibility"
+ value="NOBODY"
+ auto-save="autoSavePoll()" />
+ {{ 'poll.config.value.visibility.nobody' | translate }}
+ </label>
</div>
</div>
</form>
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
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 f096df389586548ac9d43af982c5bf38552a527f
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Wed Jul 16 15:29:20 2014 +0200
add unit test for alert
---
.../src/main/webapp/js/controllers/alertCtrl.js | 22 +++---
.../src/test/unit/alertControllersTest.js | 78 ++++++++++++++++++++++
.../src/test/unit/pollControllersTest.js | 27 +++++++-
3 files changed, 114 insertions(+), 13 deletions(-)
diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js
index 81a5802..d388b25 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js
@@ -27,45 +27,47 @@ angular.module('alertControllers', [])
if (angular.isUndefined($scope.data)) {
$scope.data = {}
}
- $scope.data.alerts = [];
+
+ $scope.data.alerts = [];
$scope.$on('newError', function (event, error, timeout) {
var alert = {msg:error, type:'danger', glyphicon:'glyphicon-remove'};
if (angular.isDefined(timeout)) {
- addAlert(alert, timeout);
+ $scope.addAlert(alert, timeout);
} else {
- addAlert(alert, conf.defaultAlertTimeError);
+ $scope.addAlert(alert, conf.defaultAlertTimeError);
}
});
$scope.$on('newWarning', function (event, warning, timeout) {
var alert = {msg:warning, type:'warning', glyphicon:'glyphicon-warning-sign'};
if (angular.isDefined(timeout)) {
- addAlert(alert, timeout);
+ $scope.addAlert(alert, timeout);
} else {
- addAlert(alert, conf.defaultAlertTimeWarning);
+ $scope.addAlert(alert, conf.defaultAlertTimeWarning);
}
});
+
$scope.$on('newSuccess', function (event, success, timeout) {
var alert = {msg:success, type:'success', glyphicon:'glyphicon-ok'};
if (angular.isDefined(timeout)) {
- addAlert(alert, timeout);
+ $scope.addAlert(alert, timeout);
} else {
- addAlert(alert, conf.defaultAlertTimeSuccess);
+ $scope.addAlert(alert, conf.defaultAlertTimeSuccess);
}
});
$scope.$on('newInfo', function (event, info, timeout) {
var alert = {msg:info, type:'info', glyphicon:'glyphicon-info-sign'};
if (angular.isDefined(timeout)) {
- addAlert(alert, timeout);
+ $scope.addAlert(alert, timeout);
} else {
- addAlert(alert, conf.defaultAlertTimeInfo);
+ $scope.addAlert(alert, conf.defaultAlertTimeInfo);
}
});
- var addAlert = function (alert, timeout) {
+ $scope.addAlert = function (alert, timeout) {
var alertNotExist = true;
angular.forEach($scope.data.alerts, function (oneAlert, key) {
if (angular.equals(oneAlert.msg, alert.msg) && angular.equals(oneAlert.type, alert.type)) {
diff --git a/pollen-ui-angular/src/test/unit/alertControllersTest.js b/pollen-ui-angular/src/test/unit/alertControllersTest.js
new file mode 100644
index 0000000..91b760a
--- /dev/null
+++ b/pollen-ui-angular/src/test/unit/alertControllersTest.js
@@ -0,0 +1,78 @@
+'use strict';
+
+///////////////////////////////
+//// TEST printAlertCtrl ////
+///////////////////////////////
+
+describe('Alert controller', function () {
+ var rootScope;
+ var $timeout;
+ var $scope = {};
+ var ctrl = null;
+
+ beforeEach(module('alertControllers'));
+ beforeEach(inject(function($rootScope, $controller) {
+ rootScope = $rootScope;
+ $scope = $rootScope.$new();
+ ctrl = $controller('printAlertCtrl', {$scope: $scope});
+ spyOn($rootScope, '$broadcast').andCallThrough();
+ }));
+
+ beforeEach(inject(function($injector) {
+ $timeout = $injector.get('$timeout');
+ }));
+
+
+ it('should load printAlertCtrl', function () {
+ expect(ctrl).toBeDefined();
+ expect(ctrl).not.toBeNull();
+ });
+
+ it('should init alerts array', function () {
+ expect($scope.data.alerts.length).toBeGreaterThan(-1);
+ });
+
+ it('should can add an alert', function () {
+ var nbAlert = $scope.data.alerts.length;
+ var alert = {msg:'message alert', type:'type'};
+
+ $scope.addAlert(alert, -1);
+
+ expect($scope.data.alerts.length).toEqual(nbAlert + 1);
+ });
+
+ it('should can delete my alert', function () {
+ var nbAlert = $scope.data.alerts.length;
+ var alert = {msg:'message alert', type:'type'};
+
+ $scope.addAlert(alert, -1);
+ $scope.hideAlert(alert);
+
+ expect($scope.data.alerts.length).toEqual(nbAlert);
+ });
+
+ it('should can\'t duplicate alert ', function () {
+ var nbAlert = $scope.data.alerts.length;
+ var alert = {msg:'message alert', type:'type'};
+
+ $scope.addAlert(alert, -1);
+ $scope.addAlert(alert, -1);
+
+ expect($scope.data.alerts.length).toEqual(nbAlert + 1);
+ });
+
+ it('should can hide an alert after timeout', function() {
+ var alert = {msg:'message alert', type:'type'};
+ var nbAlert = $scope.data.alerts.length;
+
+ $scope.addAlert(alert, 250);
+
+ // check now is added
+ expect($scope.data.alerts.length).toEqual(nbAlert + 1);
+
+ $timeout.flush();
+
+ // check now is hidden
+ expect($scope.data.alerts.length).toEqual(nbAlert);
+ });
+});
diff --git a/pollen-ui-angular/src/test/unit/pollControllersTest.js b/pollen-ui-angular/src/test/unit/pollControllersTest.js
index d658764..3f23721 100644
--- a/pollen-ui-angular/src/test/unit/pollControllersTest.js
+++ b/pollen-ui-angular/src/test/unit/pollControllersTest.js
@@ -1,8 +1,8 @@
'use strict';
-////////////////////////////
-///// TEST PollCtrl ////
-////////////////////////////
+///////////////////////////////
+//// TEST PollCtrl ////
+///////////////////////////////
describe('Global poll controller', function () {
beforeEach(module('pollControllers'));
@@ -177,6 +177,9 @@ describe('Global poll controller', function () {
});
});
+///////////////////////////////
+//// TEST PollAdminCtrl ////
+///////////////////////////////
describe('Admin poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -258,6 +261,9 @@ describe('Admin poll controller', function () {
});
+///////////////////////////////
+//// TEST PollCreateCtrl ////
+///////////////////////////////
describe('Create poll Controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -291,6 +297,9 @@ describe('Create poll Controller', function () {
});
});
+///////////////////////////////
+//// TEST PollEditCtrl ////
+///////////////////////////////
describe('Edit poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -349,6 +358,9 @@ describe('Edit poll controller', function () {
});
});
+///////////////////////////////
+//// TEST PollVoteCtrl ////
+///////////////////////////////
describe('Vote poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -406,6 +418,9 @@ describe('Vote poll controller', function () {
});
});
+///////////////////////////////
+//// TEST PollCommentCtrl ////
+///////////////////////////////
describe('Poll comment controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -462,6 +477,9 @@ describe('Poll comment controller', function () {
});
});
+///////////////////////////////
+//// TEST PollResultCtrl ////
+///////////////////////////////
describe('Poll result controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
@@ -484,6 +502,9 @@ describe('Poll result controller', function () {
});
});
+///////////////////////////////
+//// TEST PollListCtrl ////
+///////////////////////////////
describe('List of poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
This is an automated email from the git hooks/post-receive script.
New commit to branch feature/unitTest in repository pollen.
See http://git.chorem.org/pollen.git
commit 40ca60aa739b8aedc3f179213f9d667a0b3055ef
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Wed Jul 16 12:25:31 2014 +0200
add test for modules pollControllers
---
.../src/main/webapp/js/controllers/pollCtrl.js | 43 ++--
.../src/test/unit/pollControllersTest.js | 240 +++++++++++++++++++--
2 files changed, 250 insertions(+), 33 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 dafeadf..a59d583 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
@@ -540,10 +540,13 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
var initPoll = function () {
Poll.skeletonNew(function (poll) {
$scope.data.poll = poll;
- $scope.data.choices = [];
- $scope.data.vote = {};
- $scope.data.vote.choices = $scope.data.choices;
+ }, function (error) {
+ $scope.data.poll = {};
});
+
+ $scope.data.choices = [];
+ $scope.data.vote = {};
+ $scope.data.vote.choices = $scope.data.choices;
}
initPoll();
@@ -598,8 +601,6 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
Page.setTitle('title.poll.edit');
- $scope.globalVariables.edit = true;
-
////////////////////////////////
//// CHOICE /////
////////////////////////////////
@@ -694,10 +695,11 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
}
};
- var memberIsEmpty = function (member) {
+ $scope.memberIsEmpty = function (member) {
var isEmpty = true;
try {
- if (member.name != '' && member.email != '') {
+ if (angular.isDefined(member.name) && member.name != ''
+ || angular.isDefined(member.email) && member.email != '') {
isEmpty = false;
}
}
@@ -754,7 +756,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
var vl = {group: voterList.group, members:[]};
angular.forEach(voterList.members, function(member, key) {
- if (!memberIsEmpty(member)) {
+ if (!$scope.memberIsEmpty(member)) {
vl.members.push(member);
}
});
@@ -780,7 +782,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
voterList.group.restError = error.data;
var deltaError = 0;
angular.forEach(voterList.members, function (member, key) {
- if (!memberIsEmpty(member)) {
+ if (!$scope.memberIsEmpty(member)) {
var index = key - deltaError;
member.restError = {};
if (angular.isDefined(error.data['member['+index+'].name'])) {
@@ -807,7 +809,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
};
$scope.saveVoterListMember = function (member, voterList) {
- if (!memberIsEmpty(member)) {
+ if (!$scope.memberIsEmpty(member)) {
var vlId = voterList.group.id; // Id Voter list
var vlMemberPromise;
if (angular.isDefined(vlId)) {
@@ -1078,9 +1080,16 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
}
$scope.toggleValue = function (choice, event) {
- if ($scope.data.voteCountingType.renderType == 'checkbox') {
- choice.voteValue = !choice.voteValue;
- event.stopPropagation();
+ if ($scope.voteCountingIsBoolean()) {
+ if (angular.isUndefined(choice.voteValue)) {
+ choice.voteValue = true;
+ }
+ else {
+ choice.voteValue = !choice.voteValue;
+ }
+ if (angular.isDefined(event)) {
+ event.stopPropagation();
+ }
}
}
@@ -1099,7 +1108,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
$scope.tab = $scope.setTab('comment');
- $scope.globalVariables.commentMode = true;
+ //$scope.globalVariables.commentMode = true;
$scope.comment = {text:''};
var initAuthor = function () {
@@ -1110,6 +1119,8 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
else {
$scope.comment.authorName = $scope.session.user.email;
}
+ } else {
+ $scope.comment.authorName = '';
}
}; initAuthor();
@@ -1125,7 +1136,9 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
$scope.toggleOrder = function () {
$scope.desc = !$scope.desc;
paginationParameter.desc = $scope.desc;
- paginationParameter.pageNumber = $scope.data.commentsPagination.lastPage - $scope.data.commentsPagination.currentPage;
+ if (angular.isDefined($scope.data.commentsPagination)) {
+ paginationParameter.pageNumber = $scope.data.commentsPagination.lastPage - $scope.data.commentsPagination.currentPage;
+ }
initComments();
}
diff --git a/pollen-ui-angular/src/test/unit/pollControllersTest.js b/pollen-ui-angular/src/test/unit/pollControllersTest.js
index 9b69907..d658764 100644
--- a/pollen-ui-angular/src/test/unit/pollControllersTest.js
+++ b/pollen-ui-angular/src/test/unit/pollControllersTest.js
@@ -4,7 +4,7 @@
///// TEST PollCtrl ////
////////////////////////////
-describe('Test pollCtrl', function () {
+describe('Global poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
$scope = {};
@@ -175,10 +175,9 @@ describe('Test pollCtrl', function () {
expect(receiveChoice.choiceType).toEqual('IMAGE');
});
});
-
});
-describe('Test Admin Controller', function () {
+describe('Admin poll controller', function () {
beforeEach(module('pollControllers'));
beforeEach(inject(function($controller) {
$scope = {};
@@ -259,37 +258,242 @@ describe('Test Admin Controller', function () {
});
-describe('load poll controllers', function () {
+describe('Create poll Controller', function () {
beforeEach(module('pollControllers'));
-
- it('should load PollCreateCtrl', inject(function($controller) {
- var ctrl = $controller('PollCreateCtrl', {$scope:{}});
- expect(ctrl).toBeDefined();
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollCreateCtrl', {$scope:$scope});
}));
- it('should load PollEditCtrl', inject(function($controller) {
- var ctrl = $controller('PollEditCtrl', {$scope:{}});
+ var $scope = {};
+ var ctrl = null;
+
+ it('should load PollCreateCtrl', function() {
expect(ctrl).toBeDefined();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('edit');
+ });
+
+ it('should be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeTruthy();
+ });
+
+ it('should be on create mode', function () {
+ expect($scope.globalVariables.create).toBeTruthy();
+ });
+
+ it('should load base of poll', function () {
+ expect($scope.data.poll).toBeDefined();
+ expect($scope.data.choices).toBeDefined();
+ expect($scope.data.vote).toBeDefined();
+ expect($scope.data.vote.choices).toBeDefined();
+ });
+});
+
+describe('Edit poll controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollEditCtrl', {$scope:$scope});
}));
- it('should load PollVoteCtrl', inject(function($controller) {
- var ctrl = $controller('PollVoteCtrl', {$scope:{}});
+ var $scope = {};
+ var ctrl = null;
+
+ it('should load PollEditCtrl', function() {
expect(ctrl).toBeDefined();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('edit');
+ });
+
+ it('should be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeTruthy();
+ });
+
+ it('should detect is member is empty', function () {
+ var member, isEmpty;
+
+ // is empty
+
+ member = {};
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeTruthy();
+
+ member = {name:''}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeTruthy();
+
+ member = {email:''}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeTruthy();
+
+ member = {name:'', email:''}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeTruthy();
+
+ // is not empty
+
+ member = {name:'memberName'}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeFalsy();
+
+ member = {email:'member(a)pollen.org'}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeFalsy();
+
+ member = {name:'memberName', email:'member(a)pollen.org'}
+ isEmpty = $scope.memberIsEmpty(member);
+ expect(isEmpty).toBeFalsy();
+ });
+});
+
+describe('Vote poll controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollVoteCtrl', {$scope:$scope});
}));
- it('should load PollResultCtrl', inject(function($controller) {
- var ctrl = $controller('PollResultCtrl', {$scope:{}});
+ var ctrl = null;
+ var $scope = {};
+
+ it('should load PollVoteCtrl', function() {
expect(ctrl).toBeDefined();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('vote');
+ });
+
+ it('should not be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeFalsy();
+ });
+
+ it('should be toggle choiceValue', function () {
+ // force vote counting on boolean
+ $scope.data.voteCountingType = {renderType:'checkbox'};
+
+ // choice.voteValue init to false
+ runs( function () {
+ var choice = {voteValue : false};
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeTruthy();
+
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeFalsy();
+ });
+
+ // choice.voteValue init to true
+ runs( function () {
+ var choice = {voteValue : true};
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeFalsy();
+
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeTruthy();
+ });
+
+ // choice.voteValue is not defined
+ runs(function () {
+ var choice = {};
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeTruthy();
+
+ $scope.toggleValue(choice);
+ expect(choice.voteValue).toBeFalsy();
+ });
+ });
+});
+
+describe('Poll comment controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollCommentCtrl', {$scope:$scope});
}));
- it('should load PollCommentCtrl', inject(function($controller) {
- var ctrl = $controller('PollCommentCtrl', {$scope:{}});
+ var ctrl = null;
+ var $scope = {};
+
+ it('should load PollCommentCtrl', function() {
expect(ctrl).toBeDefined();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('comment');
+ });
+
+ it('should not be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeFalsy();
+ });
+
+ it('should initialize comment', function () {
+ expect($scope.comment.text).toBeDefined();
+ expect($scope.comment.authorName).toBeDefined();
+ });
+
+ it('should toggle order comments', function () {
+ // order desc
+ runs(function () {
+ $scope.desc = true;
+
+ $scope.toggleOrder();
+
+ expect($scope.desc).toBeFalsy();
+ });
+
+ // order asc
+ runs(function () {
+ $scope.desc = false;
+
+ $scope.toggleOrder();
+
+ expect($scope.desc).toBeTruthy();
+ });
+
+ // order not set
+ runs(function () {
+ delete $scope.desc;
+
+ $scope.toggleOrder();
+
+ expect($scope.desc).toBeTruthy();
+ });
+ });
+});
+
+describe('Poll result controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollResultCtrl', {$scope:$scope});
}));
- it('should load PollListCtrl', inject(function($controller) {
- var ctrl = $controller('PollListCtrl', {$scope:{}});
+ var ctrl = null;
+ var $scope = {};
+
+ it('should load PollResultCtrl', function() {
expect(ctrl).toBeDefined();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('result');
+ });
+
+ it('should not be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeFalsy();
+ });
+});
+
+describe('List of poll controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ ctrl = $controller('PollListCtrl', {$scope:$scope});
}));
+ var ctrl = null;
+ var $scope = {};
+
+ it('should load PollListCtrl', function() {
+ expect(ctrl).toBeDefined();
+ });
})
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
01/01: add test : check init variables in pollAdminCtrl and voterList behavior
by chorem.org scm 15 Jul '14
by chorem.org scm 15 Jul '14
15 Jul '14
This is an automated email from the git hooks/post-receive script.
New commit to branch feature/unitTest in repository pollen.
See http://git.chorem.org/pollen.git
commit 31b1bf28646473745dd83b0e38b4939a5e131562
Author: Adrien Garandel <a.garandel(a)dralagen.fr>
Date: Wed Jul 16 00:52:36 2014 +0200
add test : check init variables in pollAdminCtrl and voterList
behavior
---
.../src/test/unit/pollControllersTest.js | 81 ++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/pollen-ui-angular/src/test/unit/pollControllersTest.js b/pollen-ui-angular/src/test/unit/pollControllersTest.js
index f4bb7b3..9b69907 100644
--- a/pollen-ui-angular/src/test/unit/pollControllersTest.js
+++ b/pollen-ui-angular/src/test/unit/pollControllersTest.js
@@ -178,6 +178,87 @@ describe('Test pollCtrl', function () {
});
+describe('Test Admin Controller', function () {
+ beforeEach(module('pollControllers'));
+ beforeEach(inject(function($controller) {
+ $scope = {};
+ ctrl = $controller('PollAdminCtrl', {$scope: $scope});
+ }));
+
+ var $scope = {};
+ var ctrl = null;
+
+ it('should load PollAdminCtrl', function() {
+ expect(ctrl).toBeDefined();
+ expect(ctrl).not.toBeNull();
+ });
+
+ it('should set good default tab', function() {
+ expect($scope.tab).toEqual('edit');
+ });
+
+ it('should be on edited mode', function () {
+ expect($scope.globalVariables.editMode).toBeTruthy();
+ });
+
+ it('should init list of voterList group', function() {
+ expect($scope.data.voterList).toBeDefined();
+ expect($scope.data.voterList.length).toBeGreaterThan(-1);
+ })
+
+ it('should add a new group of voterList', function () {
+ $scope.addGroup();
+
+ // check addGroup create is an array
+ expect($scope.data.voterList.length).toBeGreaterThan(0);
+
+ // check addGroup add one group
+ var nbVoterList = $scope.data.voterList.length;
+ $scope.addGroup();
+ expect($scope.data.voterList.length).toEqual(nbVoterList + 1);
+ });
+
+ it('should new group have name, weight', function () {
+ // create one voterList group and get one
+ $scope.addGroup();
+ var voterList = $scope.data.voterList[0];
+
+ expect(voterList.group.name).toBeDefined;
+ expect(voterList.group.weight).toEqual(1.0);
+
+ });
+
+ it('should add a new voter in voterList', function () {
+ // create one voterList and get one
+ $scope.addGroup();
+
+ var voterList = $scope.data.voterList[0];
+
+ // check voterListMembers is an array
+ $scope.addVoter(0);
+ expect(voterList.members.length).toBeGreaterThan(0);
+
+ //check add voterListMembers add one member
+ var nbMember = voterList.members.length;
+ $scope.addVoter(0);
+ expect(voterList.members.length).toEqual(nbMember + 1);
+ });
+
+ it('should new member have name, email and weight', function () {
+ $scope.addGroup();
+ $scope.addVoter(0);
+
+ // get the first member of the first group
+ var member = $scope.data.voterList[0].members[0];
+
+ expect(member.name).toBeDefined();
+ expect(member.email).toBeDefined();
+ expect(member.weight).toEqual(1.0);
+
+ });
+
+});
+
describe('load poll controllers', function () {
beforeEach(module('pollControllers'));
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0