Line 20... |
Line 20... |
20 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
|
20 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
|
21 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
|
21 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
|
22 |
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
|
22 |
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
|
23 |
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
|
23 |
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
|
24 |
import org.tela_botanica.client.modeles.collection.CollectionListe;
|
24 |
import org.tela_botanica.client.modeles.collection.CollectionListe;
|
- |
|
25 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
- |
|
26 |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
|
25 |
import org.tela_botanica.client.modeles.personne.Personne;
|
27 |
import org.tela_botanica.client.modeles.personne.Personne;
|
26 |
import org.tela_botanica.client.modeles.personne.PersonneListe;
|
28 |
import org.tela_botanica.client.modeles.personne.PersonneListe;
|
27 |
import org.tela_botanica.client.modeles.projet.Projet;
|
29 |
import org.tela_botanica.client.modeles.projet.Projet;
|
28 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
30 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
29 |
import org.tela_botanica.client.modeles.publication.Publication;
|
31 |
import org.tela_botanica.client.modeles.publication.Publication;
|
Line 46... |
Line 48... |
46 |
import org.tela_botanica.client.vues.MenuVue;
|
48 |
import org.tela_botanica.client.vues.MenuVue;
|
47 |
import org.tela_botanica.client.vues.accueil.AccueilVue;
|
49 |
import org.tela_botanica.client.vues.accueil.AccueilVue;
|
48 |
import org.tela_botanica.client.vues.collection.CollectionForm;
|
50 |
import org.tela_botanica.client.vues.collection.CollectionForm;
|
49 |
import org.tela_botanica.client.vues.collection.CollectionListeVue;
|
51 |
import org.tela_botanica.client.vues.collection.CollectionListeVue;
|
50 |
import org.tela_botanica.client.vues.collection.CollectionVue;
|
52 |
import org.tela_botanica.client.vues.collection.CollectionVue;
|
- |
|
53 |
import org.tela_botanica.client.vues.commentaire.CommentaireVue;
|
51 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
54 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
52 |
import org.tela_botanica.client.vues.personne.PersonneVue;
|
55 |
import org.tela_botanica.client.vues.personne.PersonneVue;
|
53 |
import org.tela_botanica.client.vues.projet.ProjetForm;
|
56 |
import org.tela_botanica.client.vues.projet.ProjetForm;
|
54 |
import org.tela_botanica.client.vues.projet.ProjetVue;
|
57 |
import org.tela_botanica.client.vues.projet.ProjetVue;
|
55 |
import org.tela_botanica.client.vues.publication.PublicationForm;
|
58 |
import org.tela_botanica.client.vues.publication.PublicationForm;
|
Line 212... |
Line 215... |
212 |
selectionnerCollection(panneauCentre, null);
|
215 |
selectionnerCollection(panneauCentre, null);
|
213 |
} else if (codeMenuClique.equals(MenuApplicationId.PERSONNE)) {
|
216 |
} else if (codeMenuClique.equals(MenuApplicationId.PERSONNE)) {
|
214 |
selectionnerPersonne(panneauCentre, null, null);
|
217 |
selectionnerPersonne(panneauCentre, null, null);
|
215 |
} else if (codeMenuClique.equals(MenuApplicationId.PUBLICATION)) {
|
218 |
} else if (codeMenuClique.equals(MenuApplicationId.PUBLICATION)) {
|
216 |
selectionnerPublication(panneauCentre, null);
|
219 |
selectionnerPublication(panneauCentre, null);
|
- |
|
220 |
} else if (codeMenuClique.equals(MenuApplicationId.COMMENTAIRE)) {
|
- |
|
221 |
selectionnerCommentaire(panneauCentre, null);
|
217 |
} else {
|
222 |
} else {
|
218 |
GWT.log(i18nM.nonImplemente(codeMenuClique), null);
|
223 |
GWT.log(i18nM.nonImplemente(codeMenuClique), null);
|
219 |
}
|
224 |
}
|
220 |
panneauCentre.layout();
|
225 |
panneauCentre.layout();
|
221 |
}
|
226 |
}
|
Line 1054... |
Line 1059... |
1054 |
modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
|
1059 |
modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
|
1055 |
}
|
1060 |
}
|
1056 |
}
|
1061 |
}
|
Line 1057... |
Line 1062... |
1057 |
|
1062 |
|
- |
|
1063 |
//+----------------------------------------------------------------------------------------------------------------+
|
- |
|
1064 |
// GESTION DES COMMENTAIRES
|
- |
|
1065 |
//+----------------------------------------------------------------------------------------------------------------+
|
- |
|
1066 |
|
- |
|
1067 |
public void afficherListeCommentaire(CommentaireListe nouvelleDonnees) {
|
- |
|
1068 |
if (!(panneauCentre.getContenu() instanceof CommentaireVue)) {
|
- |
|
1069 |
panneauCentre.removeAll();
|
- |
|
1070 |
panneauCentre.add(new CommentaireVue(this));
|
- |
|
1071 |
}
|
- |
|
1072 |
|
- |
|
1073 |
panneauCentre.getContenu().rafraichir(nouvelleDonnees);
|
- |
|
1074 |
}
|
- |
|
1075 |
|
- |
|
1076 |
public void afficherFormCommentaire(String commentaireId) {
|
- |
|
1077 |
panneauCentre.removeAll();
|
- |
|
1078 |
PublicationForm commentaireForm = new PublicationForm(this, commentaireId);
|
- |
|
1079 |
panneauCentre.add(commentaireForm);
|
- |
|
1080 |
|
- |
|
1081 |
panneauCentre.layout();
|
- |
|
1082 |
}
|
- |
|
1083 |
|
- |
|
1084 |
public void clicListeCommentaire(Commentaire commentaire) {
|
- |
|
1085 |
if (commentaire != null) {
|
- |
|
1086 |
panneauCentre.getContenu().rafraichir(commentaire);
|
- |
|
1087 |
}
|
- |
|
1088 |
}
|
- |
|
1089 |
|
- |
|
1090 |
public void clicAjouterCommentaire() {
|
- |
|
1091 |
afficherFormCommentaire(null);
|
- |
|
1092 |
}
|
- |
|
1093 |
|
- |
|
1094 |
public void clicModifierCommentaire(List<Commentaire> selection) {
|
- |
|
1095 |
if (selection.size() == 0) {
|
- |
|
1096 |
Info.display("Information", "Veuillez sélectionner un commentaire.");
|
- |
|
1097 |
} else if (selection.size() > 1) {
|
- |
|
1098 |
Info.display("Information", "Veuillez sélectionner un seul commentaire à la fois.");
|
- |
|
1099 |
} else if (selection.size() == 1) {
|
- |
|
1100 |
afficherFormCommentaire(selection.get(0).getId());
|
- |
|
1101 |
} else {
|
- |
|
1102 |
Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCommentaire() du Médiateur.");
|
- |
|
1103 |
}
|
- |
|
1104 |
}
|
- |
|
1105 |
|
- |
|
1106 |
public void clicSupprimerCommentaire(final List<Commentaire> commentaireListe) {
|
- |
|
1107 |
if (commentaireListe.size() <= 0) {
|
- |
|
1108 |
MessageBox.alert("Attention", "Vous devez sélectionner un commentaire", null);
|
- |
|
1109 |
} else {
|
- |
|
1110 |
String message = "Voulez-vous vraiment supprimer ces commentaires ?";
|
- |
|
1111 |
if (commentaireListe.size() == 1) {
|
- |
|
1112 |
message = "Voulez-vous vraiment supprimer ce commentaire ?";
|
- |
|
1113 |
}
|
- |
|
1114 |
|
- |
|
1115 |
final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() {
|
- |
|
1116 |
public void handleEvent(MessageBoxEvent ce) {
|
- |
|
1117 |
Dialog dialog = (Dialog) ce.getComponent();
|
- |
|
1118 |
Button btn = ce.getButtonClicked();
|
- |
|
1119 |
|
- |
|
1120 |
if (btn.getText().equals(dialog.yesText)) {
|
- |
|
1121 |
supprimerCommentaire(panneauCentre.getContenu(), commentaireListe);
|
- |
|
1122 |
}
|
- |
|
1123 |
}
|
- |
|
1124 |
};
|
- |
|
1125 |
|
- |
|
1126 |
MessageBox.confirm("Supprimer un commentaire", message, listenerSuppression);
|
- |
|
1127 |
}
|
- |
|
1128 |
}
|
- |
|
1129 |
|
- |
|
1130 |
public void selectionnerCommentaire(Rafraichissable vueARafraichir, String commentaireId) {
|
- |
|
1131 |
modele.selectionnerCommentaire(vueARafraichir, commentaireId, getProjetId());
|
- |
|
1132 |
}
|
- |
|
1133 |
|
- |
|
1134 |
public void ajouterCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
|
- |
|
1135 |
modele.ajouterCommentaire(vueARafraichir, commentaire);
|
- |
|
1136 |
}
|
- |
|
1137 |
|
- |
|
1138 |
public void modifierCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
|
- |
|
1139 |
modele.modifierCommentaire(vueARafraichir, commentaire);
|
- |
|
1140 |
}
|
- |
|
1141 |
|
- |
|
1142 |
public void supprimerCommentaire(Rafraichissable vueARafraichir, List<Commentaire> commentairesListe) {
|
- |
|
1143 |
if (commentairesListe != null && commentairesListe.size() > 0) {
|
- |
|
1144 |
String idCommentaireSeparesParVirgule = "" ;
|
- |
|
1145 |
Iterator<Commentaire> it = commentairesListe.iterator();
|
- |
|
1146 |
while (it.hasNext()) {
|
- |
|
1147 |
idCommentaireSeparesParVirgule += it.next().getId();
|
- |
|
1148 |
if (it.hasNext()) {
|
- |
|
1149 |
idCommentaireSeparesParVirgule += ",";
|
- |
|
1150 |
}
|
- |
|
1151 |
}
|
- |
|
1152 |
modele.supprimerCommentaire(vueARafraichir, idCommentaireSeparesParVirgule);
|
- |
|
1153 |
//modele.supprimerCollectionACommentaire(vueARafraichir, idCommentaireSeparesParVirgule);
|
- |
|
1154 |
}
|
- |
|
1155 |
}
|
- |
|
1156 |
|
1058 |
//+----------------------------------------------------------------------------------------------------------------+
|
1157 |
//+----------------------------------------------------------------------------------------------------------------+
|
1059 |
// RAFRAICHISSEMENT
|
1158 |
// RAFRAICHISSEMENT
|
Line 1060... |
Line 1159... |
1060 |
//+----------------------------------------------------------------------------------------------------------------+
|
1159 |
//+----------------------------------------------------------------------------------------------------------------+
|
1061 |
|
1160 |
|