branch develop updated (065aa161 -> 540d368f)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 065aa161 Ajouter la configuration des méthodes vote (ref #148). Adaptation pour Normal, Cumulatif (ancien pourcentage), Nombre et Borda new bd2be132 on ne cherche l'image d'avatar que si l'utilisateur a un avatar new 1d19af87 correction de la valeur de la conf par défaut des types de sondage new 540d368f Erreur de sérialisation de la config vide The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 540d368fe8d47cd349fc73e476e03e277feced77 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 14:32:23 2017 +0200 Erreur de sérialisation de la config vide commit 1d19af879126f40717e2a2aa4f420d5abd4744d9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 12:01:42 2017 +0200 correction de la valeur de la conf par défaut des types de sondage commit bd2be132eaba1c7582533b61b4aff6cc43fdd3b9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 11:42:36 2017 +0200 on ne cherche l'image d'avatar que si l'utilisateur a un avatar Summary of changes: .../h2/V3_1_0_3__add_vote_counting_config.sql | 6 +++--- .../V3_1_0_3__add_vote_counting_config.sql | 6 +++--- ....java => EmptyVoteCountingConfigSerializer.java} | 21 ++++++++++----------- .../pollen/rest/api/converter/JacksonConfig.java | 2 ++ .../src/main/web/tag/components/Avatar.tag.html | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) copy pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/{PollenEntityIdSerializer.java => EmptyVoteCountingConfigSerializer.java} (60%) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit bd2be132eaba1c7582533b61b4aff6cc43fdd3b9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 11:42:36 2017 +0200 on ne cherche l'image d'avatar que si l'utilisateur a un avatar --- pollen-ui-riot-js/src/main/web/tag/components/Avatar.tag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/components/Avatar.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/Avatar.tag.html index e6a37903..009c88cb 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/Avatar.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/Avatar.tag.html @@ -2,7 +2,7 @@ require("./LetterAvatar.tag.html"); <Avatar> <LetterAvatar class="avatar-letter" name={opts.name} rounded={opts.rounded} if={!opts.avatar} /> - <img class="avatar-avatar {rounded: opts.rounded}" + <img class="avatar-avatar {rounded: opts.rounded}" if="{opts.avatar}" src="{resourceService.getPreviewUrl(opts.avatar, true)}" show={opts.avatar}> </img> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 1d19af879126f40717e2a2aa4f420d5abd4744d9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 12:01:42 2017 +0200 correction de la valeur de la conf par défaut des types de sondage --- .../db/migration/h2/V3_1_0_3__add_vote_counting_config.sql | 6 +++--- .../db/migration/postgresql/V3_1_0_3__add_vote_counting_config.sql | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pollen-persistence/src/main/resources/db/migration/h2/V3_1_0_3__add_vote_counting_config.sql b/pollen-persistence/src/main/resources/db/migration/h2/V3_1_0_3__add_vote_counting_config.sql index 85448132..b1462799 100644 --- a/pollen-persistence/src/main/resources/db/migration/h2/V3_1_0_3__add_vote_counting_config.sql +++ b/pollen-persistence/src/main/resources/db/migration/h2/V3_1_0_3__add_vote_counting_config.sql @@ -8,7 +8,7 @@ UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumbe UPDATE poll set votecountingconfig = '{weight: 100}' where votecountingtype = 2; -- 3 Condorcet -UPDATE poll set votecountingconfig = '' where votecountingtype = 3; +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 3; -- 4 Number UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumber, '}') where votecountingtype = 4; @@ -17,7 +17,7 @@ UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumbe UPDATE poll set votecountingconfig = '{maxChoiceNumber: 0, pointsByRank: null}' where votecountingtype = 5; -- 6 Instant runoff -UPDATE poll set votecountingconfig = '' where votecountingtype = 6; +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 6; -- 6 Coombs -UPDATE poll set votecountingconfig = '' where votecountingtype = 7; \ No newline at end of file +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 7; \ No newline at end of file diff --git a/pollen-persistence/src/main/resources/db/migration/postgresql/V3_1_0_3__add_vote_counting_config.sql b/pollen-persistence/src/main/resources/db/migration/postgresql/V3_1_0_3__add_vote_counting_config.sql index c3a80bd5..5bec504d 100644 --- a/pollen-persistence/src/main/resources/db/migration/postgresql/V3_1_0_3__add_vote_counting_config.sql +++ b/pollen-persistence/src/main/resources/db/migration/postgresql/V3_1_0_3__add_vote_counting_config.sql @@ -8,7 +8,7 @@ UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumbe UPDATE poll set votecountingconfig = '{weight: 100}' where votecountingtype = 2; -- 3 Condorcet -UPDATE poll set votecountingconfig = '' where votecountingtype = 3; +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 3; -- 4 Number UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumber, '}') where votecountingtype = 4; @@ -17,7 +17,7 @@ UPDATE poll set votecountingconfig = concat('{maxChoiceNumber: ', maxChoiceNumbe UPDATE poll set votecountingconfig = '{maxChoiceNumber: 0, pointsByRank: null}' where votecountingtype = 5; -- 6 Instant runoff -UPDATE poll set votecountingconfig = '' where votecountingtype = 6; +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 6; -- 6 Coombs -UPDATE poll set votecountingconfig = '' where votecountingtype = 7; \ No newline at end of file +UPDATE poll set votecountingconfig = '{}' where votecountingtype = 7; \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 540d368fe8d47cd349fc73e476e03e277feced77 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 14:32:23 2017 +0200 Erreur de sérialisation de la config vide --- .../EmptyVoteCountingConfigSerializer.java | 45 ++++++++++++++++++++++ .../pollen/rest/api/converter/JacksonConfig.java | 2 + 2 files changed, 47 insertions(+) diff --git a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/EmptyVoteCountingConfigSerializer.java b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/EmptyVoteCountingConfigSerializer.java new file mode 100644 index 00000000..0afa64d9 --- /dev/null +++ b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/EmptyVoteCountingConfigSerializer.java @@ -0,0 +1,45 @@ +package org.chorem.pollen.rest.api.converter; + +/*- + * #%L + * Pollen :: Rest Api + * %% + * Copyright (C) 2009 - 2017 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 com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import org.chorem.pollen.votecounting.model.EmptyVoteCountingConfig; + +import java.io.IOException; + +/** + * @author Sylvain Bavencoff - bavencoff@codelutin.com + */ +public class EmptyVoteCountingConfigSerializer extends JsonSerializer<EmptyVoteCountingConfig> { + + @Override + public void serialize(EmptyVoteCountingConfig voteCountingConfig, + JsonGenerator jsonGenerator, + SerializerProvider serializerProvider) throws IOException, JsonProcessingException { + jsonGenerator.writeStartObject(); + jsonGenerator.writeEndObject(); + } + +} diff --git a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/JacksonConfig.java b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/JacksonConfig.java index ba152e8c..2013f330 100644 --- a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/JacksonConfig.java +++ b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/converter/JacksonConfig.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import org.chorem.pollen.services.bean.PollenEntityId; import org.chorem.pollen.services.bean.PollenEntityRef; +import org.chorem.pollen.votecounting.model.EmptyVoteCountingConfig; import org.chorem.pollen.votecounting.model.VoteCountingConfig; import javax.ws.rs.ext.ContextResolver; @@ -43,6 +44,7 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { SimpleModule module = new SimpleModule(); module.addSerializer(PollenEntityId.class, new PollenEntityIdSerializer()); module.addSerializer(PollenEntityRef.class, new PollenEntityRefSerializer()); + module.addSerializer(EmptyVoteCountingConfig.class, new EmptyVoteCountingConfigSerializer()); module.addDeserializer(PollenEntityId.class, new PollenEntityIdDeserializer()); module.addDeserializer(PollenEntityRef.class, new PollenEntityRefDeserializer()); module.addDeserializer(VoteCountingConfig.class, new VoteCountingConfigDeserializer()); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm