| Line 22... |
Line 22... |
| 22 |
|
22 |
|
| 23 |
private ContentPanel panneauPrincipal = null;
|
23 |
private ContentPanel panneauPrincipal = null;
|
| 24 |
private Html entete = null;
|
24 |
private Html entete = null;
|
| Line -... |
Line 25... |
| - |
|
25 |
private Html contenu = null;
|
| - |
|
26 |
|
| - |
|
27 |
private final String listeValeurIndexationDureeId = "dureesIndexation";
|
| - |
|
28 |
private final int listeValeurIndexationDureeInt = 1072;
|
| - |
|
29 |
private final String listeValeurIndexationFrequenceId = "frequencesIndexation";
|
| - |
|
30 |
private final int listeValeurIndexationFrequenceInt = 1073;
|
| - |
|
31 |
private final String listeLanguesId = "langues";
|
| 25 |
private Html contenu = null;
|
32 |
private final int listeLanguesInt = 1071;
|
| 26 |
|
33 |
|
| 27 |
private Projet projet = null;
|
- |
|
| 28 |
private boolean projetChargementOk = false;
|
- |
|
| 29 |
|
- |
|
| 30 |
private String listeValeurIndexationDureeId = "dureesIndexation";
|
- |
|
| 31 |
private int listeValeurIndexationDureeInt = 1072;
|
- |
|
| 32 |
private String listeValeurIndexationFrequenceId = "frequencesIndexation";
|
- |
|
| 33 |
private int listeValeurIndexationFrequenceInt = 1073;
|
- |
|
| 34 |
private String listeLanguesId = "langues";
|
- |
|
| 35 |
private int listeLanguesInt = 1071;
|
34 |
private Projet projet = null;
|
| 36 |
|
- |
|
| 37 |
private ValeurListe valeurListeIndexationDuree = null;
|
- |
|
| 38 |
private ValeurListe valeurListeIndexationFrequence = null;
|
- |
|
| 39 |
private ValeurListe valeurListeLangue = null;
|
35 |
private boolean projetChargementOk = false;
|
| - |
|
36 |
private ValeurListe valeurListeIndexationDuree = null;
|
| 40 |
|
37 |
private boolean listeIndexationDureeChargee = false;
|
| - |
|
38 |
private ValeurListe valeurListeIndexationFrequence = null;
|
| 41 |
private boolean listeIndexationDureeChargee = false;
|
39 |
private boolean listeIndexationFrequenceChargee = false;
|
| Line 42... |
Line 40... |
| 42 |
private boolean listeIndexationFrequenceChargee = false;
|
40 |
private ValeurListe valeurListeLangue = null;
|
| 43 |
private boolean listeLangueChargee = false;
|
41 |
private boolean listeLangueChargee = false;
|
| Line 81... |
Line 79... |
| 81 |
|
79 |
|
| 82 |
private void initialiserGeneralTpl() {
|
80 |
private void initialiserGeneralTpl() {
|
| 83 |
contenuTpl =
|
81 |
contenuTpl =
|
| 84 |
"<div class='{css_corps}'>"+
|
82 |
"<div class='{css_corps}'>"+
|
| 85 |
" <div class='{css_fieldset}'>"+
|
83 |
" <div class='{css_fieldset}'>"+
|
| 86 |
" <h2>{i18n_titre_detail}</h2>"+
|
84 |
" <h2>{i18n_titre_info_generale}</h2>"+
|
| 87 |
" <span class='{css_label}'>{i18n_nom} :</span> {nom}<br />"+
|
85 |
" <span class='{css_label}'>{i18n_nom} :</span> {nom}<br />"+
|
| 88 |
" <span class='{css_label}'>{i18n_abreviation} :</span> {abreviation}<br />"+
|
86 |
" <span class='{css_label}'>{i18n_abreviation} :</span> {abreviation}<br />"+
|
| 89 |
" <span class='{css_label}'>{i18n_resume} :</span> {resume}<br />"+
|
87 |
" <span class='{css_label}'>{i18n_resume} :</span> {resume}<br />"+
|
| - |
|
88 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
| - |
|
89 |
" </div>"+
|
| - |
|
90 |
" <div class='{css_fieldset}'>"+
|
| - |
|
91 |
" <h2>{i18n_titre_complement}</h2>"+
|
| 90 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
92 |
" <span class='{css_label}'>{i18n_mot_cles} :</span> {mot_cles}<br />"+
|
| 91 |
" <span class='{css_label}'>{i18n_citation} :</span> {citation}<br />"+
|
93 |
" <span class='{css_label}'>{i18n_citation} :</span> {citation}<br />"+
|
| 92 |
" <span class='{css_label}'>{i18n_licence} :</span> {licence}<br />"+
|
94 |
" <span class='{css_label}'>{i18n_licence} :</span> {licence}<br />"+
|
| - |
|
95 |
" <span class='{css_label}'>{i18n_langue} :</span> {langue}<br />"+
|
| - |
|
96 |
" </div>"+
|
| - |
|
97 |
" <hr class='{css_clear}'/>"+
|
| - |
|
98 |
" <div class='{css_fieldset}'>"+
|
| 93 |
" <span class='{css_label}'>{i18n_langue} :</span> {langue}<br />"+
|
99 |
" <h2>{i18n_titre_indexation}</h2>"+
|
| 94 |
" <span class='{css_label}'>{i18n_indexation_heure} :</span> {indexation_heure}<br />"+
|
100 |
" <span class='{css_label}'>{i18n_indexation_heure} :</span> {indexation_heure}<br />"+
|
| 95 |
" <span class='{css_label}'>{i18n_indexation_duree} :</span> {indexation_duree}<br />"+
|
101 |
" <span class='{css_label}'>{i18n_indexation_duree} :</span> {indexation_duree}<br />"+
|
| 96 |
" <span class='{css_label}'>{i18n_indexation_frequence} :</span> {indexation_frequence}<br />"+
|
102 |
" <span class='{css_label}'>{i18n_indexation_frequence} :</span> {indexation_frequence}<br />"+
|
| 97 |
" <span class='{css_label}'>{i18n_mark_public} :</span> {mark_public}<br />"+
|
103 |
" <span class='{css_label}'>{i18n_mark_public} :</span> {mark_public}<br />"+
|
| 98 |
" </div>"+
|
- |
|
| 99 |
" <hr class='{css_clear}'/>"+
|
104 |
" </div>"+
|
| 100 |
"</div>";
|
105 |
"</div>";
|
| Line 101... |
Line 106... |
| 101 |
}
|
106 |
}
|
| 102 |
|
107 |
|
| Line 132... |
Line 137... |
| 132 |
}
|
137 |
}
|
| Line 133... |
Line 138... |
| 133 |
|
138 |
|
| 134 |
public void afficherDetailProjet() {
|
139 |
public void afficherDetailProjet() {
|
| Line 135... |
Line 140... |
| 135 |
Params contenuParams = new Params();
|
140 |
Params contenuParams = new Params();
|
| Line 136... |
Line 141... |
| 136 |
|
141 |
|
| 137 |
contenuParams.set("i18n_titre_detail", i18nC.projet());
|
142 |
contenuParams.set("i18n_titre_info_generale", i18nC.projetTitreInfoGenerale());
|
| Line 138... |
Line 143... |
| 138 |
|
143 |
|
| Line 146... |
Line 151... |
| 146 |
contenuParams.set("resume", projet.getResume());
|
151 |
contenuParams.set("resume", projet.getResume());
|
| Line 147... |
Line 152... |
| 147 |
|
152 |
|
| 148 |
contenuParams.set("i18n_description", i18nC.projetDescription());
|
153 |
contenuParams.set("i18n_description", i18nC.projetDescription());
|
| Line -... |
Line 154... |
| - |
|
154 |
contenuParams.set("description", projet.getDescription());
|
| - |
|
155 |
|
| 149 |
contenuParams.set("description", projet.getDescription());
|
156 |
contenuParams.set("i18n_titre_complement", i18nC.projetTitreComplement());
|
| 150 |
|
157 |
|
| Line 151... |
Line 158... |
| 151 |
contenuParams.set("i18n_mots_cles", i18nC.projetMotsCles());
|
158 |
contenuParams.set("i18n_mot_cles", i18nC.projetMotsCles());
|
| 152 |
contenuParams.set("mots_cles", projet.getMotsCles());
|
159 |
contenuParams.set("mot_cles", projet.getMotsCles());
|
| Line 153... |
Line 160... |
| 153 |
|
160 |
|
| 154 |
contenuParams.set("i18n_citation", i18nC.projetCitation());
|
161 |
contenuParams.set("i18n_citation", i18nC.projetCitation());
|
| Line 155... |
Line 162... |
| 155 |
contenuParams.set("citation", projet.getCitation());
|
162 |
contenuParams.set("citation", projet.getCitation());
|
| 156 |
|
163 |
|
| Line -... |
Line 164... |
| - |
|
164 |
contenuParams.set("i18n_licence", i18nC.projetLicence());
|
| - |
|
165 |
contenuParams.set("licence", projet.getLicence());
|
| 157 |
contenuParams.set("i18n_licence", i18nC.projetLicence());
|
166 |
|
| 158 |
contenuParams.set("licence", projet.getLicence());
|
167 |
contenuParams.set("i18n_langue", i18nC.projetLangue());
|
| Line 159... |
Line 168... |
| 159 |
|
168 |
contenuParams.set("langue", obtenirValeurLangue(projet.getLangue()));
|
| 160 |
contenuParams.set("i18n_langue", i18nC.projetLangue());
|
169 |
|
| Line 175... |
Line 184... |
| 175 |
String gHtml = formaterContenu(contenuTpl, contenuParams);
|
184 |
String gHtml = formaterContenu(contenuTpl, contenuParams);
|
| 176 |
contenu.getElement().setInnerHTML(gHtml);
|
185 |
contenu.getElement().setInnerHTML(gHtml);
|
| 177 |
}
|
186 |
}
|
| Line 178... |
Line 187... |
| 178 |
|
187 |
|
| 179 |
public void rafraichir(Object nouvellesDonnees) {
|
- |
|
| 180 |
|
188 |
public void rafraichir(Object nouvellesDonnees) {
|
| 181 |
if (nouvellesDonnees instanceof Projet) {
|
189 |
if (nouvellesDonnees instanceof Projet) {
|
| 182 |
projet = (Projet) nouvellesDonnees;
|
190 |
projet = (Projet) nouvellesDonnees;
|
| 183 |
projetChargementOk = true;
|
191 |
projetChargementOk = true;
|
| 184 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
192 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
| 185 |
projets = (ProjetListe) nouvellesDonnees;
|
193 |
projets = (ProjetListe) nouvellesDonnees;
|
| 186 |
projetsChargementOk = true;
|
- |
|
| 187 |
GWT.log("projets recu", null);
|
194 |
projetsChargementOk = true;
|
| 188 |
} else if(nouvellesDonnees instanceof ValeurListe) {
|
195 |
} else if(nouvellesDonnees instanceof ValeurListe) {
|
| Line 189... |
Line 196... |
| 189 |
ValeurListe nValeurListe = (ValeurListe)nouvellesDonnees;
|
196 |
ValeurListe nValeurListe = (ValeurListe)nouvellesDonnees;
|
| 190 |
|
197 |
|
| Line 200... |
Line 207... |
| 200 |
|
207 |
|
| 201 |
if (nValeurListe.getId() == listeLanguesInt) {
|
208 |
if (nValeurListe.getId() == listeLanguesInt) {
|
| 202 |
valeurListeLangue = (ValeurListe)nouvellesDonnees;
|
209 |
valeurListeLangue = (ValeurListe)nouvellesDonnees;
|
| 203 |
listeLangueChargee = true;
|
210 |
listeLangueChargee = true;
|
| 204 |
}
|
- |
|
| 205 |
|
- |
|
| 206 |
GWT.log("une liste de valeurs est arrivée "+nValeurListe.getId(), null);
|
- |
|
| 207 |
}
|
- |
|
| 208 |
|
211 |
}
|
| 209 |
else {
|
212 |
} else {
|
| 210 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
213 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| Line 211... |
Line 214... |
| 211 |
}
|
214 |
}
|
| 212 |
|
215 |
|
| 213 |
if (avoirDonneesChargees()) {
|
216 |
if (avoirDonneesChargees()) {
|
| 214 |
afficherDetail();
|
217 |
afficherDetail();
|
| Line 215... |
Line 218... |
| 215 |
}
|
218 |
}
|
| 216 |
}
|
219 |
}
|
| 217 |
|
220 |
|
| 218 |
private boolean avoirDonneesChargees() {
|
221 |
private boolean avoirDonneesChargees() {
|
| 219 |
boolean ok = false;
|
222 |
boolean ok = false;
|
| 220 |
if (projetsChargementOk && projetChargementOk && listeIndexationDureeChargee && listeLangueChargee && listeLangueChargee) {
|
223 |
if (projetsChargementOk && projetChargementOk && listeIndexationDureeChargee && listeIndexationFrequenceChargee && listeLangueChargee) {
|
| 221 |
ok = true;
|
224 |
ok = true;
|