Line 8... |
Line 8... |
8 |
import org.tela_botanica.client.ComposantClass;
|
8 |
import org.tela_botanica.client.ComposantClass;
|
9 |
import org.tela_botanica.client.Mediateur;
|
9 |
import org.tela_botanica.client.Mediateur;
|
10 |
import org.tela_botanica.client.RegistreId;
|
10 |
import org.tela_botanica.client.RegistreId;
|
11 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
11 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
12 |
import org.tela_botanica.client.composants.InfoLogger;
|
12 |
import org.tela_botanica.client.composants.InfoLogger;
|
- |
|
13 |
import org.tela_botanica.client.composants.pagination.ProxyPersonnes;
|
13 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
15 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
15 |
import org.tela_botanica.client.images.Images;
|
16 |
import org.tela_botanica.client.images.Images;
|
16 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
17 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
17 |
import org.tela_botanica.client.modeles.Information;
|
18 |
import org.tela_botanica.client.modeles.Information;
|
Line 219... |
Line 220... |
219 |
private RadioGroup sansMotifAccesMarkRGrpChp = null;
|
220 |
private RadioGroup sansMotifAccesMarkRGrpChp = null;
|
220 |
private RadioGroup avecMotifAccesMarkRGrpChp = null;
|
221 |
private RadioGroup avecMotifAccesMarkRGrpChp = null;
|
221 |
private TextField<String> publicationChp = null;
|
222 |
private TextField<String> publicationChp = null;
|
222 |
private LayoutContainer materielConservationCp = null;
|
223 |
private LayoutContainer materielConservationCp = null;
|
223 |
private ListStore<Personne> personneExistanteMagazin = null;
|
224 |
private ListStore<Personne> personneExistanteMagazin = null;
|
224 |
private ComboBox<Personne> personneExistanteCombo = null;
|
225 |
private ChampComboBoxRechercheTempsReelPaginable personneExistanteCombo = null;
|
225 |
private Button supprimerPersonnelBtn = null;
|
226 |
private Button supprimerPersonnelBtn = null;
|
226 |
private ListStore<Projet> projetsMagazin = null;
|
227 |
private ListStore<Projet> projetsMagazin = null;
|
227 |
private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
|
228 |
private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
|
228 |
private CellEditor fonctionEditor = null;
|
229 |
private CellEditor fonctionEditor = null;
|
229 |
private List<Valeur> fonctionsListe = null;
|
230 |
private List<Valeur> fonctionsListe = null;
|
Line 1455... |
Line 1456... |
1455 |
toolBar.add(new SeparatorToolItem());
|
1456 |
toolBar.add(new SeparatorToolItem());
|
Line 1456... |
Line 1457... |
1456 |
|
1457 |
|
1457 |
personneExistanteMagazin = new ListStore<Personne>();
|
1458 |
personneExistanteMagazin = new ListStore<Personne>();
|
Line 1458... |
Line 1459... |
1458 |
personneExistanteMagazin.add(new ArrayList<Personne>());
|
1459 |
personneExistanteMagazin.add(new ArrayList<Personne>());
|
1459 |
|
1460 |
|
1460 |
personneExistanteCombo = new ComboBox<Personne>();
|
1461 |
ModelType modelTypePersonnes = new ModelType();
|
1461 |
personneExistanteCombo.setWidth(200);
|
1462 |
modelTypePersonnes.setRoot("personnes");
|
- |
|
1463 |
modelTypePersonnes.setTotalName("nbElements");
|
1462 |
personneExistanteCombo.setEmptyText("Chercher une personne existante...");
|
1464 |
modelTypePersonnes.addField("cp_fmt_nom_complet");
|
1463 |
personneExistanteCombo.setTriggerAction(TriggerAction.ALL);
|
1465 |
modelTypePersonnes.addField("cp_nom");
|
1464 |
personneExistanteCombo.setEditable(true);
|
1466 |
modelTypePersonnes.addField("cp_prenom");
|
1465 |
personneExistanteCombo.setDisplayField("fmt_nom_complet");
|
1467 |
modelTypePersonnes.addField("cp_truk_courriel");
|
Line 1466... |
Line 1468... |
1466 |
personneExistanteCombo.setStore(personneExistanteMagazin);
|
1468 |
modelTypePersonnes.addField("cp_truk_telephone");
|
1467 |
personneExistanteCombo.addKeyListener(new KeyListener() {
|
- |
|
1468 |
|
1469 |
modelTypePersonnes.addField("cp_ce_truk_specialite");
|
1469 |
public void componentKeyUp(ComponentEvent ce) {
|
- |
|
1470 |
if (!ce.isNavKeyPress() && personneExistanteCombo.getRawValue() != null && personneExistanteCombo.getRawValue().length() > 0) {
|
- |
|
Line 1471... |
Line -... |
1471 |
rafraichirPersonneExistante(personneExistanteCombo.getRawValue());
|
- |
|
- |
|
1470 |
|
Line 1472... |
Line 1471... |
1472 |
}
|
1471 |
String displayNamePersonnes = "cp_fmt_nom_complet";
|
1473 |
}
|
1472 |
ProxyPersonnes<ModelData> proxyPersonnes = new ProxyPersonnes<ModelData>();
|
1474 |
|
1473 |
|
Line 1475... |
Line 1474... |
1475 |
});
|
1474 |
personneExistanteCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyPersonnes, modelTypePersonnes, displayNamePersonnes);
|
1476 |
|
1475 |
|
1477 |
// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
|
1476 |
// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
|
1478 |
//> CHECK
|
1477 |
//> CHECK
|
1479 |
toolBar.add(personneExistanteCombo);
|
- |
|
Line 1480... |
Line -... |
1480 |
|
- |
|
1481 |
Button ajouterPersonneExistanteBtn = new Button("Ajouter");
|
- |
|
1482 |
ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
1483 |
@Override
|
1478 |
toolBar.add(personneExistanteCombo);
|
1484 |
public void componentSelected(ButtonEvent ce) {
|
- |
|
1485 |
Personne personneExistante = personneExistanteCombo.getValue();
|
- |
|
1486 |
|
- |
|
1487 |
if (personneExistante != null) {
|
- |
|
1488 |
StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
|
- |
|
Line -... |
Line 1479... |
- |
|
1479 |
|
- |
|
1480 |
Button ajouterPersonneExistanteBtn = new Button("Ajouter à la grille");
|
1489 |
membreDuPersonnel.setIdPersonne(personneExistante.getId());
|
1481 |
ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
1490 |
membreDuPersonnel.setIdProjetPersonne(personneExistante.getIdProjet());
|
1482 |
@Override
|
1491 |
membreDuPersonnel.setNom(personneExistante.getNom());
|
1483 |
public void componentSelected(ButtonEvent ce) {
|
1492 |
membreDuPersonnel.setPrenom(personneExistante.getPrenom());
|
1484 |
|
1493 |
membreDuPersonnel.setTelephone(personneExistante.getTelephone());
|
1485 |
Personne personneExistante = new Personne(personneExistanteCombo.getValeur());
|
Line 2119... |
Line 2111... |
2119 |
// Remise à zéro des modification dans la liste du personnel
|
2111 |
// Remise à zéro des modification dans la liste du personnel
|
2120 |
personnelModifie = new StructureAPersonneListe();
|
2112 |
personnelModifie = new StructureAPersonneListe();
|
2121 |
personnelAjoute = new StructureAPersonneListe();
|
2113 |
personnelAjoute = new StructureAPersonneListe();
|
2122 |
personnelSupprime = new StructureAPersonneListe();
|
2114 |
personnelSupprime = new StructureAPersonneListe();
|
2123 |
}
|
2115 |
}
|
2124 |
} else if (info.getType().equals("liste_personne")) {
|
2116 |
} /*else if (info.getType().equals("liste_personne")) {
|
2125 |
if (info.getDonnee(0) != null) {
|
2117 |
if (info.getDonnee(0) != null) {
|
2126 |
PersonneListe personnes = (PersonneListe) info.getDonnee(0);
|
2118 |
PersonneListe personnes = (PersonneListe) info.getDonnee(0);
|
2127 |
List<Personne> liste = personnes.toList();
|
2119 |
List<Personne> liste = personnes.toList();
|
Line 2128... |
Line 2120... |
2128 |
|
2120 |
|
2129 |
personneExistanteMagazin.removeAll();
|
2121 |
personneExistanteMagazin.removeAll();
|
2130 |
personneExistanteMagazin.add(liste);
|
2122 |
personneExistanteMagazin.add(liste);
|
2131 |
personneExistanteCombo.setStore(personneExistanteMagazin);
|
2123 |
personneExistanteCombo.setStore(personneExistanteMagazin);
|
2132 |
personneExistanteCombo.expand();
|
2124 |
personneExistanteCombo.expand();
|
2133 |
}
|
2125 |
}
|
2134 |
}
|
2126 |
}*/
|
Line 2135... |
Line 2127... |
2135 |
}
|
2127 |
}
|
2136 |
|
2128 |
|