Line 5... |
Line 5... |
5 |
import java.util.List;
|
5 |
import java.util.List;
|
Line 6... |
Line 6... |
6 |
|
6 |
|
7 |
import org.tela_botanica.client.ComposantClass;
|
7 |
import org.tela_botanica.client.ComposantClass;
|
8 |
import org.tela_botanica.client.Mediateur;
|
8 |
import org.tela_botanica.client.Mediateur;
|
- |
|
9 |
import org.tela_botanica.client.RegistreId;
|
9 |
import org.tela_botanica.client.RegistreId;
|
10 |
import org.tela_botanica.client.composants.InfoLogger;
|
10 |
import org.tela_botanica.client.images.Images;
|
11 |
import org.tela_botanica.client.images.Images;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
12 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
12 |
import org.tela_botanica.client.modeles.Information;
|
13 |
import org.tela_botanica.client.modeles.Information;
|
13 |
import org.tela_botanica.client.modeles.InterneValeur;
|
14 |
import org.tela_botanica.client.modeles.InterneValeur;
|
Line 22... |
Line 23... |
22 |
import org.tela_botanica.client.modeles.structure.Structure;
|
23 |
import org.tela_botanica.client.modeles.structure.Structure;
|
23 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
25 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
25 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
26 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
26 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
27 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
- |
|
28 |
import org.tela_botanica.client.util.Debug;
|
27 |
import org.tela_botanica.client.util.Pattern;
|
29 |
import org.tela_botanica.client.util.Pattern;
|
28 |
import org.tela_botanica.client.util.UtilArray;
|
30 |
import org.tela_botanica.client.util.UtilArray;
|
29 |
import org.tela_botanica.client.util.UtilString;
|
31 |
import org.tela_botanica.client.util.UtilString;
|
30 |
import org.tela_botanica.client.vues.Formulaire;
|
32 |
import org.tela_botanica.client.vues.Formulaire;
|
Line 31... |
Line 33... |
31 |
|
33 |
|
32 |
import com.extjs.gxt.ui.client.event.Events;
|
34 |
import com.extjs.gxt.ui.client.event.Events;
|
33 |
import com.extjs.gxt.ui.client.Registry;
|
35 |
import com.extjs.gxt.ui.client.Registry;
|
34 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
36 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
35 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
37 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
- |
|
38 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
36 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
39 |
import com.extjs.gxt.ui.client.event.EventType;
|
37 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
40 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
38 |
import com.extjs.gxt.ui.client.event.Listener;
|
41 |
import com.extjs.gxt.ui.client.event.Listener;
|
39 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
42 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
40 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
43 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
Line 255... |
Line 258... |
255 |
mediateur.afficherFormStructure(null);
|
258 |
mediateur.afficherFormStructure(null);
|
256 |
}
|
259 |
}
|
257 |
}
|
260 |
}
|
Line 258... |
Line 261... |
258 |
|
261 |
|
- |
|
262 |
public boolean soumettreFormulaire() {
|
- |
|
263 |
|
- |
|
264 |
Debug.log("===> BEGIN StructureForm.soumettreFormulaire()");
|
259 |
public boolean soumettreFormulaire() {
|
265 |
|
260 |
// Vérification de la validité des champs du formulaire
|
266 |
// Vérification de la validité des champs du formulaire
|
261 |
boolean fomulaireValide = verifierFormulaire();
|
267 |
boolean fomulaireValide = verifierFormulaire();
|
262 |
if (fomulaireValide) {
|
268 |
if (fomulaireValide) {
|
263 |
// Collecte des données du formulaire
|
269 |
// Collecte des données du formulaire
|
Line 270... |
Line 276... |
270 |
// Ajout des informations sur la Structure
|
276 |
// Ajout des informations sur la Structure
|
271 |
mediateur.ajouterStructure(this, structure, conservation, valorisation);
|
277 |
mediateur.ajouterStructure(this, structure, conservation, valorisation);
|
272 |
// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
|
278 |
// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
|
273 |
// Voir la méthode rafraichir().
|
279 |
// Voir la méthode rafraichir().
|
274 |
} else if (mode.equals(MODE_MODIFIER)) {
|
280 |
} else if (mode.equals(MODE_MODIFIER)) {
|
- |
|
281 |
|
- |
|
282 |
Debug.log("===> StructureForm.soumettreFormulaire(), mode="+mode);
|
- |
|
283 |
|
275 |
// Modification des informations sur la Structure
|
284 |
// Modification des informations sur la Structure
|
276 |
if (structure == null && conservation == null && valorisation == null) {
|
285 |
if (structure == null && conservation == null && valorisation == null) {
|
277 |
Info.display("Modification d'une institution", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
286 |
InfoLogger.display("Modification d'une institution", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
278 |
} else {
|
287 |
} else {
|
279 |
mediateur.modifierStructure(this, identification.getId(), structure, conservation, valorisation);
|
288 |
mediateur.modifierStructure(this, identification.getId(), structure, conservation, valorisation);
|
280 |
}
|
289 |
}
|
- |
|
290 |
|
- |
|
291 |
Debug.log("===> StructureForm.soumettreFormulaire(), personnelModifie.size="+personnelModifie.size() + ", personnelAjoute.size()="+personnelAjoute.size());
|
- |
|
292 |
|
281 |
if (personnelModifie.size() == 0 && personnelAjoute.size() == 0 && personnelSupprime.size() == 0) {
|
293 |
if (personnelModifie.size() == 0 && personnelAjoute.size() == 0 && personnelSupprime.size() == 0) {
|
282 |
Info.display("Modification du personnel", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
294 |
InfoLogger.display("Modification du personnel", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
283 |
} else {
|
295 |
} else {
|
284 |
if (personnelModifie.size() != 0) {
|
296 |
if (personnelModifie.size() != 0) {
|
285 |
decompteRafraichissementPersonnel++;
|
297 |
decompteRafraichissementPersonnel++;
|
286 |
mediateur.modifierStructureAPersonne(this, personnelModifie);
|
298 |
mediateur.modifierStructureAPersonne(this, personnelModifie);
|
287 |
}
|
299 |
}
|
Line 296... |
Line 308... |
296 |
mediateur.supprimerStructureAPersonne(this, personnelSupprime);
|
308 |
mediateur.supprimerStructureAPersonne(this, personnelSupprime);
|
297 |
}
|
309 |
}
|
298 |
}
|
310 |
}
|
299 |
}
|
311 |
}
|
300 |
}
|
312 |
}
|
- |
|
313 |
|
- |
|
314 |
Debug.log("===> END StructureForm.soumettreFormulaire()");
|
- |
|
315 |
|
301 |
return fomulaireValide;
|
316 |
return fomulaireValide;
|
302 |
}
|
317 |
}
|
Line 303... |
Line 318... |
303 |
|
318 |
|
304 |
public boolean verifierFormulaire() {
|
319 |
public boolean verifierFormulaire() {
|
Line 1025... |
Line 1040... |
1025 |
if (personnelOnglet.getData("acces").equals(true)) {
|
1040 |
if (personnelOnglet.getData("acces").equals(true)) {
|
1026 |
personnelGrilleMagazin.commitChanges();
|
1041 |
personnelGrilleMagazin.commitChanges();
|
1027 |
int nbrePersonne = personnelGrilleMagazin.getCount();
|
1042 |
int nbrePersonne = personnelGrilleMagazin.getCount();
|
1028 |
for (int i = 0; i < nbrePersonne; i++) {
|
1043 |
for (int i = 0; i < nbrePersonne; i++) {
|
1029 |
StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
|
1044 |
StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
|
- |
|
1045 |
|
- |
|
1046 |
Debug.log(":::> StructureForm.collecterStructurePersonnel()");
|
- |
|
1047 |
Debug.log(":::> etat="+personne.get("etat"));
|
Line 1030... |
Line 1048... |
1030 |
|
1048 |
|
1031 |
// Seules les lignes ajoutées ou modifiées sont prises en compte.
|
1049 |
// Seules les lignes ajoutées ou modifiées sont prises en compte.
|
1032 |
Record record = personnelGrilleMagazin.getRecord(personne);
|
1050 |
Record record = personnelGrilleMagazin.getRecord(personne);
|
1033 |
if (personnelGrilleMagazin.getModifiedRecords().contains(record) == true
|
1051 |
if (personnelGrilleMagazin.getModifiedRecords().contains(record) == true
|
Line 1034... |
Line 1052... |
1034 |
|| (personne.get("etat") != null && personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE) )) {
|
1052 |
|| (personne.get("etat") != null && (personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE) || personne.get("etat").equals(StructureAPersonne.ETAT_MODIFIE)) )) {
|
1035 |
|
1053 |
|
1036 |
// Gestion de l'id de la structure
|
1054 |
// Gestion de l'id de la structure
|
1037 |
if (mode.equals("MODIF")) {
|
1055 |
if (mode.equals("MODIF")) {
|
Line 1053... |
Line 1071... |
1053 |
personne.setFonction("AUTRE", fonction);
|
1071 |
personne.setFonction("AUTRE", fonction);
|
1054 |
}
|
1072 |
}
|
1055 |
} else {
|
1073 |
} else {
|
1056 |
personne.setFonction("");
|
1074 |
personne.setFonction("");
|
1057 |
}
|
1075 |
}
|
- |
|
1076 |
|
- |
|
1077 |
// Gestion du nom complet
|
- |
|
1078 |
String nomComplet = personne.getPrenom()+" "+personne.getNom();
|
- |
|
1079 |
personne.setNomComplet(nomComplet);
|
Line 1058... |
Line 1080... |
1058 |
|
1080 |
|
1059 |
// Gestion de la notion de "contact"
|
1081 |
// Gestion de la notion de "contact"
|
1060 |
personne.setContact(false);
|
1082 |
personne.setContact(false);
|
1061 |
if (personne.get("contact").equals(true)) {
|
1083 |
if (personne.get("contact").equals(true)) {
|
Line 1130... |
Line 1152... |
1130 |
personnel.get(index).set("statut", magazinLiStatut.findModel("id_valeur", personnel.get(index).getStatut()).getNom());
|
1152 |
personnel.get(index).set("statut", magazinLiStatut.findModel("id_valeur", personnel.get(index).getStatut()).getNom());
|
1131 |
} else {
|
1153 |
} else {
|
1132 |
personnel.get(index).set("statut", personnel.get(index).getStatut().replaceFirst("AUTRE##", ""));
|
1154 |
personnel.get(index).set("statut", personnel.get(index).getStatut().replaceFirst("AUTRE##", ""));
|
1133 |
}
|
1155 |
}
|
Line -... |
Line 1156... |
- |
|
1156 |
|
- |
|
1157 |
// Gestion de la specialite
|
- |
|
1158 |
if (((String) personnel.get(index).getSpecialite()).matches("^[0-9]+$")) {
|
- |
|
1159 |
// Author : Cyprien
|
- |
|
1160 |
// TODO
|
- |
|
1161 |
// Ici faire un combobox ?
|
- |
|
1162 |
// ...
|
- |
|
1163 |
} else {
|
- |
|
1164 |
personnel.get(index).set("specialite", personnel.get(index).getSpecialite().replaceFirst("AUTRE##", ""));
|
- |
|
1165 |
}
|
1134 |
|
1166 |
|
1135 |
// Gestion du temps de travail
|
1167 |
// Gestion du temps de travail
|
1136 |
String tps = personnel.get(index).getBotaTravailHebdoTps();
|
1168 |
String tps = personnel.get(index).getBotaTravailHebdoTps();
|
Line 1137... |
Line 1169... |
1137 |
personnel.get(index).set("travail", (tps.matches("^[0-9]+$") ? Integer.parseInt(tps) : 0));
|
1169 |
personnel.get(index).set("travail", (tps.matches("^[0-9]+$") ? Integer.parseInt(tps) : 0));
|
Line 1155... |
Line 1187... |
1155 |
personnelOnglet = creerOnglet("Personnel", "personnel");
|
1187 |
personnelOnglet = creerOnglet("Personnel", "personnel");
|
1156 |
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT));
|
1188 |
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT));
|
1157 |
personnelOnglet.setStyleAttribute("padding", "0");
|
1189 |
personnelOnglet.setStyleAttribute("padding", "0");
|
1158 |
personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {
|
1190 |
personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {
|
1159 |
public void handleEvent(ComponentEvent be) {
|
1191 |
public void handleEvent(ComponentEvent be) {
|
- |
|
1192 |
|
- |
|
1193 |
Debug.log(":::> StructureForm.creerOngletPersonnel.HandleEvent()");
|
- |
|
1194 |
|
1160 |
// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
|
1195 |
// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
|
1161 |
personnelOnglet.setData("acces", true);
|
1196 |
personnelOnglet.setData("acces", true);
|
Line 1162... |
Line 1197... |
1162 |
|
1197 |
|
1163 |
// Rafraichissement du contenu de la grille du personnel
|
1198 |
// Rafraichissement du contenu de la grille du personnel
|
1164 |
if (mode.equals(MODE_AJOUTER)) {
|
1199 |
if (mode.equals(MODE_AJOUTER)) {
|
1165 |
rafraichirPersonnel();
|
1200 |
rafraichirPersonnel();
|
- |
|
1201 |
}
|
- |
|
1202 |
else {
|
- |
|
1203 |
initialiserGrillePersonnelEnModification();
|
1166 |
}
|
1204 |
}
|
1167 |
}
|
1205 |
}
|
Line 1168... |
Line 1206... |
1168 |
});
|
1206 |
});
|
1169 |
|
1207 |
|
Line 1175... |
Line 1213... |
1175 |
//cp.setWidth(1250);
|
1213 |
//cp.setWidth(1250);
|
1176 |
//cp.setHeight("100%");
|
1214 |
//cp.setHeight("100%");
|
1177 |
cp.setFrame(true);
|
1215 |
cp.setFrame(true);
|
Line 1178... |
Line 1216... |
1178 |
|
1216 |
|
- |
|
1217 |
personnelGrilleMagazin = new ListStore<StructureAPersonne>();
|
- |
|
1218 |
personnelGrilleMagazin.setMonitorChanges(true);
|
1179 |
personnelGrilleMagazin = new ListStore<StructureAPersonne>();
|
1219 |
|
1180 |
personnelGrilleMagazin.addListener(Store.Add, new Listener<StoreEvent<StructureAPersonne>>() {
|
- |
|
1181 |
|
1220 |
personnelGrilleMagazin.addListener(Store.Add, new Listener<StoreEvent<StructureAPersonne>>() {
|
1182 |
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
|
1221 |
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
|
1183 |
// Activation du bouton supprimer si la grille contient un élément
|
1222 |
// Activation du bouton supprimer si la grille contient un élément
|
1184 |
if (grillePersonnel.getStore().getCount() > 0) {
|
1223 |
if (grillePersonnel.getStore().getCount() > 0) {
|
1185 |
supprimerPersonnelBtn.enable();
|
1224 |
supprimerPersonnelBtn.enable();
|
Line 1186... |
Line 1225... |
1186 |
}
|
1225 |
}
|
1187 |
|
1226 |
|
Line -... |
Line 1227... |
- |
|
1227 |
}
|
- |
|
1228 |
});
|
- |
|
1229 |
|
- |
|
1230 |
/* TODELETE
|
- |
|
1231 |
personnelGrilleMagazin.addListener(Store.Update, new Listener<StoreEvent<StructureAPersonne>>() {
|
- |
|
1232 |
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
|
- |
|
1233 |
|
- |
|
1234 |
personnelGrilleMagazin.getAt(ce.getIndex()).set("etat", StructureAPersonne.ETAT_MODIFIE);
|
- |
|
1235 |
Debug.log("Modification de : "+personnelGrilleMagazin.getAt(ce.getIndex()).getNom());
|
- |
|
1236 |
}
|
- |
|
1237 |
});
|
1188 |
}
|
1238 |
*/
|
Line 1189... |
Line 1239... |
1189 |
});
|
1239 |
|
Line 1190... |
Line 1240... |
1190 |
|
1240 |
|
Line 1450... |
Line 1500... |
1450 |
grillePersonnel.addPlugin(r);
|
1500 |
grillePersonnel.addPlugin(r);
|
1451 |
grillePersonnel.getView().setForceFit(true);
|
1501 |
grillePersonnel.getView().setForceFit(true);
|
1452 |
grillePersonnel.setAutoExpandColumn("specialite");
|
1502 |
grillePersonnel.setAutoExpandColumn("specialite");
|
1453 |
grillePersonnel.setStripeRows(true);
|
1503 |
grillePersonnel.setStripeRows(true);
|
1454 |
grillePersonnel.setTrackMouseOver(true);
|
1504 |
grillePersonnel.setTrackMouseOver(true);
|
- |
|
1505 |
|
- |
|
1506 |
grillePersonnel.addListener(null, sm);
|
- |
|
1507 |
|
1455 |
cp.add(grillePersonnel);
|
1508 |
cp.add(grillePersonnel);
|
1456 |
personnelOnglet.add(cp);
|
1509 |
personnelOnglet.add(cp);
|
Line 1457... |
Line 1510... |
1457 |
|
1510 |
|
1458 |
return personnelOnglet;
|
1511 |
return personnelOnglet;
|
Line 1948... |
Line 2001... |
1948 |
}
|
2001 |
}
|
Line 1949... |
Line 2002... |
1949 |
|
2002 |
|
Line 1950... |
Line 2003... |
1950 |
}
|
2003 |
}
|
- |
|
2004 |
|
- |
|
2005 |
public void rafraichir(Object nouvellesDonnees) {
|
- |
|
2006 |
|
1951 |
|
2007 |
Debug.log("|0> StructureForm.rafraichir, nouvellesDonnees.getClass() = "+nouvellesDonnees.getClass());
|
1952 |
public void rafraichir(Object nouvellesDonnees) {
|
2008 |
|
1953 |
try {
|
2009 |
try {
|
1954 |
if (nouvellesDonnees instanceof Information) {
|
2010 |
if (nouvellesDonnees instanceof Information) {
|
1955 |
Information info = (Information) nouvellesDonnees;
|
2011 |
Information info = (Information) nouvellesDonnees;
|
Line 1972... |
Line 2028... |
1972 |
|
2028 |
|
1973 |
public void rafraichirInformation(Information info) {
|
2029 |
public void rafraichirInformation(Information info) {
|
1974 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
2030 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
1975 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
2031 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
- |
|
2032 |
}
|
- |
|
2033 |
|
Line 1976... |
Line 2034... |
1976 |
}
|
2034 |
Debug.log("|0> StructureForm.rafraichirInformation, info.getType() = "+info.getType());
|
1977 |
|
2035 |
|
1978 |
if (info.getType().equals("modif_structure")) {
|
2036 |
if (info.getType().equals("modif_structure")) {
|
1979 |
Info.display("Modification d'une institution", info.toString());
|
2037 |
InfoLogger.display("Modification d'une institution", info.toString());
|
1980 |
} else if (info.getType().equals("ajout_structure")) {
|
2038 |
} else if (info.getType().equals("ajout_structure")) {
|
1981 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
2039 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
Line 1982... |
Line 2040... |
1982 |
String structureId = (String) info.getDonnee(0);
|
2040 |
String structureId = (String) info.getDonnee(0);
|
1983 |
Info.display("Ajout d'une Institution", "L'intitution '"+structureId+"' a bien été ajoutée");
|
2041 |
InfoLogger.display("Ajout d'une Institution", "L'intitution '"+structureId+"' a bien été ajoutée");
|
1984 |
|
2042 |
|
1985 |
// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons le personnel
|
2043 |
// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons le personnel
|
1986 |
mediateur.ajouterStructureAPersonne(this, structureId, personnelAjoute);
|
2044 |
mediateur.ajouterStructureAPersonne(this, structureId, personnelAjoute);
|
1987 |
} else {
|
2045 |
} else {
|
1988 |
Info.display("Ajout d'une Institution", info.toString());
|
2046 |
InfoLogger.display("Ajout d'une Institution", info.toString());
|
1989 |
}
|
2047 |
}
|
1990 |
} else if (info.getType().equals("modif_structure_a_personne")) {
|
2048 |
} else if (info.getType().equals("modif_structure_a_personne")) {
|
1991 |
Info.display("Modification du Personnel", info.toString());
|
2049 |
InfoLogger.display("Modification du Personnel", info.toString());
|
1992 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
2050 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
1993 |
testerLancementRafraichirPersonnel();
|
2051 |
testerLancementRafraichirPersonnel();
|
1994 |
} else if (info.getType().equals("suppression_structure_a_personne")) {
|
2052 |
} else if (info.getType().equals("suppression_structure_a_personne")) {
|
1995 |
Info.display("Suppression du Personnel", info.toString());
|
2053 |
InfoLogger.display("Suppression du Personnel", info.toString());
|
1996 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
2054 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
1997 |
testerLancementRafraichirPersonnel();
|
2055 |
testerLancementRafraichirPersonnel();
|
1998 |
} else if (info.getType().equals("ajout_structure_a_personne")) {
|
2056 |
} else if (info.getType().equals("ajout_structure_a_personne")) {
|
1999 |
Info.display("Ajout du Personnel", info.toString());
|
2057 |
InfoLogger.display("Ajout du Personnel", info.toString());
|
2000 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
2058 |
GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
|
2001 |
testerLancementRafraichirPersonnel();
|
2059 |
testerLancementRafraichirPersonnel();
|
2002 |
} else if (info.getType().equals("selection_structure")) {
|
2060 |
} else if (info.getType().equals("selection_structure")) {
|
2003 |
Info.display("Modification d'une institution", info.toString());
|
2061 |
InfoLogger.display("Modification d'une institution", info.toString());
|
2004 |
String titre = i18nC.titreModifFormStructurePanneau();
|
2062 |
String titre = i18nC.titreModifFormStructurePanneau();
|
2005 |
if (info.getDonnee(0) != null) {
|
2063 |
if (info.getDonnee(0) != null) {
|
Line 2022... |
Line 2080... |
2022 |
if (onglets.getSelectedItem().equals(valorisationOnglet)) {
|
2080 |
if (onglets.getSelectedItem().equals(valorisationOnglet)) {
|
2023 |
peuplerStructureValorisation();
|
2081 |
peuplerStructureValorisation();
|
2024 |
}
|
2082 |
}
|
2025 |
}
|
2083 |
}
|
2026 |
}
|
2084 |
}
|
2027 |
panneauFormulaire.setHeading(titre);
|
- |
|
2028 |
} else if (info.getType().equals("liste_structure_a_personne")) {
|
2085 |
} else if (info.getType().equals("liste_structure_a_personne")) {
|
- |
|
2086 |
Debug.log("==> StructureForm.rafraichirInformation, typeInfo=liste_structure_a_personne");
|
2029 |
if (info.getDonnee(0) != null) {
|
2087 |
if (info.getDonnee(0) != null) {
|
2030 |
personnel = (StructureAPersonneListe) info.getDonnee(0);
|
2088 |
personnel = (StructureAPersonneListe) info.getDonnee(0);
|
2031 |
|
2089 |
|
2032 |
peuplerStructurePersonnel();
|
2090 |
peuplerStructurePersonnel();
|
- |
|
2091 |
|
- |
|
2092 |
/* TODELETE
|
- |
|
2093 |
int nbPersonnel = this.personnelGrilleMagazin.getCount();
|
- |
|
2094 |
for (int i=0; i<nbPersonnel; i++){
|
- |
|
2095 |
Debug.log("==> setEtat(ETAT_MODIFIE) : personne="+this.personnelGrilleMagazin.getAt(i).getId());
|
- |
|
2096 |
this.personnelGrilleMagazin.getAt(i).set("etat", StructureAPersonne.ETAT_MODIFIE);
|
- |
|
2097 |
}
|
- |
|
2098 |
*/
|
- |
|
2099 |
|
2033 |
personnelOnglet.layout();
|
2100 |
personnelOnglet.layout();
|
2034 |
Info.display("Chargement du Personnel", "ok");
|
2101 |
InfoLogger.display("Chargement du Personnel", "ok");
|
Line 2035... |
Line 2102... |
2035 |
|
2102 |
|
2036 |
// Remise à zéro des modification dans la liste du personnel
|
2103 |
// Remise à zéro des modification dans la liste du personnel
|
2037 |
personnelModifie = new StructureAPersonneListe();
|
2104 |
personnelModifie = new StructureAPersonneListe();
|
2038 |
personnelAjoute = new StructureAPersonneListe();
|
2105 |
personnelAjoute = new StructureAPersonneListe();
|
Line 2171... |
Line 2238... |
2171 |
projetsMagazin.add(liste);
|
2238 |
projetsMagazin.add(liste);
|
2172 |
projetsCombo.setStore(projetsMagazin);
|
2239 |
projetsCombo.setStore(projetsMagazin);
|
2173 |
}
|
2240 |
}
|
Line 2174... |
Line 2241... |
2174 |
|
2241 |
|
- |
|
2242 |
private void testerLancementRafraichirPersonnel() {
|
- |
|
2243 |
Debug.log("==> BEGIN StructureForm.testerLancementRafraichirPersonnel()");
|
2175 |
private void testerLancementRafraichirPersonnel() {
|
2244 |
|
2176 |
decompteRafraichissementPersonnel--;
|
2245 |
decompteRafraichissementPersonnel--;
|
2177 |
if (decompteRafraichissementPersonnel == 0) {
|
2246 |
if (decompteRafraichissementPersonnel == 0) {
|
2178 |
// Nous rechargeons la liste du Personnel
|
2247 |
// Nous rechargeons la liste du Personnel
|
2179 |
rafraichirPersonnel();
|
2248 |
rafraichirPersonnel();
|
- |
|
2249 |
}
|
2180 |
}
|
2250 |
Debug.log("==> END StructureForm.testerLancementRafraichirPersonnel()");
|
Line 2181... |
Line 2251... |
2181 |
}
|
2251 |
}
|
- |
|
2252 |
|
- |
|
2253 |
private void rafraichirPersonnel() {
|
2182 |
|
2254 |
Debug.log("==> BEGIN StructureForm.rafraichirPersonnel()");
|
2183 |
private void rafraichirPersonnel() {
|
2255 |
|
2184 |
decompteRafraichissementPersonnel = 0;
|
2256 |
decompteRafraichissementPersonnel = 0;
|
2185 |
if (mode.equals(MODE_MODIFIER)) {
|
2257 |
if (mode.equals(MODE_MODIFIER)) {
|
2186 |
initialiserGrillePersonnelEnModification();
|
2258 |
initialiserGrillePersonnelEnModification();
|
2187 |
} else if (mode.equals(MODE_AJOUTER)) {
|
2259 |
} else if (mode.equals(MODE_AJOUTER)) {
|
- |
|
2260 |
initialiserGrillePersonnelEnAjout();
|
2188 |
initialiserGrillePersonnelEnAjout();
|
2261 |
}
|
Line 2189... |
Line 2262... |
2189 |
}
|
2262 |
Debug.log("==> END StructureForm.rafraichirPersonnel()");
|
2190 |
}
|
2263 |
}
|
2191 |
|
2264 |
|
Line 2206... |
Line 2279... |
2206 |
StructureAPersonne directeurDuPersonnel = new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
|
2279 |
StructureAPersonne directeurDuPersonnel = new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
|
2207 |
ajouterMembreAGrillePersonnel(directeurDuPersonnel);
|
2280 |
ajouterMembreAGrillePersonnel(directeurDuPersonnel);
|
2208 |
personnelOnglet.layout();
|
2281 |
personnelOnglet.layout();
|
2209 |
}
|
2282 |
}
|
Line 2210... |
Line 2283... |
2210 |
|
2283 |
|
2211 |
private void initialiserGrillePersonnelEnModification() {
|
2284 |
private void initialiserGrillePersonnelEnModification() {
|
2212 |
mediateur.selectionnerStructureAPersonne(this, identification.getId(), StructureAPersonne.ROLE_EQUIPE);
|
2285 |
mediateur.selectionnerStructureAPersonne(this, identification.getId(), StructureAPersonne.ROLE_EQUIPE);
|
2213 |
}
|
- |
|
2214 |
}
|
2286 |
}
|
- |
|
2287 |
}
|