Line 3... |
Line 3... |
3 |
import java.util.ArrayList;
|
3 |
import java.util.ArrayList;
|
Line 4... |
Line 4... |
4 |
|
4 |
|
5 |
import org.tela_botanica.client.ComposantClass;
|
5 |
import org.tela_botanica.client.ComposantClass;
|
6 |
import org.tela_botanica.client.Mediateur;
|
6 |
import org.tela_botanica.client.Mediateur;
|
- |
|
7 |
import org.tela_botanica.client.composants.ChampComboBoxListeValeurs;
|
7 |
import org.tela_botanica.client.composants.ChampComboBoxListeValeurs;
|
8 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
- |
|
9 |
import org.tela_botanica.client.composants.InfoLogger;
|
8 |
import org.tela_botanica.client.composants.InfoLogger;
|
10 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
10 |
import org.tela_botanica.client.modeles.Information;
|
12 |
import org.tela_botanica.client.modeles.Information;
|
- |
|
13 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
11 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
14 |
import org.tela_botanica.client.modeles.Valeur;
|
12 |
import org.tela_botanica.client.modeles.projet.Projet;
|
15 |
import org.tela_botanica.client.modeles.projet.Projet;
|
13 |
import org.tela_botanica.client.util.Debug;
|
16 |
import org.tela_botanica.client.util.Debug;
|
14 |
import org.tela_botanica.client.util.Pattern;
|
17 |
import org.tela_botanica.client.util.Pattern;
|
15 |
import org.tela_botanica.client.util.UtilArray;
|
18 |
import org.tela_botanica.client.util.UtilArray;
|
16 |
import org.tela_botanica.client.util.UtilString;
|
19 |
import org.tela_botanica.client.util.UtilString;
|
Line 17... |
Line 20... |
17 |
import org.tela_botanica.client.vues.Formulaire;
|
20 |
import org.tela_botanica.client.vues.Formulaire;
|
- |
|
21 |
|
- |
|
22 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
18 |
|
23 |
import com.extjs.gxt.ui.client.data.ModelData;
|
19 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
24 |
import com.extjs.gxt.ui.client.data.ModelType;
|
20 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
25 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
21 |
import com.extjs.gxt.ui.client.event.Events;
|
26 |
import com.extjs.gxt.ui.client.event.Events;
|
22 |
import com.extjs.gxt.ui.client.event.Listener;
|
27 |
import com.extjs.gxt.ui.client.event.Listener;
|
Line 47... |
Line 52... |
47 |
|
52 |
|
48 |
private FieldSet complementFieldset = null;
|
53 |
private FieldSet complementFieldset = null;
|
49 |
private TextField<String> motsClesChp = null;
|
54 |
private TextField<String> motsClesChp = null;
|
50 |
private TextField<String> citationChp = null;
|
55 |
private TextField<String> citationChp = null;
|
51 |
private TextField<String> licenceChp = null;
|
56 |
private TextField<String> licenceChp = null;
|
52 |
private ChampComboBoxListeValeurs langueChp = null;
|
57 |
private ChampComboBoxRechercheTempsReelPaginable langueChp = null;
|
Line 53... |
Line 58... |
53 |
private CheckBox markPublicChp = null;
|
58 |
private CheckBox markPublicChp = null;
|
54 |
|
59 |
|
55 |
private FieldSet indexationFieldset = null;
|
60 |
private FieldSet indexationFieldset = null;
|
Line 170... |
Line 175... |
170 |
|
175 |
|
171 |
licenceChp = new TextField<String>();
|
176 |
licenceChp = new TextField<String>();
|
172 |
licenceChp.setFieldLabel(i18nC.projetLicence());
|
177 |
licenceChp.setFieldLabel(i18nC.projetLicence());
|
Line -... |
Line 178... |
- |
|
178 |
complementFieldset.add(licenceChp, new FormData(450, 0));
|
- |
|
179 |
|
- |
|
180 |
ModelType modelTypesLangues = new ModelType();
|
- |
|
181 |
modelTypesLangues.setRoot("valeurs");
|
- |
|
182 |
modelTypesLangues.setTotalName("nbElements");
|
- |
|
183 |
modelTypesLangues.addField("cmlv_nom");
|
- |
|
184 |
modelTypesLangues.addField("cmlv_id_valeur");
|
- |
|
185 |
modelTypesLangues.addField("cmlv_abreviation");
|
- |
|
186 |
modelTypesLangues.addField("cmlv_description");
|
- |
|
187 |
|
- |
|
188 |
String displayNameLangues = "cmlv_nom";
|
- |
|
189 |
String nomListeTypes = "langues";
|
173 |
complementFieldset.add(licenceChp, new FormData(450, 0));
|
190 |
ProxyValeur<ModelData> proxyLangues = new ProxyValeur<ModelData>(nomListeTypes);
|
- |
|
191 |
|
- |
|
192 |
langueChp = new ChampComboBoxRechercheTempsReelPaginable(proxyLangues, modelTypesLangues, displayNameLangues);
|
- |
|
193 |
langueChp.setWidth(100,300);
|
- |
|
194 |
langueChp.getCombo().setTabIndex(tabIndex++);
|
- |
|
195 |
langueChp.getCombo().setFieldLabel(i18nC.projetLangue());
|
174 |
|
196 |
langueChp.getCombo().setForceSelection(true);
|
Line 175... |
Line 197... |
175 |
langueChp = new ChampComboBoxListeValeurs(i18nC.projetLangue(), listeLanguesId);
|
197 |
|
176 |
complementFieldset.add(langueChp, new FormData(200, 0));
|
198 |
complementFieldset.add(langueChp, new FormData(300, 0));
|
177 |
|
199 |
|
178 |
markPublicChp = new CheckBox();
|
200 |
markPublicChp = new CheckBox();
|
Line 389... |
Line 411... |
389 |
urlChp.setValue(projet.getUrl());
|
411 |
urlChp.setValue(projet.getUrl());
|
Line 390... |
Line 412... |
390 |
|
412 |
|
391 |
motsClesChp.setValue(projet.getMotsCles());
|
413 |
motsClesChp.setValue(projet.getMotsCles());
|
392 |
citationChp.setValue(projet.getCitation());
|
414 |
citationChp.setValue(projet.getCitation());
|
- |
|
415 |
licenceChp.setValue(projet.getLicence());
|
- |
|
416 |
if (projet.getLangue().matches("[0-9]+")) {
|
- |
|
417 |
langueChp.getCombo().setValue(langueChp.getStore().findModel("cmlv_id_valeur", projet.getLangue()));
|
393 |
licenceChp.setValue(projet.getLicence());
|
418 |
} else {
|
- |
|
419 |
langueChp.getCombo().setRawValue(projet.getLangue());
|
394 |
langueChp.peupler(projet.getLangue());
|
420 |
}
|
395 |
if (projet.getMarkPublic().equals("1")) {
|
421 |
if (projet.getMarkPublic().equals("1")) {
|
396 |
markPublicChp.setValue(true);
|
422 |
markPublicChp.setValue(true);
|
397 |
String[] heureTab = projet.getIndexationHeure().split(":");
|
423 |
String[] heureTab = projet.getIndexationHeure().split(":");
|
398 |
if (heureTab.length > 1) {
|
424 |
if (heureTab.length > 1) {
|
Line 420... |
Line 446... |
420 |
projetCollecte.setUrl(urlChp.getValue());
|
446 |
projetCollecte.setUrl(urlChp.getValue());
|
Line 421... |
Line 447... |
421 |
|
447 |
|
422 |
projetCollecte.setMotsCles(motsClesChp.getValue());
|
448 |
projetCollecte.setMotsCles(motsClesChp.getValue());
|
423 |
projetCollecte.setCitation(citationChp.getValue());
|
449 |
projetCollecte.setCitation(citationChp.getValue());
|
- |
|
450 |
projetCollecte.setLicence(licenceChp.getValue());
|
- |
|
451 |
if (langueChp.getValeur() != null) {
|
- |
|
452 |
Debug.log("langueChp.getValeur()="+langueChp.getValeur());
|
424 |
projetCollecte.setLicence(licenceChp.getValue());
|
453 |
Valeur valeur = new Valeur(langueChp.getValeur());
|
- |
|
454 |
projetCollecte.setLangue(valeur.getId());
|
- |
|
455 |
} else {
|
- |
|
456 |
projetCollecte.setLangue("");
|
425 |
projetCollecte.setLangue(langueChp.getValeur());
|
457 |
}
|
426 |
String markPublic = (markPublicChp.getValue()) ? "1" : "0";
|
458 |
String markPublic = (markPublicChp.getValue()) ? "1" : "0";
|
Line 427... |
Line 459... |
427 |
projetCollecte.setMarkPublic(markPublic);
|
459 |
projetCollecte.setMarkPublic(markPublic);
|
428 |
|
460 |
|