Line 11... |
Line 11... |
11 |
import org.tela_botanica.client.composants.GrillePaginable;
|
11 |
import org.tela_botanica.client.composants.GrillePaginable;
|
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.ProxyPersonnes;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyPersonnesAPublication;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyPersonnesAPublication;
|
15 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
15 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
16 |
import org.tela_botanica.client.composants.pagination.ProxyPublicationsAPersonne;
|
- |
|
17 |
import org.tela_botanica.client.composants.pagination.ProxyStructures;
|
16 |
import org.tela_botanica.client.composants.pagination.ProxyStructures;
|
18 |
import org.tela_botanica.client.images.Images;
|
17 |
import org.tela_botanica.client.images.Images;
|
19 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
18 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
20 |
import org.tela_botanica.client.modeles.Information;
|
19 |
import org.tela_botanica.client.modeles.Information;
|
21 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
20 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
22 |
import org.tela_botanica.client.modeles.aDonnee;
|
21 |
import org.tela_botanica.client.modeles.aDonnee;
|
23 |
import org.tela_botanica.client.modeles.personne.Personne;
|
22 |
import org.tela_botanica.client.modeles.personne.Personne;
|
24 |
import org.tela_botanica.client.modeles.personne.PersonneListe;
|
- |
|
25 |
import org.tela_botanica.client.modeles.projet.Projet;
|
23 |
import org.tela_botanica.client.modeles.projet.Projet;
|
26 |
import org.tela_botanica.client.modeles.publication.Publication;
|
24 |
import org.tela_botanica.client.modeles.publication.Publication;
|
27 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
|
25 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
|
28 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
26 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
29 |
import org.tela_botanica.client.modeles.structure.Structure;
|
27 |
import org.tela_botanica.client.modeles.structure.Structure;
|
Line 37... |
Line 35... |
37 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
35 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
38 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
36 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
Line 39... |
Line 37... |
39 |
|
37 |
|
40 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
38 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
41 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
- |
|
42 |
import com.extjs.gxt.ui.client.core.XTemplate;
|
39 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
43 |
import com.extjs.gxt.ui.client.data.ModelData;
|
40 |
import com.extjs.gxt.ui.client.data.ModelData;
|
44 |
import com.extjs.gxt.ui.client.data.ModelType;
|
41 |
import com.extjs.gxt.ui.client.data.ModelType;
|
45 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
42 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
46 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
43 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
Line 57... |
Line 54... |
57 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
54 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
58 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
55 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
59 |
import com.extjs.gxt.ui.client.widget.Text;
|
56 |
import com.extjs.gxt.ui.client.widget.Text;
|
60 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
57 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
61 |
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
|
58 |
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
|
62 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
- |
|
63 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
59 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
64 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
60 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
65 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
61 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
66 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
62 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
67 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
63 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
68 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
- |
|
69 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
- |
|
70 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
64 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
71 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
65 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
72 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
- |
|
73 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
66 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
74 |
import com.extjs.gxt.ui.client.widget.grid.RowExpander;
|
- |
|
75 |
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
|
- |
|
76 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
67 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
77 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
68 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
78 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
69 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
79 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
70 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
80 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
71 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
Line 132... |
Line 123... |
132 |
|
123 |
|
133 |
private String modeDeCreation = null;
|
124 |
private String modeDeCreation = null;
|
Line 134... |
Line -... |
134 |
boolean changeOrderMarker = false;
|
- |
|
135 |
|
125 |
boolean changeOrderMarker = false;
|
- |
|
126 |
|
Line 136... |
Line 127... |
136 |
|
127 |
|
137 |
//----------------------//
|
128 |
//+----------------------------------------------------------------------------------------------------------------+
|
138 |
// Constructeurs //------------------------------------------------------------
|
129 |
// Constructeurs
|
Line 145... |
Line 136... |
145 |
vueExterneARafraichirApresValidation = vueARafraichirApresValidation;
|
136 |
vueExterneARafraichirApresValidation = vueARafraichirApresValidation;
|
146 |
initialiserPublicationForm(mediateurCourrant, publicationId);
|
137 |
initialiserPublicationForm(mediateurCourrant, publicationId);
|
147 |
}
|
138 |
}
|
Line 148... |
Line -... |
148 |
|
- |
|
149 |
|
139 |
|
- |
|
140 |
|
Line 150... |
Line 141... |
150 |
//-----------------------//
|
141 |
//+----------------------------------------------------------------------------------------------------------------+
|
151 |
// Initialisation //------------------------------------------------------------
|
142 |
// Initialisation
|
152 |
|
143 |
|
153 |
private void initialiserPublicationForm(Mediateur mediateurCourrant, String publicationId) {
|
144 |
private void initialiserPublicationForm(Mediateur mediateurCourrant, String publicationId) {
|
Line 190... |
Line 181... |
190 |
auteursAjoutes = new PublicationAPersonneListe();
|
181 |
auteursAjoutes = new PublicationAPersonneListe();
|
191 |
auteursSupprimes = new PublicationAPersonneListe();
|
182 |
auteursSupprimes = new PublicationAPersonneListe();
|
192 |
auteursModifies = new PublicationAPersonneListe();
|
183 |
auteursModifies = new PublicationAPersonneListe();
|
193 |
}
|
184 |
}
|
Line 194... |
Line -... |
194 |
|
- |
|
195 |
//-----------------------//
|
185 |
|
- |
|
186 |
//+----------------------------------------------------------------------------------------------------------------+
|
Line 196... |
Line 187... |
196 |
// User Interface //------------------------------------------------------------
|
187 |
// User Interface
|
197 |
|
188 |
|
Line 198... |
Line 189... |
198 |
private ToolBar creerBarreOutilsGrille() {
|
189 |
private ToolBar creerBarreOutilsGrille() {
|
Line 501... |
Line 492... |
501 |
InfoLogger.display("Information", "La personne choisie existe déjà dans la liste.");
|
492 |
InfoLogger.display("Information", "La personne choisie existe déjà dans la liste.");
|
502 |
}
|
493 |
}
|
503 |
}
|
494 |
}
|
504 |
}
|
495 |
}
|
Line 505... |
Line -... |
505 |
|
- |
|
506 |
/**
|
- |
|
507 |
* Met à jour la grille avec les informations contenus dans la variable listePublicationsLiees
|
- |
|
508 |
*/
|
- |
|
509 |
/*
|
- |
|
510 |
private void mettreAJourGrille() {
|
- |
|
511 |
grille.getStore().removeAll();
|
- |
|
512 |
grille.getStore().add(listePersonne.toList());
|
- |
|
513 |
}*/
|
- |
|
514 |
|
496 |
|
515 |
private void supprimerDansGrille(PublicationAPersonne pap) {
|
497 |
private void supprimerDansGrille(PublicationAPersonne pap) {
|
516 |
if (pap != null) {
|
498 |
if (pap != null) {
|
517 |
// 1) Ajouter a la liste des personne à supprimer uniquement si est présente dans la liste initiale
|
499 |
// 1) Ajouter a la liste des personne à supprimer uniquement si est présente dans la liste initiale
|
518 |
if (auteursInitialListe.containsValue(pap)) {
|
500 |
if (auteursInitialListe.containsValue(pap)) {
|
Line 533... |
Line 515... |
533 |
Info.display("Information", "Vous devez sélectionner une personne");
|
515 |
Info.display("Information", "Vous devez sélectionner une personne");
|
534 |
}
|
516 |
}
|
535 |
}
|
517 |
}
|
Line 536... |
Line 518... |
536 |
|
518 |
|
537 |
private GrillePaginable<ModelData> creerGrilleAuteurs() {
|
- |
|
538 |
|
519 |
private GrillePaginable<ModelData> creerGrilleAuteurs() {
|
539 |
// ModelType
|
520 |
// ModelType
|
540 |
ModelType modelTypePersonnesAPublication = new ModelType();
|
521 |
ModelType modelTypePersonnesAPublication = new ModelType();
|
541 |
modelTypePersonnesAPublication.setRoot("publicationsAPersonne");
|
522 |
modelTypePersonnesAPublication.setRoot("publicationsAPersonne");
|
542 |
modelTypePersonnesAPublication.setTotalName("nbElements");
|
523 |
modelTypePersonnesAPublication.setTotalName("nbElements");
|
Line 784... |
Line 765... |
784 |
pagesChp.setToolTip("Fomat : NBRE ou NBRE-NBRE. ('NBRE' correspond à une suite de chiffres arabes ou romains ou à un point d'interrogation '?' dans le cas d'une donnée inconnue)");
|
765 |
pagesChp.setToolTip("Fomat : NBRE ou NBRE-NBRE. ('NBRE' correspond à une suite de chiffres arabes ou romains ou à un point d'interrogation '?' dans le cas d'une donnée inconnue)");
|
785 |
editionFieldset.add(pagesChp, new FormData(100, 0));
|
766 |
editionFieldset.add(pagesChp, new FormData(100, 0));
|
786 |
}
|
767 |
}
|
Line 787... |
Line -... |
787 |
|
- |
|
788 |
|
768 |
|
- |
|
769 |
|
Line 789... |
Line 770... |
789 |
//-------------------------//
|
770 |
//+----------------------------------------------------------------------------------------------------------------+
|
790 |
// Méthodes privées //------------------------------------------------------------
|
771 |
// Méthodes privées
|
791 |
|
772 |
|
792 |
private void miseAJourAuteursInitialListe() {
|
773 |
private void miseAJourAuteursInitialListe() {
|
Line 911... |
Line 892... |
911 |
datePublicationChp.setValue(publication.getAnneeParution());
|
892 |
datePublicationChp.setValue(publication.getAnneeParution());
|
912 |
tomeChp.setValue(publication.getIndicationNvt());
|
893 |
tomeChp.setValue(publication.getIndicationNvt());
|
913 |
fasciculeChp.setValue(publication.getFascicule());
|
894 |
fasciculeChp.setValue(publication.getFascicule());
|
914 |
pagesChp.setValue(publication.getPages());
|
895 |
pagesChp.setValue(publication.getPages());
|
Line -... |
Line 896... |
- |
|
896 |
|
915 |
|
897 |
// Éditeur est soit une référence à une structure de la base soit une chaine
|
916 |
if (publication.getEditeur().matches("^[0-9]+$")) {
|
898 |
if (publication.getEditeur().matches("^[0-9]+$")) {
|
- |
|
899 |
//editeurCombobox.getCombo().setValue(editeurCombobox.getStore().findModel("cs_id_structure", publication.getEditeur()));
|
917 |
editeurCombobox.getCombo().setValue(editeurCombobox.getStore().findModel("cs_id_structure", publication.getEditeur()));
|
900 |
editeurCombobox.chargerValeurInitiale(publication.getEditeur(), "cs_id_structure");
|
918 |
} else {
|
901 |
} else {
|
919 |
editeurCombobox.getCombo().setRawValue(publication.getEditeur());
|
902 |
editeurCombobox.getCombo().setRawValue(publication.getEditeur());
|
920 |
}
|
903 |
}
|
Line 968... |
Line 951... |
968 |
|
951 |
|
969 |
private String construireIntituleEditeur() {
|
952 |
private String construireIntituleEditeur() {
|
970 |
String editeur = "";
|
953 |
String editeur = "";
|
971 |
if (editeurCombobox.getValeur() != null) {
|
954 |
if (editeurCombobox.getValeur() != null) {
|
972 |
Structure structure = new Structure(editeurCombobox.getValeur());
|
- |
|
973 |
if (structure == null) editeur = editeurCombobox.getCombo().getRawValue();
|
955 |
Structure structure = new Structure(editeurCombobox.getValeur());
|
974 |
else editeur = structure.getNom();
|
956 |
editeur = structure.getNom();
|
975 |
} else if (!UtilString.isEmpty(editeurCombobox.getCombo().getRawValue())) {
|
957 |
} else if (!UtilString.isEmpty(editeurCombobox.getCombo().getRawValue())) {
|
976 |
editeur = editeurCombobox.getCombo().getRawValue();
|
958 |
editeur = editeurCombobox.getCombo().getRawValue();
|
977 |
}
|
959 |
}
|
978 |
return editeur;
|
960 |
return editeur;
|
Line 1043... |
Line 1025... |
1043 |
} else {
|
1025 |
} else {
|
1044 |
mediateur.afficherFormPublication(null);
|
1026 |
mediateur.afficherFormPublication(null);
|
1045 |
}
|
1027 |
}
|
1046 |
}
|
1028 |
}
|
Line 1047... |
Line -... |
1047 |
|
- |
|
1048 |
//---------------------------//
|
1029 |
|
- |
|
1030 |
//+----------------------------------------------------------------------------------------------------------------+
|
Line 1049... |
Line 1031... |
1049 |
// Méthodes publiques //------------------------------------------------------------
|
1031 |
// Méthodes publiques
|
1050 |
|
1032 |
|
1051 |
public boolean verifierFormulaire() {
|
1033 |
public boolean verifierFormulaire() {
|
Line 1090... |
Line 1072... |
1090 |
}
|
1072 |
}
|
1091 |
return valide;
|
1073 |
return valide;
|
1092 |
}
|
1074 |
}
|
Line 1093... |
Line -... |
1093 |
|
- |
|
1094 |
|
1075 |
|
- |
|
1076 |
|
Line 1095... |
Line 1077... |
1095 |
//-------------------//
|
1077 |
//+----------------------------------------------------------------------------------------------------------------+
|
1096 |
// Accesseurs //------------------------------------------------------------
|
1078 |
// Accesseurs
|
1097 |
|
1079 |
|
1098 |
private String getValeurComboProjets() {
|
1080 |
private String getValeurComboProjets() {
|
Line 1116... |
Line 1098... |
1116 |
} else {
|
1098 |
} else {
|
1117 |
projetsCombo.getCombo().setValue(null);
|
1099 |
projetsCombo.getCombo().setValue(null);
|
1118 |
}
|
1100 |
}
|
1119 |
}
|
1101 |
}
|
Line 1120... |
Line -... |
1120 |
|
- |
|
1121 |
//-------------------//
|
1102 |
|
- |
|
1103 |
//+----------------------------------------------------------------------------------------------------------------+
|
Line 1122... |
Line 1104... |
1122 |
// Rafraichir //------------------------------------------------------------
|
1104 |
// Rafraichir
|
1123 |
|
1105 |
|
1124 |
public void rafraichir(Object nouvellesDonnees) {
|
1106 |
public void rafraichir(Object nouvellesDonnees) {
|
1125 |
if (nouvellesDonnees instanceof Publication) {
|
1107 |
if (nouvellesDonnees instanceof Publication) {
|
Line 1138... |
Line 1120... |
1138 |
miseAJourAuteursInitialListe();
|
1120 |
miseAJourAuteursInitialListe();
|
1139 |
initialiserAuteurs();
|
1121 |
initialiserAuteurs();
|
1140 |
repandreRafraichissement();
|
1122 |
repandreRafraichissement();
|
1141 |
controlerFermeture();
|
1123 |
controlerFermeture();
|
1142 |
} else if (type.equals("chargement_modifier_ok")) {
|
1124 |
} else if (type.equals("chargement_modifier_ok")) {
|
- |
|
1125 |
Debug.log("Chargement 1");
|
1143 |
peuplerFormulaire();
|
1126 |
peuplerFormulaire();
|
1144 |
genererTitreFormulaire();
|
1127 |
genererTitreFormulaire();
|
1145 |
}
|
1128 |
}
|
Line 1146... |
Line 1129... |
1146 |
|
1129 |
|