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
- 3196 discussions
21 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 53434c9b6a91a691548f07db1bc0a4617498c5b9
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Mon Jul 21 10:59:17 2014 +0200
don't save choice if don't have modification
---
.../src/main/webapp/js/controllers/pollCtrl.js | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 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 5c887ef..2df3ff7 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
@@ -451,10 +451,21 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
$scope.globalVariables.lastDate = angular.copy(choice.choiceValueDate);
}
else if (choice.choiceType == 'RESOURCE') {
- choice.choiceValue = choice.choiceValueImage;
+ if (angular.isUndefined(choiceEdit.choiceValue)
+ ||
+ angular.isDefined(choice.choiceValueImage)
+ &&
+ choice.choiceValueImage.id != choiceEdit.choiceValue.id) {
+ choice.choiceValue = choice.choiceValueImage;
+ }
}
- if (!angular.equals(choiceEdit, choice)) {
+ if (! angular.equals(choiceEdit.choiceValue, choice.choiceValue)
+ ||
+ choiceEdit.choiceType != choice.choiceType
+ ||
+ choiceEdit.description != choice.description) {
+
choiceEdit.choiceValue = choice.choiceValue;
choiceEdit.choiceType = choice.choiceType;
choiceEdit.description = choice.description;
@@ -466,11 +477,12 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
var PollPopChoiceCtrl = function ($scope, $modalInstance, title, choice, dateFormat) {
+ var oldChoice = angular.copy(choice);
+
$scope.title = title;
$scope.choice = choice;
$scope.dateFormat = dateFormat;
- var oldChoice = angular.copy(choice);
$scope.saveChoice = function () {
$modalInstance.dismiss();
--
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 75c98d8d817f98fb18a6b43d5a094f8a11f14cb1
Author: Tony CHEMIT <chemit(a)codelutin.com>
Date: Sat Jul 19 17:13:31 2014 +0200
fix dao code
---
.../pollen/persistence/entity/ChoiceTopiaDao.java | 27 ++++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
index da3a9e2..c0548ed 100644
--- a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
+++ b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
@@ -21,8 +21,6 @@ package org.chorem.pollen.persistence.entity;
* #L%
*/
-import org.nuiton.topia.persistence.TopiaNoResultException;
-
import java.util.List;
public class ChoiceTopiaDao extends AbstractChoiceTopiaDao<Choice> {
@@ -38,22 +36,21 @@ public class ChoiceTopiaDao extends AbstractChoiceTopiaDao<Choice> {
@Override
public void delete(Choice entity) {
- // remove Resource
+
if (entity.getChoiceType() == ChoiceType.RESOURCE) {
- try {
- PollenResourceTopiaDao dao = topiaDaoSupplier
- .getDao(PollenResource.class, PollenResourceTopiaDao.class);
- PollenResource resource = dao
- .forEquals(PollenResource.PROPERTY_TOPIA_ID, entity.getChoiceValue())
- .findUnique();
-
- dao.delete(resource);
-
- } catch (TopiaNoResultException e) {
- e.printStackTrace();
- }
+
+ // remove Resource
+ PollenResourceTopiaDao dao = topiaDaoSupplier
+ .getDao(PollenResource.class, PollenResourceTopiaDao.class);
+ PollenResource resource = dao
+ .forEquals(PollenResource.PROPERTY_TOPIA_ID, entity.getChoiceValue())
+ .findUnique();
+
+ dao.delete(resource);
+
}
super.delete(entity);
+
}
}
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
18 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 7e3993f58e57cd275bd014ea5c1006bcbe10cc37
Merge: 576df6d 289ef81
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Fri Jul 18 17:19:12 2014 +0200
Merge branch 'feature/checkDeleteRessource' into develop
.../pollen/persistence/entity/ChoiceTopiaDao.java | 23 +++++++++
pollen-persistence/src/main/xmi/pollen.zargo | Bin 20385 -> 20479 bytes
pollen-rest-api/src/main/resources/mapping | 2 +-
.../rest/api/converter/JsonArrayConverterTest.java | 4 +-
.../chorem/pollen/services/bean/ChoiceBean.java | 8 ++-
.../pollen/services/service/ChoiceService.java | 57 +++++++++------------
.../pollen/services/service/PollService.java | 3 ++
.../services/service/PollenResourceService.java | 31 +++++++++--
.../services/service/PollenServiceSupport.java | 2 +-
.../i18n/pollen-services_en_GB.properties | 4 +-
.../i18n/pollen-services_fr_FR.properties | 4 +-
.../src/main/webapp/js/controllers/pollCtrl.js | 10 ++--
pollen-ui-angular/src/main/webapp/js/directives.js | 17 ++++--
.../src/main/webapp/partials/inline-poll.html | 4 +-
.../src/main/webapp/partials/poll-popupChoice.html | 6 +--
.../{zoomImage.html => printResource.html} | 4 +-
.../src/test/unit/pollControllersTest.js | 10 ++--
17 files changed, 121 insertions(+), 68 deletions(-)
--
To stop receiving notification emails like this one, please contact
chorem.org SCM administrator <admin+scm(a)chorem.org>.
1
0
18 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 289ef818eb906830330351a2689afe4cbf98d3dd
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Fri Jul 18 17:12:36 2014 +0200
Auto delete resources when delete choice in ChoiceTopiaDao
---
.../pollen/persistence/entity/ChoiceTopiaDao.java | 23 +++++++++++
pollen-rest-api/src/main/resources/mapping | 2 +-
.../chorem/pollen/services/bean/ChoiceBean.java | 4 ++
.../pollen/services/service/ChoiceService.java | 45 +++++++++++++---------
.../services/service/PollenResourceService.java | 16 ++++----
.../i18n/pollen-services_en_GB.properties | 1 +
.../i18n/pollen-services_fr_FR.properties | 1 +
7 files changed, 64 insertions(+), 28 deletions(-)
diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
index 18206e2..da3a9e2 100644
--- a/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
+++ b/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceTopiaDao.java
@@ -21,6 +21,8 @@ package org.chorem.pollen.persistence.entity;
* #L%
*/
+import org.nuiton.topia.persistence.TopiaNoResultException;
+
import java.util.List;
public class ChoiceTopiaDao extends AbstractChoiceTopiaDao<Choice> {
@@ -33,4 +35,25 @@ public class ChoiceTopiaDao extends AbstractChoiceTopiaDao<Choice> {
return choices;
}
+
+ @Override
+ public void delete(Choice entity) {
+ // remove Resource
+ if (entity.getChoiceType() == ChoiceType.RESOURCE) {
+ try {
+ PollenResourceTopiaDao dao = topiaDaoSupplier
+ .getDao(PollenResource.class, PollenResourceTopiaDao.class);
+ PollenResource resource = dao
+ .forEquals(PollenResource.PROPERTY_TOPIA_ID, entity.getChoiceValue())
+ .findUnique();
+
+ dao.delete(resource);
+
+ } catch (TopiaNoResultException e) {
+ e.printStackTrace();
+ }
+ }
+
+ super.delete(entity);
+ }
}
diff --git a/pollen-rest-api/src/main/resources/mapping b/pollen-rest-api/src/main/resources/mapping
index 07e4877..1d55eb5 100644
--- a/pollen-rest-api/src/main/resources/mapping
+++ b/pollen-rest-api/src/main/resources/mapping
@@ -121,7 +121,7 @@ GET /v1/resources/{resourceId}/meta PollenResourceApi.getMetaReso
GET /v1/resources/{resourceId}/preview PollenResourceApi.getPreviewResource
POST /v1/resources PollenResourceApi.createResource
POST /v1/resources/{resourceId} PollenResourceApi.editResource
-DELETE /v1/resources/{resourceId} PollenResourceApi.deleteResource
+# DELETE /v1/resources/{resourceId} PollenResourceApi.deleteResource
# PollenUserApi
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 8f2a5cc..5b2ffb4 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
@@ -67,6 +67,10 @@ public class ChoiceBean extends PollenBean<Choice> {
case TEXT:
case DATE:
+
+ setChoiceValue(entity.getChoiceValue());
+ break;
+
case RESOURCE:
setChoiceValue(entity.getChoiceValue());
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 79c45bf..4eb39ad 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
@@ -27,12 +27,10 @@ import com.google.common.base.Function;
import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;
import org.chorem.pollen.persistence.entity.*;
-import org.chorem.pollen.services.PollenService;
import org.chorem.pollen.services.bean.ChoiceBean;
import org.chorem.pollen.services.bean.PollenEntityRef;
import org.chorem.pollen.services.service.security.PermissionVerb;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -53,6 +51,11 @@ public class ChoiceService extends PollenServiceSupport {
if (isNotPermitted(PermissionVerb.editChoice, input.getEntityId())) {
input.setPermission(null);
}
+
+ if (input.getChoiceType() == ChoiceType.RESOURCE) {
+ input.setChoiceValue(getPollenResourceService().getReduceIdByTopiaId(input.getChoiceValue()));
+ }
+
return input;
}
};
@@ -101,7 +104,7 @@ public class ChoiceService extends PollenServiceSupport {
// creator.setEmail(connectedUser.getEmail());
// }
//
-// ChoiceBean choiceBean = toBean(ChoiceBean.class, choiceBean );
+// ChoiceBean choiceBean = toBean(ChoiceBean.class, choiceBean, choiceBeanFunction);
return choiceBean;
}
@@ -149,7 +152,7 @@ public class ChoiceService extends PollenServiceSupport {
getNotificationService().onChoiceEdited(poll, result);
- return toBean(ChoiceBean.class, result);
+ return toBean(ChoiceBean.class, result, choiceBeanFunction);
}
@@ -172,14 +175,6 @@ public class ChoiceService extends PollenServiceSupport {
errors.failIfNotEmpty();
}
- if (choice.getChoiceType() == ChoiceType.RESOURCE) {
- PollenResourceService resourceService = getPollenResourceService();
-
- String resourceId = resourceService.getTopiaIdByReduceId(choice.getChoiceValue());
- PollenResource resource = resourceService.getResource0(resourceId);
- getPollenResourceDao().delete(resource);
- }
-
getChoiceDao().delete(choice);
commit();
@@ -243,11 +238,15 @@ public class ChoiceService extends PollenServiceSupport {
case TEXT:
case DATE:
- case RESOURCE:
toSave.setChoiceValue(choice.getChoiceValue());
break;
+ case RESOURCE:
+
+ toSave.setChoiceValue(getPollenResourceService().getTopiaIdByReduceId(choice.getChoiceValue()));
+ break;
+
default:
throw new UnsupportedOperationException("Unexpected value : " + toSave.getChoiceType());
@@ -326,13 +325,21 @@ public class ChoiceService extends PollenServiceSupport {
break;
case RESOURCE:
- PollenResourceService resourceService = getPollenResourceService();
- PollenResource resource = resourceService.getResource0(resourceService.getTopiaIdByReduceId(choice.getChoiceValue()));
- checkNotBlank(errors,
- "choiceValue",
- resource.getName(),
- l(getLocale(), "pollen.error.resource.notExist"));
+ boolean hasResource = checkNotBlank(errors,
+ "choiceValue",
+ choice.getChoiceValue(),
+ l(getLocale(), "pollen.error.resource.empty"));
+
+ if (hasResource) {
+ PollenResourceService resourceService = getPollenResourceService();
+ PollenResource resource = resourceService.getResource0(resourceService.getTopiaIdByReduceId(choice.getChoiceValue()));
+
+ checkNotBlank(errors,
+ "choiceValue",
+ resource.getName(),
+ l(getLocale(), "pollen.error.resource.notExist"));
+ }
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 742a6fa..379579a 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
@@ -1,17 +1,15 @@
package org.chorem.pollen.services.service;
-import org.apache.shiro.authz.UnauthorizedException;
import org.chorem.pollen.persistence.entity.Choice;
import org.chorem.pollen.persistence.entity.ChoiceType;
import org.chorem.pollen.persistence.entity.PollenResource;
import org.chorem.pollen.services.PollenService;
import org.chorem.pollen.services.bean.*;
+import org.chorem.pollen.services.service.security.PollenUnauthorizedException;
import org.nuiton.topia.persistence.TopiaIdFactory;
import java.io.IOException;
import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
/**
* Created on 10/07/14.
@@ -64,14 +62,17 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
public void deleteResource (String resourceId) {
checkNotNull(resourceId);
- List<Choice> choices = getChoiceDao().forEquals(Choice.PROPERTY_CHOICE_TYPE, ChoiceType.RESOURCE).addEquals(Choice.PROPERTY_CHOICE_VALUE, getReduceId(resourceId)).findAll();
+ boolean choiceExist = getChoiceDao()
+ .forEquals(Choice.PROPERTY_CHOICE_TYPE, ChoiceType.RESOURCE)
+ .addEquals(Choice.PROPERTY_CHOICE_VALUE, resourceId)
+ .exists();
- if (choices.size() == 0) { // Resource not used in choice
+ if (!choiceExist) { // Resource not used in choice
PollenResource resource = getResource0(resourceId);
getPollenResourceDao().delete(resource);
}
else {
- throw new UnauthorizedException("PollenResource is used");
+ throw new PollenUnauthorizedException("PollenResource is used");
}
commit();
@@ -80,7 +81,6 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
protected PollenResource getResource0(String resourceId) {
PollenResource resource = getPollenResourceDao().forTopiaIdEquals(resourceId).findUnique();
-
return resource;
}
@@ -122,7 +122,7 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
return resourceId.getEntityId();
}
- protected String getReduceId(String topiaId) {
+ protected String getReduceIdByTopiaId(String topiaId) {
PollenEntityId<PollenResource> resourceId = PollenEntityId.newId(PollenResource.class);
resourceId.setEntityId(topiaId);
TopiaIdFactory topiaIdFactory = serviceContext.getTopiaApplicationContext().getTopiaIdFactory();
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 4e60c30..be4953d 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
@@ -40,6 +40,7 @@ pollen.error.poll.voteCountingType.mandatory=vote counting type is mandatory
pollen.error.poll.voteVisibility.mandatory=vote visibility is mandatory
pollen.error.poll.voterList.mandatory.for.groupedPoll=At least one voter list ins mandatory for a grouped poll
pollen.error.poll.voterList.mismatch.freePoll=
+pollen.error.resource.empty=No resource sent
pollen.error.resource.notExist=Image don't exist
pollen.error.user.mailEmpty=email can not be empty
pollen.error.user.mailExist=email already exists
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 93bdce1..137807f 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
@@ -39,6 +39,7 @@ pollen.error.poll.voteCountingType.mandatory=le type de vote est obligatoire
pollen.error.poll.voteVisibility.mandatory=la visiblité des votes est obligatoire
pollen.error.poll.voterList.mandatory.for.groupedPoll=Au moins une liste de votant est obligatoire pour un sondage groupé
pollen.error.poll.voterList.mismatch.freePoll=Liste de votants impossible pour un sondage libre
+pollen.error.resource.empty=Aucune resource envoyé
pollen.error.resource.notExist=L'image n'existe pas sur le serveur
pollen.error.user.mailEmpty=Courriel ne peut pas être vide
pollen.error.user.mailExist=Courriel existe déjà
--
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 6e708eb9f59ec6c7aac74d352eae7e660b1eacbb
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Fri Jul 18 15:13:30 2014 +0200
rename ChoiceType.IMAGE to ChoiceType.RESOURCE
---
pollen-persistence/src/main/xmi/pollen.zargo | Bin 20385 -> 20479 bytes
.../rest/api/converter/JsonArrayConverterTest.java | 4 +--
.../chorem/pollen/services/bean/ChoiceBean.java | 4 +--
.../pollen/services/service/ChoiceService.java | 30 +++++----------------
.../services/service/PollenResourceService.java | 5 +---
.../i18n/pollen-services_en_GB.properties | 3 +--
.../i18n/pollen-services_fr_FR.properties | 3 +--
.../src/main/webapp/js/controllers/pollCtrl.js | 10 +++----
pollen-ui-angular/src/main/webapp/js/directives.js | 17 +++++++++---
.../src/main/webapp/partials/inline-poll.html | 4 +--
.../src/main/webapp/partials/poll-popupChoice.html | 6 ++---
.../{zoomImage.html => printResource.html} | 4 +--
.../src/test/unit/pollControllersTest.js | 10 +++----
13 files changed, 44 insertions(+), 56 deletions(-)
diff --git a/pollen-persistence/src/main/xmi/pollen.zargo b/pollen-persistence/src/main/xmi/pollen.zargo
index a6810ea..8f51a6f 100644
Binary files a/pollen-persistence/src/main/xmi/pollen.zargo and b/pollen-persistence/src/main/xmi/pollen.zargo differ
diff --git a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java
index 6b86791..085d5a3 100644
--- a/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java
+++ b/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/converter/JsonArrayConverterTest.java
@@ -33,7 +33,7 @@ public class JsonArrayConverterTest {
public void convertToType() throws Exception {
String choicesStr = "[ {id: \"AAAA\", choiceValue: \"choice1\", choiceType: \"TEXT\", choiceOrder: 1}, " +
- " {id: \"BBBB\", choiceValue: \"choice2\", choiceType: \"IMAGE\", choiceOrder: 2} ]";
+ " {id: \"BBBB\", choiceValue: \"choice2\", choiceType: \"RESOURCE\", choiceOrder: 2} ]";
JsonArrayConverter converter = JsonArrayConverter.newConverter(new DefaultTopiaIdFactory(), ChoiceBean.class);
@@ -48,7 +48,7 @@ public class JsonArrayConverterTest {
Assert.assertNotNull(choices[1]);
Assert.assertEquals("choice2", choices[1].getChoiceValue());
- Assert.assertEquals(ChoiceType.IMAGE, choices[1].getChoiceType());
+ Assert.assertEquals(ChoiceType.RESOURCE, choices[1].getChoiceType());
Assert.assertEquals(2, choices[1].getChoiceOrder());
}
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 aa0bf6b..8f2a5cc 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
@@ -67,7 +67,7 @@ public class ChoiceBean extends PollenBean<Choice> {
case TEXT:
case DATE:
- case IMAGE:
+ case RESOURCE:
setChoiceValue(entity.getChoiceValue());
break;
@@ -100,7 +100,7 @@ public class ChoiceBean extends PollenBean<Choice> {
break;
case DATE:
- case IMAGE:
+ case RESOURCE:
if ( getChoiceValue() != null ) {
entity.setChoiceValue(getChoiceValue());
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 06ab67e..79c45bf 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
@@ -172,7 +172,7 @@ public class ChoiceService extends PollenServiceSupport {
errors.failIfNotEmpty();
}
- if (choice.getChoiceType() == ChoiceType.IMAGE) {
+ if (choice.getChoiceType() == ChoiceType.RESOURCE) {
PollenResourceService resourceService = getPollenResourceService();
String resourceId = resourceService.getTopiaIdByReduceId(choice.getChoiceValue());
@@ -243,7 +243,7 @@ public class ChoiceService extends PollenServiceSupport {
case TEXT:
case DATE:
- case IMAGE:
+ case RESOURCE:
toSave.setChoiceValue(choice.getChoiceValue());
break;
@@ -325,30 +325,14 @@ public class ChoiceService extends PollenServiceSupport {
break;
- case IMAGE:
+ case RESOURCE:
PollenResourceService resourceService = getPollenResourceService();
PollenResource resource = resourceService.getResource0(resourceService.getTopiaIdByReduceId(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"));
- }
+ checkNotBlank(errors,
+ "choiceValue",
+ resource.getName(),
+ l(getLocale(), "pollen.error.resource.notExist"));
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 9a67b0e..742a6fa 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
@@ -64,10 +64,7 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
public void deleteResource (String resourceId) {
checkNotNull(resourceId);
- List<ChoiceType> choiceTypesResource = new ArrayList<>();
- choiceTypesResource.add(ChoiceType.IMAGE);
-
- List<Choice> choices = getChoiceDao().forIn(Choice.PROPERTY_CHOICE_TYPE, choiceTypesResource).addEquals(Choice.PROPERTY_CHOICE_VALUE, getReduceId(resourceId)).findAll();
+ List<Choice> choices = getChoiceDao().forEquals(Choice.PROPERTY_CHOICE_TYPE, ChoiceType.RESOURCE).addEquals(Choice.PROPERTY_CHOICE_VALUE, getReduceId(resourceId)).findAll();
if (choices.size() == 0) { // Resource not used in choice
PollenResource resource = getResource0(resourceId);
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 ba4905e..4e60c30 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,8 +29,6 @@ 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
@@ -42,6 +40,7 @@ pollen.error.poll.voteCountingType.mandatory=vote counting type is mandatory
pollen.error.poll.voteVisibility.mandatory=vote visibility is mandatory
pollen.error.poll.voterList.mandatory.for.groupedPoll=At least one voter list ins mandatory for a grouped poll
pollen.error.poll.voterList.mismatch.freePoll=
+pollen.error.resource.notExist=Image don't exist
pollen.error.user.mailEmpty=email can not be empty
pollen.error.user.mailExist=email already exists
pollen.error.user.mailInvalid=email is not valid
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 b37f11a..93bdce1 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,8 +29,6 @@ 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
@@ -41,6 +39,7 @@ pollen.error.poll.voteCountingType.mandatory=le type de vote est obligatoire
pollen.error.poll.voteVisibility.mandatory=la visiblité des votes est obligatoire
pollen.error.poll.voterList.mandatory.for.groupedPoll=Au moins une liste de votant est obligatoire pour un sondage groupé
pollen.error.poll.voterList.mismatch.freePoll=Liste de votants impossible pour un sondage libre
+pollen.error.resource.notExist=L'image n'existe pas sur le serveur
pollen.error.user.mailEmpty=Courriel ne peut pas être vide
pollen.error.user.mailExist=Courriel existe déjà
pollen.error.user.mailInvalid=Courriel est invalide
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 95d2ed9..5c887ef 100644
--- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
+++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
@@ -216,7 +216,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
choice.choiceValue = null;
}
}
- else if (choice.choiceType == 'IMAGE') {
+ else if (choice.choiceType == 'RESOURCE') {
try {
choice.choiceValue = choice.choiceValue.meta.id;
} catch (e) {
@@ -231,7 +231,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
if (choice.choiceType == 'DATE') {
choice.choiceValue = new Date(Number(choice.choiceValue));
}
- else if (choice.choiceType == 'IMAGE') {
+ else if (choice.choiceType == 'RESOURCE') {
var resourceId = choice.choiceValue;
choice.choiceValue = {meta:{id:resourceId}, data:conf.restURL+'/resources/'+resourceId, id: resourceId};
PollenResource.getMeta({resourceId : resourceId}, function (data) {
@@ -423,7 +423,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
else if (choice.choiceType == 'DATE') {
choice.choiceValueDate = choice.choiceValue;
}
- else if (choice.choiceType == 'IMAGE') {
+ else if (choice.choiceType == 'RESOURCE') {
choice.choiceValueImage = choice.choiceValue;
}
@@ -450,7 +450,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
choice.choiceValue = choice.choiceValueDate;
$scope.globalVariables.lastDate = angular.copy(choice.choiceValueDate);
}
- else if (choice.choiceType == 'IMAGE') {
+ else if (choice.choiceType == 'RESOURCE') {
choice.choiceValue = choice.choiceValueImage;
}
@@ -1319,7 +1319,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr
scores.push([$filter('date')(value.choice.choiceValue, $scope.globalVariables.dateFormat), value.scoreValue]);
break;
- case 'IMAGE':
+ case 'RESOURCE':
scores.push([value.choice.choiceValue.meta.name, value.scoreValue]);
break;
diff --git a/pollen-ui-angular/src/main/webapp/js/directives.js b/pollen-ui-angular/src/main/webapp/js/directives.js
index d1c4c01..d58f819 100644
--- a/pollen-ui-angular/src/main/webapp/js/directives.js
+++ b/pollen-ui-angular/src/main/webapp/js/directives.js
@@ -437,10 +437,10 @@ angular.module('pollenDirective', [])
}])
//////////////////////////////////////
-///// ZOOM IMAGE /////
+///// PRINT RESOURCE /////
//////////////////////////////////////
-.directive("zoomImage", function () {
+.directive("printResource", ['$timeout', function ($timeout) {
return {
restrict : "E",
scope : {
@@ -448,10 +448,19 @@ angular.module('pollenDirective', [])
name : "="
},
transclude : true,
- templateUrl : "partials/zoomImage.html",
+ templateUrl : "partials/printResource.html",
link : function (scope, element, attrs) {
scope.showImage = false;
+ $timeout(function () {
+ scope.$watch('image', function (newVal) {
+ if (angular.isDefined(newVal)) {
+ scope.resourceURL = conf.restURL+"/resources/"+scope.image;
+ scope.previewURL = scope.resourceURL+"/preview";
+ }
+ });
+ });
+
var toggleZoom = function () {
scope.$apply(function() {
scope.showImage = !scope.showImage;
@@ -463,4 +472,4 @@ angular.module('pollenDirective', [])
});
}
}
-})
\ No newline at end of file
+}])
\ 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 4290225..deec251 100644
--- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
+++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
@@ -48,13 +48,13 @@
<input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/>
</div>
</div>
- <div ng-if="choice.choiceType == 'IMAGE'">
+ <div ng-if="choice.choiceType == 'RESOURCE'">
<div class="fixe-input" title="{{choice.description}}">
{{choice.choiceValue.meta.name}}
<info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error>
<input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/>
<br/>
- <zoom-image image="choice.choiceValue.data" name="choice.choiceValue.meta.name"></zoom-image>
+ <print-resource image="choice.choiceValue.id" name="choice.choiceValue.meta.name"></print-resource>
</div>
diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html b/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html
index 0a5a988..9262100 100644
--- a/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html
+++ b/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html
@@ -31,7 +31,7 @@
<div class="col-sm-8 btn-group">
<button type="button" class="btn btn-default" ng-model="choice.choiceType" btn-radio="'TEXT'">Text</button>
<button type="button" class="btn btn-default" ng-model="choice.choiceType" btn-radio="'DATE'">Date</button>
- <button type="button" class="btn btn-default" ng-model="choice.choiceType" btn-radio="'IMAGE'">Image</button>
+ <button type="button" class="btn btn-default" ng-model="choice.choiceType" btn-radio="'RESOURCE'">Resource</button>
</div>
</div>
@@ -54,8 +54,8 @@
</div>
</div>
- <div class="form-group" ng-if="choice.choiceType == 'IMAGE'">
- <label class="col-sm-4 control-label">Image : </label>
+ <div class="form-group" ng-if="choice.choiceType == 'RESOURCE'">
+ <label class="col-sm-4 control-label">Resource : </label>
<div class="col-sm-6">
<upload-file ng-model="choice.choiceValueImage"></upload-file>
diff --git a/pollen-ui-angular/src/main/webapp/partials/zoomImage.html b/pollen-ui-angular/src/main/webapp/partials/printResource.html
similarity index 51%
rename from pollen-ui-angular/src/main/webapp/partials/zoomImage.html
rename to pollen-ui-angular/src/main/webapp/partials/printResource.html
index 43db544..74fbdbc 100644
--- a/pollen-ui-angular/src/main/webapp/partials/zoomImage.html
+++ b/pollen-ui-angular/src/main/webapp/partials/printResource.html
@@ -1,7 +1,7 @@
-<div><img ng-attr-src="{{image}}" /></div>
+<div><img ng-attr-src="{{previewURL}}" /></div>
<div ng-show="showImage" class="full">
<div class="full-content">
<span>{{name}}</span>
- <img ng-attr-src="{{image}}" />
+ <img ng-attr-src="{{resourceURL}}" />
</div>
</div>
\ No newline at end of file
diff --git a/pollen-ui-angular/src/test/unit/pollControllersTest.js b/pollen-ui-angular/src/test/unit/pollControllersTest.js
index 3f23721..a9c5083 100644
--- a/pollen-ui-angular/src/test/unit/pollControllersTest.js
+++ b/pollen-ui-angular/src/test/unit/pollControllersTest.js
@@ -126,17 +126,17 @@ describe('Global poll controller', function () {
runs(function () {
var makeChoice, sendChoice;
- makeChoice = {choiceType:'IMAGE', choiceValue:'not an image'};
+ makeChoice = {choiceType:'RESOURCE', choiceValue:'not an image'};
sendChoice = $scope.preSendChoice(makeChoice);
expect(sendChoice.choiceValue).toBeNull();
- expect(sendChoice.choiceType).toEqual('IMAGE');
+ expect(sendChoice.choiceType).toEqual('RESOURCE');
makeChoice.choiceValue = {meta:{name:'image.png', id:'shortTopiaId'}, data:'urlpicture', id:'shortTopiaId'};
sendChoice = $scope.preSendChoice(makeChoice);
expect(sendChoice.choiceValue).toEqual('shortTopiaId');
- expect(sendChoice.choiceType).toEqual('IMAGE');
+ expect(sendChoice.choiceType).toEqual('RESOURCE');
});
});
@@ -166,13 +166,13 @@ describe('Global poll controller', function () {
runs(function () {
var makeChoice, receiveChoice;
- makeChoice = {choiceType:'IMAGE', choiceValue:'shortTopiaId'};
+ makeChoice = {choiceType:'RESOURCE', choiceValue:'shortTopiaId'};
receiveChoice = $scope.postReceiveChoice(makeChoice);
expect(receiveChoice.choiceValue.id).toEqual('shortTopiaId');
expect(receiveChoice.choiceValue.meta.id).toEqual('shortTopiaId');
expect(receiveChoice.choiceValue.data).toEqual(conf.restURL+'/resources/shortTopiaId');
- expect(receiveChoice.choiceType).toEqual('IMAGE');
+ expect(receiveChoice.choiceType).toEqual('RESOURCE');
});
});
});
--
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 44c24dc6adc476911d1f0b0eb80a25b4c103006e
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Fri Jul 18 15:02:41 2014 +0200
delete resource : check if not used
---
.../pollen/services/service/ChoiceService.java | 10 ++++---
.../pollen/services/service/PollService.java | 3 ++
.../services/service/PollenResourceService.java | 32 +++++++++++++++++++---
.../services/service/PollenServiceSupport.java | 2 +-
4 files changed, 38 insertions(+), 9 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 268a212..06ab67e 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
@@ -27,6 +27,7 @@ import com.google.common.base.Function;
import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;
import org.chorem.pollen.persistence.entity.*;
+import org.chorem.pollen.services.PollenService;
import org.chorem.pollen.services.bean.ChoiceBean;
import org.chorem.pollen.services.bean.PollenEntityRef;
import org.chorem.pollen.services.service.security.PermissionVerb;
@@ -172,9 +173,10 @@ public class ChoiceService extends PollenServiceSupport {
}
if (choice.getChoiceType() == ChoiceType.IMAGE) {
+ PollenResourceService resourceService = getPollenResourceService();
- PollenResource resource = getResourceService().getResourceByShortId(choice.getChoiceValue());
-
+ String resourceId = resourceService.getTopiaIdByReduceId(choice.getChoiceValue());
+ PollenResource resource = resourceService.getResource0(resourceId);
getPollenResourceDao().delete(resource);
}
@@ -324,8 +326,8 @@ public class ChoiceService extends PollenServiceSupport {
break;
case IMAGE:
-
- PollenResource resource = getResourceService().getResourceByShortId(choice.getChoiceValue());
+ PollenResourceService resourceService = getPollenResourceService();
+ PollenResource resource = resourceService.getResource0(resourceService.getTopiaIdByReduceId(choice.getChoiceValue()));
boolean resourceExist = checkNotBlank(errors,
"choiceValue",
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
index 6261e08..77baf7e 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
@@ -204,6 +204,9 @@ public class PollService extends PollenServiceSupport {
Poll poll = getPoll0(pollId);
getPollDao().delete(poll);
+
+ //TODO agarandel 18/07/14 : Check resource without choice
+
commit();
getNotificationService().onPollDeleted(poll);
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 c4f296e..9a67b0e 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
@@ -1,5 +1,8 @@
package org.chorem.pollen.services.service;
+import org.apache.shiro.authz.UnauthorizedException;
+import org.chorem.pollen.persistence.entity.Choice;
+import org.chorem.pollen.persistence.entity.ChoiceType;
import org.chorem.pollen.persistence.entity.PollenResource;
import org.chorem.pollen.services.PollenService;
import org.chorem.pollen.services.bean.*;
@@ -7,6 +10,8 @@ import org.nuiton.topia.persistence.TopiaIdFactory;
import java.io.IOException;
import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
/**
* Created on 10/07/14.
@@ -59,9 +64,19 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
public void deleteResource (String resourceId) {
checkNotNull(resourceId);
- PollenResource resource = getResource0(resourceId);
+ List<ChoiceType> choiceTypesResource = new ArrayList<>();
+ choiceTypesResource.add(ChoiceType.IMAGE);
+
+ List<Choice> choices = getChoiceDao().forIn(Choice.PROPERTY_CHOICE_TYPE, choiceTypesResource).addEquals(Choice.PROPERTY_CHOICE_VALUE, getReduceId(resourceId)).findAll();
+
+ if (choices.size() == 0) { // Resource not used in choice
+ PollenResource resource = getResource0(resourceId);
+ getPollenResourceDao().delete(resource);
+ }
+ else {
+ throw new UnauthorizedException("PollenResource is used");
+ }
- getPollenResourceDao().delete(resource);
commit();
}
@@ -101,12 +116,21 @@ public class PollenResourceService extends PollenServiceSupport implements Polle
return toSave;
}
- public PollenResource getResourceByShortId(String shortId) {
+ protected String getTopiaIdByReduceId(String shortId) {
PollenEntityId<PollenResource> resourceId = PollenEntityId.newId(PollenResource.class);
resourceId.setReducedId(shortId);
TopiaIdFactory topiaIdFactory = serviceContext.getTopiaApplicationContext().getTopiaIdFactory();
resourceId.decode(topiaIdFactory);
- return getResource0(resourceId.getEntityId());
+ return resourceId.getEntityId();
+ }
+
+ protected String getReduceId(String topiaId) {
+ PollenEntityId<PollenResource> resourceId = PollenEntityId.newId(PollenResource.class);
+ resourceId.setEntityId(topiaId);
+ TopiaIdFactory topiaIdFactory = serviceContext.getTopiaApplicationContext().getTopiaIdFactory();
+ resourceId.encode(topiaIdFactory);
+
+ return resourceId.getReducedId();
}
}
diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenServiceSupport.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenServiceSupport.java
index 71c2aca..97fb35f 100644
--- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenServiceSupport.java
+++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenServiceSupport.java
@@ -123,7 +123,7 @@ public abstract class PollenServiceSupport implements PollenService {
return newService(SecurityService.class);
}
- protected PollenResourceService getResourceService() {
+ protected PollenResourceService getPollenResourceService() {
return newService(PollenResourceService.class);
}
--
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 576df6d287f7981a72bcedfdbf9533ce5061c5ee
Author: Adrien <a.garandel(a)dralagen.fr>
Date: Fri Jul 18 15:03:40 2014 +0200
change jqplot to jqplot-bower who have tags version
---
pollen-ui-angular/.bowerrc | 3 ++-
pollen-ui-angular/bower.json | 4 ++--
pollen-ui-angular/src/main/webapp/index.html | 14 +++++++-------
pollen-ui-angular/src/test/karma.conf.js | 8 +-------
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/pollen-ui-angular/.bowerrc b/pollen-ui-angular/.bowerrc
index 52e49a3..80c5b33 100644
--- a/pollen-ui-angular/.bowerrc
+++ b/pollen-ui-angular/.bowerrc
@@ -1,4 +1,5 @@
{
- "directory" : "./src/main/webapp/lib"
+ "directory" : "./src/main/webapp/lib",
+ "analytics": false
}
diff --git a/pollen-ui-angular/bower.json b/pollen-ui-angular/bower.json
index 7261c1b..905062e 100644
--- a/pollen-ui-angular/bower.json
+++ b/pollen-ui-angular/bower.json
@@ -17,9 +17,9 @@
"angular-animate": "1.2.16",
"bootstrap": "3.1.1",
"jquery": "2.1.1",
- "jqplot": "*",
"ckeditor": "4.4.2",
- "less": "1.7.3"
+ "less": "1.7.3",
+ "jqplot-bower": "1.0.8"
},
"devDependencies": {
"angular-mocks": "1.2.16"
diff --git a/pollen-ui-angular/src/main/webapp/index.html b/pollen-ui-angular/src/main/webapp/index.html
index 289e79f..e2716f3 100644
--- a/pollen-ui-angular/src/main/webapp/index.html
+++ b/pollen-ui-angular/src/main/webapp/index.html
@@ -25,7 +25,7 @@
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap/dist/css/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="lib/jqplot/jquery.jqplot.min.css" />
+ <link rel="stylesheet" type="text/css" href="lib/jqplot-bower/dist//jquery.jqplot.min.css" />
<!-- TODO : compile less to css
$ lessc -x less/style.less css/style.css
ou
@@ -38,12 +38,12 @@
<script language="javascript" type="text/javascript" src="js/conf.js"></script>
<script language="javascript" type="text/javascript" src="lib/jquery/dist/jquery.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/jquery.jqplot.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.barRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.pointLabels.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.highlighter.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//jquery.jqplot.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.barRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.pieRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.categoryAxisRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.pointLabels.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.highlighter.min.js"></script>
<script language="javascript" type="text/javascript" src="lib/ckeditor/ckeditor.js"></script>
diff --git a/pollen-ui-angular/src/test/karma.conf.js b/pollen-ui-angular/src/test/karma.conf.js
index 3959745..8c352a3 100644
--- a/pollen-ui-angular/src/test/karma.conf.js
+++ b/pollen-ui-angular/src/test/karma.conf.js
@@ -17,13 +17,7 @@ module.exports = function(config) {
files: [
'src/main/webapp/js/conf.js.exemple', // fix conf is not defined for controller
'src/main/webapp/lib/jquery/dist/jquery.min.js',
- 'src/main/webapp/lib/jqplot/jquery.jqplot.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.barRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.pieRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.pointLabels.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.highlighter.min.js',
- 'src/main/webapp/lib/ckeditor/ckeditor.js',
+ 'src/main/webapp/lib/ckeditor/ckeditor.js',
'src/main/webapp/lib/angular/angular.js',
'src/main/webapp/lib/angular-mocks/angular-mocks.js',
'src/main/webapp/lib/angular-bootstrap/ui-bootstrap-tpls.js',
--
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 f3b41c002c6f59e9807db3380b6c9b069e2be384
Author: Dralagen <dralagen(a)dralagen.fr>
Date: Fri Jul 18 09:21:07 2014 +0200
change jqplot to jqplot-bower who have tags version
---
pollen-ui-angular/.bowerrc | 3 ++-
pollen-ui-angular/bower.json | 4 ++--
pollen-ui-angular/src/main/webapp/index.html | 14 +++++++-------
pollen-ui-angular/src/test/karma.conf.js | 8 +-------
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/pollen-ui-angular/.bowerrc b/pollen-ui-angular/.bowerrc
index 52e49a3..80c5b33 100644
--- a/pollen-ui-angular/.bowerrc
+++ b/pollen-ui-angular/.bowerrc
@@ -1,4 +1,5 @@
{
- "directory" : "./src/main/webapp/lib"
+ "directory" : "./src/main/webapp/lib",
+ "analytics": false
}
diff --git a/pollen-ui-angular/bower.json b/pollen-ui-angular/bower.json
index 7261c1b..905062e 100644
--- a/pollen-ui-angular/bower.json
+++ b/pollen-ui-angular/bower.json
@@ -17,9 +17,9 @@
"angular-animate": "1.2.16",
"bootstrap": "3.1.1",
"jquery": "2.1.1",
- "jqplot": "*",
"ckeditor": "4.4.2",
- "less": "1.7.3"
+ "less": "1.7.3",
+ "jqplot-bower": "1.0.8"
},
"devDependencies": {
"angular-mocks": "1.2.16"
diff --git a/pollen-ui-angular/src/main/webapp/index.html b/pollen-ui-angular/src/main/webapp/index.html
index 289e79f..e2716f3 100644
--- a/pollen-ui-angular/src/main/webapp/index.html
+++ b/pollen-ui-angular/src/main/webapp/index.html
@@ -25,7 +25,7 @@
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap/dist/css/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="lib/jqplot/jquery.jqplot.min.css" />
+ <link rel="stylesheet" type="text/css" href="lib/jqplot-bower/dist//jquery.jqplot.min.css" />
<!-- TODO : compile less to css
$ lessc -x less/style.less css/style.css
ou
@@ -38,12 +38,12 @@
<script language="javascript" type="text/javascript" src="js/conf.js"></script>
<script language="javascript" type="text/javascript" src="lib/jquery/dist/jquery.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/jquery.jqplot.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.barRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.pointLabels.min.js"></script>
- <script language="javascript" type="text/javascript" src="lib/jqplot/plugins/jqplot.highlighter.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//jquery.jqplot.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.barRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.pieRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.categoryAxisRenderer.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.pointLabels.min.js"></script>
+ <script language="javascript" type="text/javascript" src="lib/jqplot-bower/dist//plugins/jqplot.highlighter.min.js"></script>
<script language="javascript" type="text/javascript" src="lib/ckeditor/ckeditor.js"></script>
diff --git a/pollen-ui-angular/src/test/karma.conf.js b/pollen-ui-angular/src/test/karma.conf.js
index 3959745..8c352a3 100644
--- a/pollen-ui-angular/src/test/karma.conf.js
+++ b/pollen-ui-angular/src/test/karma.conf.js
@@ -17,13 +17,7 @@ module.exports = function(config) {
files: [
'src/main/webapp/js/conf.js.exemple', // fix conf is not defined for controller
'src/main/webapp/lib/jquery/dist/jquery.min.js',
- 'src/main/webapp/lib/jqplot/jquery.jqplot.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.barRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.pieRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.pointLabels.min.js',
- 'src/main/webapp/lib/jqplot/plugins/jqplot.highlighter.min.js',
- 'src/main/webapp/lib/ckeditor/ckeditor.js',
+ 'src/main/webapp/lib/ckeditor/ckeditor.js',
'src/main/webapp/lib/angular/angular.js',
'src/main/webapp/lib/angular-mocks/angular-mocks.js',
'src/main/webapp/lib/angular-bootstrap/ui-bootstrap-tpls.js',
--
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 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