Line 24... |
Line 24... |
24 |
import org.tela_botanica.client.modeles.StructureValorisation;
|
24 |
import org.tela_botanica.client.modeles.StructureValorisation;
|
25 |
import org.tela_botanica.client.modeles.Valeur;
|
25 |
import org.tela_botanica.client.modeles.Valeur;
|
26 |
import org.tela_botanica.client.modeles.ValeurListe;
|
26 |
import org.tela_botanica.client.modeles.ValeurListe;
|
27 |
import org.tela_botanica.client.util.UtilArray;
|
27 |
import org.tela_botanica.client.util.UtilArray;
|
Line 28... |
Line 28... |
28 |
|
28 |
|
29 |
import com.extjs.gxt.ui.client.Events;
|
29 |
import com.extjs.gxt.ui.client.event.Events;
|
30 |
import com.extjs.gxt.ui.client.Registry;
|
30 |
import com.extjs.gxt.ui.client.Registry;
|
31 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
31 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
32 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
32 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
- |
|
33 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
33 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
34 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
34 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
35 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
35 |
import com.extjs.gxt.ui.client.event.GridEvent;
|
36 |
import com.extjs.gxt.ui.client.event.GridEvent;
|
36 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
37 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
37 |
import com.extjs.gxt.ui.client.event.Listener;
|
38 |
import com.extjs.gxt.ui.client.event.Listener;
|
Line 79... |
Line 80... |
79 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
80 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
80 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
81 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
81 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
82 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
82 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
83 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
83 |
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
|
84 |
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
|
84 |
import com.extjs.gxt.ui.client.widget.toolbar.AdapterToolItem;
|
85 |
//import com.extjs.gxt.ui.client.widget.toolbar.AdapterToolItem;
|
85 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
86 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
86 |
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
|
- |
|
87 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
87 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
88 |
import com.google.gwt.core.client.GWT;
|
88 |
import com.google.gwt.core.client.GWT;
|
89 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
89 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
90 |
import com.google.gwt.i18n.client.NumberFormat;
|
90 |
import com.google.gwt.i18n.client.NumberFormat;
|
Line 211... |
Line 211... |
211 |
private RadioGroup avecMotifAccesMarkRGrpChp;
|
211 |
private RadioGroup avecMotifAccesMarkRGrpChp;
|
212 |
private TextField<String> publicationChp;
|
212 |
private TextField<String> publicationChp;
|
213 |
private ContentPanel materielConservationCp;
|
213 |
private ContentPanel materielConservationCp;
|
214 |
private ListStore<Personne> personneExistanteMagazin;
|
214 |
private ListStore<Personne> personneExistanteMagazin;
|
215 |
private ComboBox<Personne> personneExistanteCombo;
|
215 |
private ComboBox<Personne> personneExistanteCombo;
|
216 |
private TextToolItem supprimerPersonnelBtn;
|
216 |
private Button supprimerPersonnelBtn;
|
217 |
private ListStore<Projet> projetsMagazin;
|
217 |
private ListStore<Projet> projetsMagazin;
|
218 |
private ComboBox<Projet> projetsCombo;
|
218 |
private ComboBox<Projet> projetsCombo;
|
219 |
private CellEditor fonctionEditor;
|
219 |
private CellEditor fonctionEditor;
|
220 |
private List<Valeur> fonctionsListe;
|
220 |
private List<Valeur> fonctionsListe;
|
Line 273... |
Line 273... |
273 |
// Ajout des onglets au formulaire général
|
273 |
// Ajout des onglets au formulaire général
|
274 |
structureFormPanneau.add(onglets);
|
274 |
structureFormPanneau.add(onglets);
|
Line 275... |
Line 275... |
275 |
|
275 |
|
276 |
// Ajout des boutons au panneau formulaire
|
276 |
// Ajout des boutons au panneau formulaire
|
277 |
Button annulerBtn = new Button("Annuler");
|
277 |
Button annulerBtn = new Button("Annuler");
|
Line 278... |
Line 278... |
278 |
annulerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
278 |
annulerBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
279 |
|
279 |
|
280 |
@Override
|
280 |
@Override
|
281 |
public void componentSelected(ComponentEvent ce) {
|
281 |
public void componentSelected(ButtonEvent ce) {
|
Line 282... |
Line 282... |
282 |
mediateur.clicMenu(MenuApplicationId.STRUCTURE);
|
282 |
mediateur.clicMenu(MenuApplicationId.STRUCTURE);
|
283 |
}
|
283 |
}
|
284 |
|
284 |
|
285 |
});
|
285 |
});
|
Line 286... |
Line 286... |
286 |
structureFormPanneau.addButton(annulerBtn);
|
286 |
structureFormPanneau.addButton(annulerBtn);
|
287 |
Button validerBtn = new Button("Valider");
|
287 |
Button validerBtn = new Button("Valider");
|
288 |
validerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
288 |
validerBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
289 |
|
289 |
|
Line 290... |
Line 290... |
290 |
@Override
|
290 |
@Override
|
291 |
public void componentSelected(ComponentEvent ce) {
|
291 |
public void componentSelected(ButtonEvent ce) {
|
Line 448... |
Line 448... |
448 |
return valorisationARetourner;
|
448 |
return valorisationARetourner;
|
449 |
}
|
449 |
}
|
Line 450... |
Line 450... |
450 |
|
450 |
|
451 |
private void peuplerStructureValorisation() {
|
451 |
private void peuplerStructureValorisation() {
|
452 |
if (valorisation != null && valorisationOnglet.getData("acces").equals(false)) {
|
452 |
if (valorisation != null && valorisationOnglet.getData("acces").equals(false)) {
|
- |
|
453 |
// ACTION :
|
453 |
// ACTION
|
454 |
//TODO : check below:
|
- |
|
455 |
((Radio) actionMarkRGrpChp.get((valorisation.getAction().equals("1") ? 0 : 1))).setValue(true);
|
Line 454... |
Line 456... |
454 |
actionMarkRGrpChp.get((valorisation.getAction().equals("1") ? 0 : 1)).setValue(true);
|
456 |
|
455 |
|
457 |
|
Line 456... |
Line 458... |
456 |
// ACTION INFO
|
458 |
// ACTION INFO
|
Line 461... |
Line 463... |
461 |
|
463 |
|
462 |
// COLLECTION AUTRE
|
464 |
// COLLECTION AUTRE
|
Line 463... |
Line 465... |
463 |
peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp);
|
465 |
peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp);
|
464 |
|
466 |
|
Line 465... |
Line 467... |
465 |
// ACTION FUTURE
|
467 |
// ACTION FUTURE
|
466 |
futureActionMarkRGrpChp.get((valorisation.getActionFuture().equals("1") ? 0 : 1)).setValue(true);
|
468 |
((Radio) futureActionMarkRGrpChp.get((valorisation.getActionFuture().equals("1") ? 0 : 1))).setValue(true);
|
Line 467... |
Line 469... |
467 |
|
469 |
|
468 |
// ACTION FUTURE INFO
|
470 |
// ACTION FUTURE INFO
|
469 |
futureActionChp.setValue(valorisation.getActionFutureInfo());
|
471 |
futureActionChp.setValue(valorisation.getActionFutureInfo());
|
470 |
|
472 |
|
471 |
// RECHERCHE
|
473 |
// RECHERCHE
|
472 |
rechercheMarkRGrpChp.get((valorisation.getRecherche().equals("1") ? 0 : 1)).setValue(true);
|
474 |
((Radio) rechercheMarkRGrpChp.get((valorisation.getRecherche().equals("1") ? 0 : 1))).setValue(true);
|
Line 473... |
Line 475... |
473 |
// RECHERCHE PROVENANCE
|
475 |
// RECHERCHE PROVENANCE
|
474 |
peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp);
|
476 |
peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp);
|
475 |
// RECHERCHE TYPE
|
477 |
// RECHERCHE TYPE
|
476 |
peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp);
|
478 |
peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp);
|
Line 477... |
Line 479... |
477 |
|
479 |
|
478 |
// ACCÈS SANS MOTIF
|
480 |
// ACCÈS SANS MOTIF
|
479 |
sansMotifAccesMarkRGrpChp.get((valorisation.getAccesSansMotif().equals("1") ? 0 : 1)).setValue(true);
|
481 |
((Radio) sansMotifAccesMarkRGrpChp.get((valorisation.getAccesSansMotif().equals("1") ? 0 : 1))).setValue(true);
|
480 |
// ACCÈS SANS MOTIF INFO
|
482 |
// ACCÈS SANS MOTIF INFO
|
Line 481... |
Line 483... |
481 |
sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo());
|
483 |
sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo());
|
482 |
|
484 |
|
Line 588... |
Line 590... |
588 |
|
590 |
|
589 |
private void peuplerStructureConservation() {
|
591 |
private void peuplerStructureConservation() {
|
590 |
if (conservation != null && conservationOnglet.getData("acces").equals(false)) {
|
592 |
if (conservation != null && conservationOnglet.getData("acces").equals(false)) {
|
591 |
// FORMATION
|
593 |
// FORMATION
|
592 |
// Bouton oui, à toujours l'index 0 donc on teste en fonction...
|
594 |
// Bouton oui, à toujours l'index 0 donc on teste en fonction...
|
593 |
formationMarkRGrpChp.get((conservation.getFormation().equals("1") ? 0 : 1)).setValue(true);
|
595 |
((Radio) formationMarkRGrpChp.get((conservation.getFormation().equals("1") ? 0 : 1))).setValue(true);
|
594 |
// FORMATION INFO
|
596 |
// FORMATION INFO
|
595 |
formationChp.setValue(conservation.getFormationInfo());
|
597 |
formationChp.setValue(conservation.getFormationInfo());
|
596 |
// FORMATION INTERET
|
598 |
// FORMATION INTERET
|
Line 597... |
Line 599... |
597 |
interetFormationMarkRGrpChp.get((conservation.getFormationInteret().equals("1") ? 0 : 1)).setValue(true);
|
599 |
((Radio) interetFormationMarkRGrpChp.get((conservation.getFormationInteret().equals("1") ? 0 : 1))).setValue(true);
|
598 |
|
600 |
|
Line 599... |
Line 601... |
599 |
// STOCKAGE LOCAL
|
601 |
// STOCKAGE LOCAL
|
Line 604... |
Line 606... |
604 |
|
606 |
|
605 |
// STOCKAGE PAREMETRE
|
607 |
// STOCKAGE PAREMETRE
|
Line 606... |
Line 608... |
606 |
peuplerCasesACocher(conservation.getStockageParametre(), parametreStockageTrukCacGrpChp, parametreStockageAutreChp);
|
608 |
peuplerCasesACocher(conservation.getStockageParametre(), parametreStockageTrukCacGrpChp, parametreStockageAutreChp);
|
607 |
|
609 |
|
608 |
// COLLECTION COMMUNE
|
610 |
// COLLECTION COMMUNE
|
609 |
collectionCommuneMarkRGrpChp.get((conservation.getCollectionCommune().equals("1") ? 0 : 1)).setValue(true);
|
611 |
((Radio) collectionCommuneMarkRGrpChp.get((conservation.getCollectionCommune().equals("1") ? 0 : 1))).setValue(true);
|
Line 610... |
Line 612... |
610 |
// COLLECTION AUTRE
|
612 |
// COLLECTION AUTRE
|
611 |
peuplerCasesACocher(conservation.getCollectionAutre(), collectionAutreTrukCacGrpChp, collectionAutreAutreChp);
|
613 |
peuplerCasesACocher(conservation.getCollectionAutre(), collectionAutreTrukCacGrpChp, collectionAutreAutreChp);
|
Line 612... |
Line 614... |
612 |
|
614 |
|
613 |
// ACCÈS CONTROLÉ
|
615 |
// ACCÈS CONTROLÉ
|
614 |
accesControleMarkRGrpChp.get((conservation.getAccesControle().equals("1") ? 0 : 1)).setValue(true);
|
616 |
((Radio) accesControleMarkRGrpChp.get((conservation.getAccesControle().equals("1") ? 0 : 1))).setValue(true);
|
615 |
|
617 |
|
Line 616... |
Line 618... |
616 |
// RESTAURATION
|
618 |
// RESTAURATION
|
617 |
restaurationMarkRGrpChp.get((conservation.getRestauration().equals("1") ? 0 : 1)).setValue(true);
|
619 |
((Radio) restaurationMarkRGrpChp.get((conservation.getRestauration().equals("1") ? 0 : 1))).setValue(true);
|
Line 618... |
Line 620... |
618 |
// RESTAURATION OPÉRATION
|
620 |
// RESTAURATION OPÉRATION
|
619 |
peuplerCasesACocher(conservation.getRestaurationOperation(), opRestauTrukCacGrpChp, opRestauAutreChp);
|
621 |
peuplerCasesACocher(conservation.getRestaurationOperation(), opRestauTrukCacGrpChp, opRestauAutreChp);
|
Line 620... |
Line 622... |
620 |
|
622 |
|
621 |
// MATERIEL CONSERVATION
|
623 |
// MATERIEL CONSERVATION
|
622 |
peuplerBoutonsRadio(conservation.getMaterielConservation(), materielConservationCeRGrpChp);
|
624 |
peuplerBoutonsRadio(conservation.getMaterielConservation(), materielConservationCeRGrpChp);
|
623 |
|
625 |
|
Line 624... |
Line 626... |
624 |
// MATERIEL AUTRE
|
626 |
// MATERIEL AUTRE
|
625 |
peuplerCasesACocher(conservation.getMaterielAutre(), autreMaterielTrukCacGrpChp, autreMaterielAutreChp);
|
627 |
peuplerCasesACocher(conservation.getMaterielAutre(), autreMaterielTrukCacGrpChp, autreMaterielAutreChp);
|
Line 626... |
Line 628... |
626 |
|
628 |
|
627 |
// TRAITEMENT
|
629 |
// TRAITEMENT
|
Line 628... |
Line 630... |
628 |
traitementMarkRGrpChp.get((conservation.getTraitement().equals("1") ? 0 : 1)).setValue(true);
|
630 |
((Radio) traitementMarkRGrpChp.get((conservation.getTraitement().equals("1") ? 0 : 1))).setValue(true);
|
629 |
// TRAITEMENTS
|
631 |
// TRAITEMENTS
|
630 |
peuplerCasesACocher(conservation.getTraitements(), traitementTrukCacGrpChp, traitementAutreChp);
|
- |
|
631 |
|
632 |
peuplerCasesACocher(conservation.getTraitements(), traitementTrukCacGrpChp, traitementAutreChp);
|
632 |
// ACQUISITION COLLECTION
|
633 |
|
633 |
collectionAcquisitionMarkRGrpChp.get((conservation.getAcquisitionCollection().equals("1") ? 0 : 1)).setValue(true);
|
634 |
// ACQUISITION COLLECTION
|
634 |
|
635 |
((Radio) collectionAcquisitionMarkRGrpChp.get((conservation.getAcquisitionCollection().equals("1") ? 0 : 1))).setValue(true);
|
Line 815... |
Line 816... |
815 |
futureActionChp.setFieldLabel("Si oui, lesquelles ?");
|
816 |
futureActionChp.setFieldLabel("Si oui, lesquelles ?");
|
816 |
futureActionChp.hide();
|
817 |
futureActionChp.hide();
|
817 |
futureActionChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
818 |
futureActionChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
Line 818... |
Line 819... |
818 |
|
819 |
|
819 |
public void handleEvent(BaseEvent be) {
|
820 |
public void handleEvent(BaseEvent be) {
|
820 |
((TextArea) be.source).setValue("");
|
821 |
((TextArea) be.getSource()).setValue("");
|
Line 821... |
Line 822... |
821 |
}
|
822 |
}
|
822 |
|
823 |
|
Line 846... |
Line 847... |
846 |
valorisationOnglet.add(sansMotifAccesChp = new TextArea(), new FormData(550, 0));
|
847 |
valorisationOnglet.add(sansMotifAccesChp = new TextArea(), new FormData(550, 0));
|
847 |
sansMotifAccesChp.hide();
|
848 |
sansMotifAccesChp.hide();
|
848 |
sansMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
849 |
sansMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
Line 849... |
Line 850... |
849 |
|
850 |
|
850 |
public void handleEvent(BaseEvent be) {
|
851 |
public void handleEvent(BaseEvent be) {
|
851 |
((TextArea) be.source).setValue("");
|
852 |
((TextArea) be.getSource()).setValue("");
|
Line 852... |
Line 853... |
852 |
}
|
853 |
}
|
853 |
|
854 |
|
Line 861... |
Line 862... |
861 |
valorisationOnglet.add(avecMotifAccesChp = new TextArea(), new FormData(550, 0));
|
862 |
valorisationOnglet.add(avecMotifAccesChp = new TextArea(), new FormData(550, 0));
|
862 |
avecMotifAccesChp.hide();
|
863 |
avecMotifAccesChp.hide();
|
863 |
avecMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
864 |
avecMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
Line 864... |
Line 865... |
864 |
|
865 |
|
865 |
public void handleEvent(BaseEvent be) {
|
866 |
public void handleEvent(BaseEvent be) {
|
866 |
((TextArea) be.source).setValue("");
|
867 |
((TextArea) be.getSource()).setValue("");
|
Line 867... |
Line 868... |
867 |
}
|
868 |
}
|
868 |
|
869 |
|
Line 892... |
Line 893... |
892 |
formationChp = new TextArea();
|
893 |
formationChp = new TextArea();
|
893 |
formationChp.hide();
|
894 |
formationChp.hide();
|
894 |
formationChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
895 |
formationChp.addListener(Events.Hide, new Listener<BaseEvent>() {
|
Line 895... |
Line 896... |
895 |
|
896 |
|
896 |
public void handleEvent(BaseEvent be) {
|
897 |
public void handleEvent(BaseEvent be) {
|
897 |
((TextArea) be.source).setValue("");
|
898 |
((TextArea) be.getSource()).setValue("");
|
Line 898... |
Line 899... |
898 |
}
|
899 |
}
|
899 |
|
900 |
|
900 |
});
|
901 |
});
|
Line 1328... |
Line 1329... |
1328 |
CheckColumnConfig checkColumn = new CheckColumnConfig("contact", "Contact ?", 60);
|
1329 |
CheckColumnConfig checkColumn = new CheckColumnConfig("contact", "Contact ?", 60);
|
1329 |
configs.add(checkColumn);
|
1330 |
configs.add(checkColumn);
|
Line 1330... |
Line 1331... |
1330 |
|
1331 |
|
Line -... |
Line 1332... |
- |
|
1332 |
ToolBar toolBar = new ToolBar();
|
1331 |
ToolBar toolBar = new ToolBar();
|
1333 |
|
1332 |
|
1334 |
Button ajouterPersonnelBtn = new Button("Ajouter");
|
1333 |
TextToolItem ajouterPersonnelBtn = new TextToolItem("Ajouter", "icone-vcard-ajouter");
|
1335 |
ajouterPersonnelBtn.setIconStyle("icone-vcard-ajouter");
|
1334 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
1336 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
1335 |
@Override
|
1337 |
@Override
|
1336 |
public void componentSelected(ToolBarEvent ce) {
|
1338 |
public void componentSelected(ButtonEvent ce) {
|
1337 |
StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
|
1339 |
StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
|
1338 |
ajouterMembreAGrillePersonnel(membreDuPersonnel);
|
1340 |
ajouterMembreAGrillePersonnel(membreDuPersonnel);
|
1339 |
}
|
1341 |
}
|
Line 1340... |
Line 1342... |
1340 |
});
|
1342 |
});
|
Line -... |
Line 1343... |
- |
|
1343 |
toolBar.add(ajouterPersonnelBtn);
|
1341 |
toolBar.add(ajouterPersonnelBtn);
|
1344 |
|
1342 |
|
1345 |
toolBar.add(new SeparatorToolItem());
|
1343 |
toolBar.add(new SeparatorToolItem());
|
1346 |
|
1344 |
|
1347 |
supprimerPersonnelBtn = new Button("Supprimer");
|
1345 |
supprimerPersonnelBtn = new TextToolItem("Supprimer", "icone-vcard-supprimer");
|
1348 |
supprimerPersonnelBtn.setIconStyle("icone-vcard-supprimer");
|
1346 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
1349 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
1347 |
@Override
|
1350 |
@Override
|
1348 |
public void componentSelected(ToolBarEvent ce) {
|
1351 |
public void componentSelected(ButtonEvent ce) {
|
1349 |
StructureAPersonne personne = grillePersonnel.getSelectionModel().getSelectedItem();
|
1352 |
StructureAPersonne personne = grillePersonnel.getSelectionModel().getSelectedItem();
|
Line 1356... |
Line 1359... |
1356 |
// Suppression de l'enregistrement de la grille
|
1359 |
// Suppression de l'enregistrement de la grille
|
1357 |
grillePersonnel.getStore().remove(personne);
|
1360 |
grillePersonnel.getStore().remove(personne);
|
Line 1358... |
Line 1361... |
1358 |
|
1361 |
|
1359 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
1362 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
- |
|
1363 |
if (grillePersonnel.getStore().getCount() == 0) {
|
1360 |
if (grillePersonnel.getStore().getCount() == 0) {
|
1364 |
//TODO : check : Item -> component
|
1361 |
ce.item.disable();
|
1365 |
ce.getComponent().disable();
|
1362 |
}
|
1366 |
}
|
1363 |
}
|
1367 |
}
|
1364 |
}
|
1368 |
}
|
1365 |
});
|
1369 |
});
|
Line 1366... |
Line 1370... |
1366 |
toolBar.add(supprimerPersonnelBtn);
|
1370 |
toolBar.add(supprimerPersonnelBtn);
|
Line 1367... |
Line 1371... |
1367 |
|
1371 |
|
- |
|
1372 |
toolBar.add(new SeparatorToolItem());
|
1368 |
toolBar.add(new SeparatorToolItem());
|
1373 |
|
1369 |
|
1374 |
Button rafraichirPersonnelBtn = new Button("Rafraichir");
|
1370 |
TextToolItem rafraichirPersonnelBtn = new TextToolItem("Rafraichir", "icone-rafraichir");
|
1375 |
rafraichirPersonnelBtn.setIconStyle("icone-rafraichir");
|
1371 |
rafraichirPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
1376 |
rafraichirPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
1372 |
@Override
|
1377 |
@Override
|
1373 |
public void componentSelected(ToolBarEvent ce) {
|
1378 |
public void componentSelected(ButtonEvent ce) {
|
1374 |
rafraichirPersonnel();
|
1379 |
rafraichirPersonnel();
|
Line 1397... |
Line 1402... |
1397 |
}
|
1402 |
}
|
Line 1398... |
Line 1403... |
1398 |
|
1403 |
|
Line 1399... |
Line 1404... |
1399 |
});
|
1404 |
});
|
- |
|
1405 |
|
1400 |
|
1406 |
// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
|
Line 1401... |
Line 1407... |
1401 |
// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
|
1407 |
//> CHECK
|
1402 |
toolBar.add(new AdapterToolItem(personneExistanteCombo));
|
1408 |
toolBar.add(personneExistanteCombo);
|
1403 |
|
1409 |
|
1404 |
TextToolItem ajouterPersonneExistanteBtn = new TextToolItem("Ajouter");
|
1410 |
Button ajouterPersonneExistanteBtn = new Button("Ajouter");
|
1405 |
ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
1411 |
ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
Line 1406... |
Line 1412... |
1406 |
@Override
|
1412 |
@Override
|
1407 |
public void componentSelected(ToolBarEvent ce) {
|
1413 |
public void componentSelected(ButtonEvent ce) {
|
1408 |
Personne personneExistante = personneExistanteCombo.getValue();
|
1414 |
Personne personneExistante = personneExistanteCombo.getValue();
|
Line 1759... |
Line 1765... |
1759 |
String[] valeurs = donnees.split(";;");
|
1765 |
String[] valeurs = donnees.split(";;");
|
1760 |
for (int i = 0; i < valeurs.length; i++) {
|
1766 |
for (int i = 0; i < valeurs.length; i++) {
|
1761 |
if (valeurs[i].startsWith("AUTRE##")) {
|
1767 |
if (valeurs[i].startsWith("AUTRE##")) {
|
1762 |
champAutre.setValue(valeurs[i].replaceFirst("^AUTRE##", ""));
|
1768 |
champAutre.setValue(valeurs[i].replaceFirst("^AUTRE##", ""));
|
1763 |
} else {
|
1769 |
} else {
|
- |
|
1770 |
//TODO : check : List<CheckBox> cases = groupeCac.getAll();
|
1764 |
List<CheckBox> cases = groupeCac.getAll();
|
1771 |
List<Field<?>> cases = groupeCac.getAll();
|
1765 |
for (int j = 0; j < cases.size(); j++) {
|
1772 |
for (int j = 0; j < cases.size(); j++) {
|
1766 |
if (cases.get(j).getId().equals("val-"+valeurs[i])) {
|
1773 |
if (cases.get(j).getId().equals("val-"+valeurs[i])) {
|
1767 |
cases.get(j).setValue(true);
|
1774 |
((CheckBox) cases.get(j)).setValue(true);
|
1768 |
}
|
1775 |
}
|
1769 |
}
|
1776 |
}
|
1770 |
}
|
1777 |
}
|
1771 |
}
|
1778 |
}
|
1772 |
}
|
1779 |
}
|
Line 1773... |
Line 1780... |
1773 |
|
1780 |
|
1774 |
private void peuplerBoutonsRadio(String valeur, RadioGroup groupeBr) {
|
1781 |
private void peuplerBoutonsRadio(String valeur, RadioGroup groupeBr) {
|
- |
|
1782 |
//List<Radio> boutons = groupeBr.getAll();
|
1775 |
List<Radio> boutons = groupeBr.getAll();
|
1783 |
List<Field<?>> boutons = groupeBr.getAll();
|
1776 |
String id = valeur+"_"+groupeBr.getName().replace("_grp", "");
|
1784 |
String id = valeur+"_"+groupeBr.getName().replace("_grp", "");
|
1777 |
for (int i = 0; i < boutons.size(); i++) {
|
1785 |
for (int i = 0; i < boutons.size(); i++) {
|
1778 |
if (boutons.get(i).getId().equals(id)) {
|
1786 |
if (boutons.get(i).getId().equals(id)) {
|
1779 |
boutons.get(i).setValue(true);
|
1787 |
((Radio) boutons.get(i)).setValue(true);
|
1780 |
}
|
1788 |
}
|
1781 |
}
|
1789 |
}
|
Line 1782... |
Line 1790... |
1782 |
}
|
1790 |
}
|
Line 1810... |
Line 1818... |
1810 |
formLayout.setLabelWidth(labelWidth);
|
1818 |
formLayout.setLabelWidth(labelWidth);
|
1811 |
}
|
1819 |
}
|
1812 |
if (labelAlign != null) {
|
1820 |
if (labelAlign != null) {
|
1813 |
formLayout.setLabelAlign(labelAlign);
|
1821 |
formLayout.setLabelAlign(labelAlign);
|
1814 |
}
|
1822 |
}
|
- |
|
1823 |
|
- |
|
1824 |
//TODO : Check : setPadding ne peut pas être placé sur le form layout mais doit l'etre sur le parent
|
1815 |
if (padding != null) {
|
1825 |
/*if (padding != null) {
|
1816 |
formLayout.setPadding(padding);
|
1826 |
formLayout.setPadding(padding);
|
1817 |
}
|
1827 |
}*/
|
1818 |
return formLayout;
|
1828 |
return formLayout;
|
1819 |
}
|
1829 |
}
|
Line 1820... |
Line 1830... |
1820 |
|
1830 |
|
1821 |
/** Méthode simplifiant la création de bouton radio oui/non
|
1831 |
/** Méthode simplifiant la création de bouton radio oui/non
|
Line 1850... |
Line 1860... |
1850 |
radioBtn.setValueAttribute(val.getId());
|
1860 |
radioBtn.setValueAttribute(val.getId());
|
1851 |
radioBtn.addListener(Events.Change, new Listener<ComponentEvent>() {
|
1861 |
radioBtn.addListener(Events.Change, new Listener<ComponentEvent>() {
|
Line 1852... |
Line 1862... |
1852 |
|
1862 |
|
1853 |
public void handleEvent(ComponentEvent be) {
|
1863 |
public void handleEvent(ComponentEvent be) {
|
1854 |
//Window.alert(((Radio) be.component).getName());
|
1864 |
//Window.alert(((Radio) be.component).getName());
|
1855 |
afficherChampSupplementaire(((Radio) be.component));
|
1865 |
afficherChampSupplementaire(((Radio) be.getComponent()));
|
Line 1856... |
Line 1866... |
1856 |
}
|
1866 |
}
|
Line 1857... |
Line 1867... |
1857 |
|
1867 |
|