Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 964 → Rev 965

/trunk/src/org/tela_botanica/del/client/utils/UtilitairesServiceResultat.java
181,8 → 181,7
String courriel = getValeurOuVide(jsonIntervention, "auteur.courriel");
Contributeur contributeur = new Contributeur(idUtilisateur, nom, prenom, courriel);
 
// TODO : parser date
Date date = new Date();
Date date = parserDateObservation(getValeurOuVide(jsonIntervention, "date"));
 
if (!nomSel.equals("")) {
String nom_sel = getValeurOuVide(jsonIntervention, "nom_sel");
304,7 → 303,7
JSONObject vote = votes.get(itVotes.next()).isObject();
VoteDetermination vd = new VoteDetermination();
vd.setContributeur(getValeurOuVide(vote, "auteur.id"));
vd.setDate(new Date());
vd.setDate(parserDateObservation(getValeurOuVide(vote, "date")));
vd.setId(getValeurOuVide(vote, "vote.id"));
vd.setVote(Integer.parseInt(getValeurOuVide(vote, "vote")));
vd.setContributeur(getValeurOuVide(vote, "auteur.id"));
339,7 → 338,7
VoteProtocole vd = new VoteProtocole();
vd.setContributeur(voteEnCours.get("auteur.id").isString().stringValue());
// TODO récupérer la date du vote et la parser
vd.setDate(new Date());
vd.setDate(parserDateObservation(getValeurOuVide(voteEnCours, "date")));
int valeurVote = Integer.parseInt(voteEnCours.get("vote").isString().stringValue());
vd.setVote(valeurVote);
if (!votesProtocoles.containsKey(idProtocoleVote)) {
360,7 → 359,7
*/
public static Date parserDateObservation(String date) {
Date dateParsee = new Date();
DateTimeFormat formatDateObs = DateTimeFormat.getFormat("dd/MM/yyyy");
DateTimeFormat formatDateObs = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss");
try {
dateParsee = formatDateObs.parse(date);
} catch (IllegalArgumentException e) {
/trunk/src/org/tela_botanica/del/client/vues/plateformedetermination/forum/interventions/ForumInterventionVue.java
42,7 → 42,7
 
htmlTableau.setWidget(2, 1, barreRepartition);
htmlTableau.setHTML(2, 2, determination.getAuteur());
htmlTableau.setHTML(2, 4, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(determination.getDate()));
htmlTableau.setHTML(2, 4, DateTimeFormat.getFormat("dd/MM/yyyy").format(determination.getDate()));
htmlTableau.setWidget(2, 5, new HTML(determination.getCommentaire()));
if (determination.estFils()) {
58,7 → 58,7
htmlTableau.setHTML(1, 3, I18n.getVocabulary().commentaire());
 
htmlTableau.setHTML(2, 1, commentaire.getAuteur());
htmlTableau.setHTML(2, 2, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(commentaire.getDate()));
htmlTableau.setHTML(2, 2, DateTimeFormat.getFormat("dd/MM/yyyy").format(commentaire.getDate()));
htmlTableau.setWidget(2, 3, arbreCommentaires);
if (commentaire.estFils()) {
/trunk/src/org/tela_botanica/del/client/composants/votes/details/DetailListeVotesDeterminationVue.java
81,7 → 81,7
htmlTableau.setHTML(index, 1, contributeur);
htmlTableau.setHTML(index, 2, valeurVote+"");
htmlTableau.setHTML(index, 3, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(vote.getDate()));
htmlTableau.setHTML(index, 3, DateTimeFormat.getFormat("dd/MM/yyyy").format(vote.getDate()));
 
}
/trunk/src/org/tela_botanica/del/client/composants/commentaires/DetailCommentaireVue.java
7,6 → 7,7
import org.tela_botanica.del.client.modeles.PropositionDetermination;
 
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
54,7 → 55,7
if (propositionDetermination.getCommentaire() != null && propositionDetermination.getCommentaire() != "") {
htmlTableau.setHTML(2, 1, propositionDetermination.getAuteur());
htmlTableau.setHTML(2, 2, propositionDetermination.getCommentaire());
htmlTableau.setHTML(2, 3, propositionDetermination.getDate() + "");
htmlTableau.setHTML(2, 3, DateTimeFormat.getFormat("dd/MM/yyyy").format(propositionDetermination.getDate()));
}
 
creerListeCommentaireRecursive(propositionDetermination.getListeCommentaires());
82,7 → 83,7
int ligne = htmlTableau.getRowCount() + 1;
htmlTableau.setHTML(ligne, 1, commentaire.getAuteur());
htmlTableau.setHTML(ligne, 2, commentaire.getCommentaire());
htmlTableau.setHTML(ligne, 3, commentaire.getDate() + "");
htmlTableau.setHTML(ligne, 3, DateTimeFormat.getFormat("dd/MM/yyyy").format(commentaire.getDate()));
}
 
/**