/trunk/src/org/tela_botanica/client/vues/MenuHorizontalVue.java |
---|
27,7 → 27,6 |
private Constantes i18nC = null; |
private TabPanel tbp = null; |
private boolean repandreSelection = true; |
public MenuHorizontalVue(Mediateur mediateurCourant) { |
100,7 → 99,6 |
int nbTab = tbp.getItemCount(); |
for(int i = 0; i < nbTab; i++) { |
if(tbp.getItem(i).getId().equals(codeMenuClique)) { |
repandreSelection = false; |
tbp.setSelection(tbp.getItem(i)); |
} |
} |
/trunk/src/org/tela_botanica/client/vues/personne/PersonneFormPublication.java |
---|
135,15 → 135,15 |
private ToolBar creerBarreOutilsGrille() { |
ToolBar barreOutils = new ToolBar(); |
publicationsSaisiesComboBox = creerComboBoxPublicationsSaisis(); |
barreOutils.add(publicationsSaisiesComboBox); |
barreOutils.add(new Text(" ou ")); |
Button ajouterBouton = creerBoutonAjouter(); |
barreOutils.add(ajouterBouton); |
barreOutils.add(new Text(" ")); |
publicationsSaisiesComboBox = creerComboBoxPublicationsSaisis(); |
barreOutils.add(publicationsSaisiesComboBox); |
barreOutils.add(new SeparatorToolItem()); |
publicationsBoutonModifier = creerBoutonModifier(); |
319,6 → 319,8 |
} |
}); |
publicationsCombo.getCombo().setEmptyText("Rechercher et sélectionner une publication existante dans la base"); |
publicationsCombo.getCombo().addListener(Events.Select, new Listener<BaseEvent>() { |
public void handleEvent(BaseEvent be) { |
if (publicationsSaisiesComboBox.getValeur() instanceof ModelData) { |
/trunk/src/org/tela_botanica/client/vues/personne/PersonneDetailVue.java |
---|
47,8 → 47,6 |
private TabItem tabLogos; |
private TabItem tabPublications; |
private HashMap hmLabelFieldRegion = new HashMap(); |
private Configuration config = (Configuration) Registry.get(RegistreId.CONFIG); |
private Personne personneAAfficher = null; |
226,10 → 224,8 |
+ " <div class='{css_fieldset}'>" |
+ " <h2>Adresse personnelle:</h2>" |
+ " <b>Adresse:</b> {adresse01} <br />" |
+ " <b>Complément d'adresse: </b>{adresse02} <br />" |
+ " <b>Boite postale: </b>{boitePostale}<br />" |
+ " <b>Code postal:</b>{codePostal} <br />" |
+ " <b>Région:</b>{region}<br />" |
+ " <b>Pays :</b><span style='uppercase'>{pays}</span><br />" |
+ "</div>"; |
// Adresses : |
236,8 → 232,6 |
Params paramAdresseTpl = new Params(); |
paramAdresseTpl.set("adresse01", (String) personne |
.obtenirValeurChamp("adresse_01")); |
paramAdresseTpl.set("adresse02", (String) personne |
.obtenirValeurChamp("adresse_02")); |
paramAdresseTpl.set("boitePostale", (String) personne |
.obtenirValeurChamp("bp")); |
paramAdresseTpl.set("codePostal", (String) personne |
244,8 → 238,6 |
.obtenirValeurChamp("code_postal")); |
paramAdresseTpl.set("ville", (String) personne |
.obtenirValeurChamp("ville")); |
paramAdresseTpl.set("region", (String) personne |
.obtenirValeurChamp("ce_truk_region")); |
paramAdresseTpl.set("pays", construireTxtListeOntologie((String) personne |
.obtenirValeurChamp("ce_truk_pays"))); |
274,7 → 266,6 |
afficherOnglet(tplInfosNat, prmInfosNat, tabInfosNat); |
tabAdresse.setStyleAttribute("padding", "15px"); |
changerLabelRegions(); |
layout(); |
} |
} |
313,35 → 304,7 |
+ " <h2>Description:</h2>" |
+ " {description}<br />" + " </div>" + "<br />"; |
} |
private void changerLabelRegions() { |
Collection<String> colClesComposants = hmLabelFieldRegion.keySet(); |
Iterator<String> itComposants = colClesComposants.iterator(); |
while (itComposants.hasNext()) { |
String region = itComposants.next(); |
mediateur.obtenirValeurEtRafraichir(this, "region", region, sequenceur); |
} |
} |
private void ajouterLabelField(FieldSet fs, String tfLabel, Object tfValue) { |
if ((tfValue != null) && (!tfValue.toString().trim().equals(""))) { |
LabelField tf = new LabelField(); |
tf.setFieldLabel(tfLabel + ":"); |
if ((tfLabel == null) || ("".equals(tfLabel))) { |
tf.setHideLabel(true); |
tf.setStyleAttribute("margin", "0 0 0 105px"); |
} |
tf.setValue(tfValue); |
// Ajout au fieldSet |
fs.add(tf); |
} |
} |
private void initialiserTableauPublicationsLieesTpl() { |
tableauPublicationsLieesTpl = |
/trunk/src/org/tela_botanica/client/vues/personne/PersonneForm.java |
---|
542,12 → 542,6 |
left.add(tfAdresse1, fd100); |
hmAdresse.put("tfAdresse1", tfAdresse1); |
TextField<String> tfAdresse2 = new TextField(); |
tfAdresse2.setFieldLabel("Complément d'adresse"); |
tfAdresse2.setName("adresse_02"); |
left.add(tfAdresse2, fd100); |
hmAdresse.put("tfAdresse2", tfAdresse2); |
ComboBox<Valeur> cbPays = new ComboBox<Valeur>(); |
cbPays.setFieldLabel("Pays"); |
cbPays.setDisplayField("nom"); |
559,30 → 553,6 |
right.add(cbPays, fd100); |
hmAdresse.put("cbPays", cbPays); |
SelectionChangedListener<Valeur> selectionChange = new SelectionChangedListener<Valeur>() { |
public void selectionChanged(SelectionChangedEvent se) { |
// Rafraichir avec le pays sélectionné |
obtenirListeRegionParPays(((Valeur) se.getSelectedItem()).getAbreviation().toString()); |
//mettreAJourRegion(); |
} |
}; |
cbPays.addSelectionChangedListener(selectionChange); |
ComboBox<Valeur> cbRegion = new ComboBox<Valeur>(); |
cbRegion.setFieldLabel("Region"); |
cbRegion.setDisplayField("nom"); |
cbRegion.setEmptyText("Sélectionnez la région:"); |
cbRegion.setVisible(false); |
ListStore<Valeur> storeRegion = new ListStore<Valeur>(); |
cbRegion.setStore(storeRegion); |
right.add(cbRegion, fd100); |
hmAdresse.put("cbRegion", cbRegion); |
TextField<String> tfBoitePostale = new TextField<String>(); |
tfBoitePostale.setFieldLabel("Boite postale"); |
tfBoitePostale.setName("bp"); |
766,10 → 736,6 |
barreOutils.add(annuler); |
} |
public void obtenirListeRegionParPays(String strPays) { |
mediateur.obtenirListeRegionsEtRafraichir(this, "region", strPays); |
} |
// RAFRAICHISSEMENT DU PANNEAU |
public void rafraichir(Object nouvellesDonnees) { |
817,11 → 783,6 |
cbTelephone.setValue(liste.get(1)); |
} else if (listeValeurs.getId().equals(config.getListeId("pays"))) { |
remplirCombobox("cbPays", liste, "hmAdresse"); |
} else if (listeValeurs.getId().equals(config.getListeId("region"))) { |
remplirCombobox("cbRegion", liste, "hmAdresse"); |
mettreAJourRegion(); |
hmAdresse.getComboBox("cbRegion").setVisible(true); |
} |
} else if (nouvellesDonnees instanceof PublicationListe) { |
PublicationListe publicationListe = (PublicationListe) nouvellesDonnees; |
944,19 → 905,6 |
} |
} |
private void mettreAJourRegion() { |
//Met à jour la combo box en sélectionnant la valeur enregistrée pour la personne |
ComboBox<Valeur> cbRegion = hmAdresse.getComboBoxValeur("cbRegion"); |
if (personneSelectionnee.get("ce_truk_region")!=null && personneSelectionnee.get("ce_truk_region").toString().startsWith("AUTRE##")) { |
cbRegion.setRawValue(personneSelectionnee.get("ce_truk_region").toString().replaceFirst("^AUTRE##", "")); |
} else if (personneSelectionnee.get("ce_truk_region") != null && cbRegion.getStore().getCount() > 0) { |
Valeur valeurRegion = cbRegion.getStore().findModel("id_valeur", personneSelectionnee.get("ce_truk_region")); |
if (valeurRegion!=null) { |
cbRegion.setValue(valeurRegion); |
} |
} |
} |
private void mettreAJourPersonne(Personne personne) { |
//Mise à jour de la personne |
1029,9 → 977,6 |
// Adresse |
hmAdresse.getTextField("tfAdresse1").setValue((String) personne.get("adresse_01")); |
// Complément |
hmAdresse.getTextField("tfAdresse2").setValue((String) personne.get("adresse_02")); |
//Boite postale |
hmAdresse.getTextField("tfBoitePostale").setValue((String) personne.get("bp")); |
1048,20 → 993,6 |
cbPays.setRawValue(strPays); |
} |
//Région : doit être chargé après chargement de la liste des régions... |
String strRegion = personne.get("ce_truk_region"); |
if ((strRegion!=null)&&(!strRegion.equals(""))) { |
ComboBox<Valeur> cbRegion = hmAdresse.getComboBoxValeur("cbRegion"); |
cbRegion.setVisible(true); |
if (cbRegion.getStore().findModel("id_valeur", strRegion) != null) { |
cbRegion.setValue(cbRegion.getStore().findModel("id_valeur", strRegion)); |
} else { |
cbRegion.setRawValue(strRegion); |
} |
} |
//Cp |
hmAdresse.getTextField("tfCodePostal").setValue(personne.get("code_postal")); |
1229,14 → 1160,6 |
strValeur = obtenirValeurCombo("cbPays"); |
personneSelectionnee.set("ce_truk_pays", strValeur); |
strValeur = obtenirValeurCombo("cbRegion"); |
ComboBox<Valeur> cbRegions = hmAdresse.getComboBoxValeur("cbRegion"); |
if (cbRegions.getStore().findModel("id_valeur", strValeur) == null) { |
strValeur = "AUTRE##" + strValeur; |
} |
personneSelectionnee.set("ce_truk_region", strValeur); |
success = hmIdentite.getChampMultiValeursMultiTypes("telephones").estValide(true); |
personneSelectionnee.set("truk_telephone", hmIdentite.getChampMultiValeursMultiTypes("telephones").getValeurs()); |
1332,11 → 1255,14 |
String valeurDateDeces = hmIdentite.getTextField("tfDateDeces").getRawValue(); |
String valeurDateNaissance = hmIdentite.getTextField("tfDateNaissance").getRawValue(); |
Date dateNaissance = parserDate(valeurDateNaissance); |
Date dateDeces = parserDate(valeurDateDeces); |
if(dateDeces.compareTo(dateNaissance) < 0) { |
lstMessageErreur.add("La date de décès ne peut pas précéder la date de naissance"); |
if(valeurDateDeces != null && valeurDateNaissance != null && |
!valeurDateDeces.isEmpty() && !valeurDateNaissance.isEmpty()) { |
Date dateNaissance = parserDate(valeurDateNaissance); |
Date dateDeces = parserDate(valeurDateDeces); |
if(dateDeces.compareTo(dateNaissance) < 0) { |
lstMessageErreur.add("La date de décès ne peut pas précéder la date de naissance"); |
} |
} |
} |
/** Date vide **/ |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionFormCommentaire.java |
---|
147,14 → 147,14 |
private ToolBar creerBarreOutilsGrille() { |
ToolBar barreOutils = new ToolBar(); |
commentairesSaisisComboBox = creerComboBoxCommentairesSaisies(); |
barreOutils.add(commentairesSaisisComboBox); |
barreOutils.add(new Text(" ou ")); |
Button ajouterPersonneBouton = creerBoutonAjouter(); |
barreOutils.add(ajouterPersonneBouton); |
barreOutils.add(new Text(" ou ")); |
commentairesSaisisComboBox = creerComboBoxCommentairesSaisies(); |
barreOutils.add(commentairesSaisisComboBox); |
barreOutils.add(new SeparatorToolItem()); |
commentairesBoutonModifier = creerBoutonModifier(); |
317,6 → 317,8 |
} |
}); |
commentairesCombo.getCombo().setEmptyText("Rechercher et sélectionner une note existante dans la base"); |
commentairesCombo.getCombo().addListener(Events.Select, new Listener<BaseEvent>() { |
public void handleEvent(BaseEvent be) { |
if (commentairesSaisisComboBox.getValeur() instanceof ModelData) { |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionFormPublication.java |
---|
115,15 → 115,15 |
private ToolBar creerBarreOutilsGrille() { |
ToolBar barreOutils = new ToolBar(); |
publicationsSaisiesComboBox = creerComboBoxPublicationsSaisis(); |
barreOutils.add(publicationsSaisiesComboBox); |
barreOutils.add(new Text(" ou ")); |
Button ajouterBouton = creerBoutonAjouter(); |
barreOutils.add(ajouterBouton); |
barreOutils.add(new Text(" ou ")); |
publicationsSaisiesComboBox = creerComboBoxPublicationsSaisis(); |
barreOutils.add(publicationsSaisiesComboBox); |
barreOutils.add(new SeparatorToolItem()); |
publicationsBoutonModifier = creerBoutonModifier(); |
296,6 → 296,8 |
} |
}); |
publicationsCombo.getCombo().setEmptyText("Rechercher et sélectionner une publication existante dans la base"); |
publicationsCombo.getCombo().addListener(Events.Select, new Listener<BaseEvent>() { |
public void handleEvent(BaseEvent be) { |
if (publicationsSaisiesComboBox.getValeur() instanceof ModelData) { |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionFormGeneral.java |
---|
49,7 → 49,6 |
private ChampComboBoxRechercheTempsReelPaginable collectionsCombo = null; |
private ChampCaseACocher periodeConstitutionChp = null; |
private ChampComboBoxListeValeurs groupementPrincipeCombo = null; |
private ChampMultiValeurs lieuCouvertureChp = null; |
private ChampComboBoxListeValeurs specimenTypeCombo = null; |
59,16 → 58,12 |
private ChampComboBoxListeValeurs typeDepotCombo = null; |
private TextField<String> coteChp = null; |
private ChampMultiValeurs idAlternatifsChp = null; |
private ChampMultiValeurs nomsAlternatifsChp = null; |
private ChampMultiValeurs codesAlternatifsChp = null; |
private TextArea descriptionSpecialisteChp = null; |
private TextArea descriptionChp = null; |
private TextArea historiqueChp = null; |
private ChampMultiValeurs urlsChp = null; |
private ChampComboBoxListeValeurs butRealisationCombo = null; |
private Sequenceur sequenceur = new Sequenceur(); |
194,9 → 189,6 |
coteChp.setFieldLabel(i18nC.cote()); |
administratifFieldSet.add(coteChp, new FormData(450, 0)); |
idAlternatifsChp = new ChampMultiValeurs(i18nC.idAlternatifCollection()); |
administratifFieldSet.add(idAlternatifsChp); |
nomsAlternatifsChp = new ChampMultiValeurs(i18nC.intituleAlternatifCollection()); |
administratifFieldSet.add(nomsAlternatifsChp); |
217,10 → 209,6 |
descriptionChp.setFieldLabel(i18nC.description()); |
descriptionFieldSet.add(descriptionChp, new FormData(550, 0)); |
descriptionSpecialisteChp = new TextArea(); |
descriptionSpecialisteChp.setFieldLabel(i18nC.descriptionSpecialiste()); |
descriptionFieldSet.add(descriptionSpecialisteChp, new FormData(550, 0)); |
historiqueChp = new TextArea(); |
historiqueChp.setFieldLabel(i18nC.historique()); |
descriptionFieldSet.add(historiqueChp, new FormData(550, 0)); |
240,13 → 228,6 |
periodeConstitutionChp = new ChampCaseACocher(i18nC.periodeConstitution(), "siecleNaturaliste", false); |
couvertureFieldSet.add(periodeConstitutionChp); |
groupementPrincipeCombo = new ChampComboBoxListeValeurs(i18nC.groupementPrincipeCollection(), "groupementPrincipe", tabIndex++); |
groupementPrincipeCombo.setToolTip(i18nC.groupementPrincipeCollectionInfo()); |
couvertureFieldSet.add(groupementPrincipeCombo); |
butRealisationCombo = new ChampComboBoxListeValeurs(i18nC.butCollection(), "realisationBut", tabIndex++); |
couvertureFieldSet.add(butRealisationCombo); |
lieuCouvertureChp = new ChampMultiValeurs(i18nC.lieuCouvertureCollection()); |
couvertureFieldSet.add(lieuCouvertureChp); |
293,18 → 274,14 |
typeDepotCombo.peupler(collection.getTypeDepot()); |
coteChp.setValue(collection.getCote()); |
idAlternatifsChp.peupler(collection.getIdAlternatif()); |
nomsAlternatifsChp.peupler(collection.getNomAlternatif()); |
codesAlternatifsChp.peupler(collection.getCode()); |
descriptionChp.setValue(collection.getDescription()); |
descriptionSpecialisteChp.setValue(collection.getDescriptionSpecialiste()); |
historiqueChp.setValue(collection.getHistorique()); |
urlsChp.peupler(collection.getUrls()); |
periodeConstitutionChp.peupler(collection.getPeriodeConstitution()); |
groupementPrincipeCombo.peupler(collection.getGroupementPrincipe()); |
butRealisationCombo.peupler(collection.getGroupementBut()); |
lieuCouvertureChp.peupler(collection.getCouvertureLieu()); |
specimenTypeCombo.peupler(collection.getSpecimenType()); |
329,18 → 306,14 |
collectionCollectee.setTypeDepot(typeDepotCombo.getValeur()); |
collectionCollectee.setCote(coteChp.getValue()); |
collectionCollectee.setIdAlternatif(idAlternatifsChp.getValeurs()); |
collectionCollectee.setNomAlternatif(nomsAlternatifsChp.getValeurs()); |
collectionCollectee.setCode(codesAlternatifsChp.getValeurs()); |
collectionCollectee.setDescription(descriptionChp.getValue()); |
collectionCollectee.setDescriptionSpecialiste(descriptionSpecialisteChp.getValue()); |
collectionCollectee.setHistorique(historiqueChp.getValue()); |
collectionCollectee.setUrls(urlsChp.getValeurs()); |
collectionCollectee.setPeriodeConstitution(periodeConstitutionChp.getValeur()); |
collectionCollectee.setGroupementPrincipe(groupementPrincipeCombo.getValeur()); |
collectionCollectee.setGroupementBut(butRealisationCombo.getValeur()); |
collectionCollectee.setCouvertureLieu(lieuCouvertureChp.getValeurs()); |
collectionCollectee.setSpecimenType(specimenTypeCombo.getValeur()); |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionDetailVue.java |
---|
176,7 → 176,6 |
" <span class='{css_label}'>{i18n_mere} :</span> {mere}<br />"+ |
" <span class='{css_label}'>{i18n_type_ncd} :</span> {type_ncd}<br />"+ |
" <span class='{css_label}'>{i18n_type_depot} :</span> {type_depot}<br />"+ |
" <span class='{css_label}'>{i18n_id_alternatif} :</span> {id_alternatif}<br />"+ |
" <span class='{css_label}'>{i18n_code} :</span> {code}<br />"+ |
" <span class='{css_label}'>{i18n_cote} :</span> {cote}<br />"+ |
" </div>"+ |
183,7 → 182,6 |
" <div class='{css_fieldset}'>"+ |
" <h2>{i18n_general_collection_titre}</h2>"+ |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+ |
" <span class='{css_label}'>{i18n_description_specialiste} :</span> {description_specialiste}<br />"+ |
" <span class='{css_label}'>{i18n_historique} :</span> {historique}<br />"+ |
" <span class='{css_label}'>{i18n_web} :</span> {web}<br />"+ |
" </div>"+ |
190,8 → 188,6 |
" <hr class='{css_clear}'/>"+ |
" <div class='{css_fieldset}'>"+ |
" <h2>{i18n_couverture_collection_titre}</h2>"+ |
" <span class='{css_label}'>{i18n_groupement_principe} :</span> {groupement_principe}<br />"+ |
" <span class='{css_label}'>{i18n_groupement_but} :</span> {groupement_but}<br />"+ |
" <span class='{css_label}'>{i18n_couverture_geo} :</span> {couverture_geo}<br />"+ |
" </div>"+ |
" <div class='{css_fieldset}'>"+ |
597,19 → 593,15 |
generalParams.set("i18n_mere", i18nC.collectionMere()); |
generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd()); |
generalParams.set("i18n_type_depot", i18nC.typeDepot()); |
generalParams.set("i18n_id_alternatif", i18nC.idAlternatifCollection()); |
generalParams.set("i18n_code", i18nC.codeAlternatifCollection()); |
generalParams.set("i18n_cote", i18nC.cote()); |
generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre()); |
generalParams.set("i18n_description", i18nC.description()); |
generalParams.set("i18n_description_specialiste", i18nC.descriptionSpecialiste()); |
generalParams.set("i18n_historique", i18nC.historique()); |
generalParams.set("i18n_web", i18nC.siteWeb()); |
generalParams.set("i18n_couverture_collection_titre", i18nC.collectionCouvertureTitre()); |
generalParams.set("i18n_groupement_principe", i18nC.groupementPrincipe()); |
generalParams.set("i18n_groupement_but", i18nC.groupementBut()); |
generalParams.set("i18n_couverture_geo", i18nC.couvertureGeo()); |
generalParams.set("i18n_specimen_type_titre", i18nC.collectionSpecimenTypeTitre()); |
620,13 → 612,10 |
String nomAlternatif = construireTxtTruck(collection.getNomAlternatif()); |
String typeNcd = construireTxtListeOntologie(collection.getTypeNcd()); |
String typeDepot = construireTxtListeOntologie(collection.getTypeDepot()); |
String idAlternatif = construireTxtTruck(collection.getIdAlternatif()); |
String code = construireTxtTruck(collection.getCode()); |
String urls = construireTxtTruck(collection.getUrls(), false); |
String groupementBut = construireTxtListeOntologie(collection.getGroupementBut()); |
String groupementPrincipe = construireTxtListeOntologie(collection.getGroupementPrincipe()); |
String couvertureGeo = construireTxtTruck(collection.getCouvertureLieu()); |
String specimenTypePresence = construireTxtListeOntologie(collection.getSpecimenType()); |
String specimenTypeNombrePrecision = construireTxtListeOntologie(collection.getSpecimenTypeNbrePrecision()); |
640,17 → 629,13 |
generalParams.set("mere", collection.getCollectionMereNom()); |
generalParams.set("type_ncd", typeNcd); |
generalParams.set("type_depot", typeDepot); |
generalParams.set("id_alternatif", idAlternatif); |
generalParams.set("code", code); |
generalParams.set("cote", collection.getCote()); |
generalParams.set("description", collection.getDescription()); |
generalParams.set("description_specialiste", collection.getDescriptionSpecialiste()); |
generalParams.set("historique", collection.getHistorique()); |
generalParams.set("web", urls); |
generalParams.set("groupement_principe", groupementPrincipe); |
generalParams.set("groupement_but", groupementBut); |
generalParams.set("couverture_geo", couvertureGeo); |
generalParams.set("specimen_type_presence", specimenTypePresence); |
/trunk/src/org/tela_botanica/client/vues/structure/StructureFormIdentification.java |
---|
90,11 → 90,8 |
public TextArea conditionAccesChp; |
public TextArea conditionUsageChp; |
public TextArea adrChp; |
public TextArea adrComplementChp; |
public TextField<String> cpChp; |
public TextField<String> villeChp; |
public ListStore<Valeur> magazinRegion; |
public ComboBox<Valeur> comboRegion; |
public ListStore<Valeur> magazinPays; |
public ChampComboBoxRechercheTempsReelPaginable comboPays; |
public TextField<String> latitudeChp; |
389,11 → 386,6 |
adrChp.setFieldLabel("Adresse (Nom du batiment, rue...)"); |
fieldSetAdresse.add(adrChp, new FormData(550, 0)); |
adrComplementChp = new TextArea(); |
adrComplementChp.setTabIndex(tabIndex++); |
adrComplementChp.setFieldLabel("Complément d'adresse (BP, étage...)"); |
fieldSetAdresse.add(adrComplementChp, new FormData(550, 0)); |
cpChp = new TextField<String>(); |
cpChp.setTabIndex(tabIndex++); |
cpChp.setFieldLabel("Code postal"); |
423,29 → 415,8 |
comboPays.getCombo().setForceSelection(true); |
comboPays.getCombo().setTemplate(getTemplatePays()); |
SelectionChangedListener<ModelData> selectionChange = new SelectionChangedListener<ModelData>() { |
public void selectionChanged(SelectionChangedEvent se) { |
// Rafraichir avec le pays sélectionné |
comboRegion.clear(); |
obtenirListeRegionParPays((new Valeur(se.getSelectedItem())).getAbreviation().toString()); |
} |
}; |
comboPays.getCombo().addSelectionChangedListener(selectionChange); |
droiteFdAdresse.add(comboPays, new FormData("95%")); |
magazinRegion = new ListStore<Valeur>(); |
comboRegion = new ComboBox<Valeur>(); |
comboRegion.setTabIndex(tabIndex++); |
comboRegion.setFieldLabel("Région"); |
comboRegion.setEmptyText("Sélectionner une région..."); |
comboRegion.setDisplayField("nom"); |
comboRegion.setTypeAhead(true); |
comboRegion.setTriggerAction(TriggerAction.ALL); |
comboRegion.setStore(magazinRegion); |
droiteFdAdresse.add(comboRegion, new FormData("95%")); |
latitudeChp = new TextField<String>(); |
latitudeChp.setRegex(Pattern.latitude); |
latitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 90."); |
546,10 → 517,6 |
].join(""); |
}-*/; |
public void obtenirListeRegionParPays(String strPays) { |
mediateur.obtenirListeRegionsEtRafraichir(this, "region", strPays); |
} |
public void peuplerIdSurRetourAjout() { |
initialiserIdentification(); |
idStructureChp.setValue(identification.getId()); |
606,11 → 573,9 |
conditionUsageChp.setValue(identification.getConditionUsage()); |
adrChp.setValue(identification.getAdresse()); |
adrComplementChp.setValue(identification.getAdresseComplement()); |
cpChp.setValue(identification.getCodePostal()); |
villeChp.setValue(identification.getVille()); |
mettreAJourRegion(); |
//(identification.getRegion()); |
if (identification.getPays().matches("^[0-9]+$")) { |
comboPays.chargerValeurInitiale(identification.getPays(), "cmlv_id_valeur"); |
} else { |
686,19 → 651,9 |
structureCollectee.setConditionUsage(conditionUsageChp.getValue()); |
structureCollectee.setAdresse(adrChp.getValue()); |
structureCollectee.setAdresseComplement(adrComplementChp.getValue()); |
structureCollectee.setCodePostal(cpChp.getValue()); |
structureCollectee.setVille(villeChp.getValue()); |
String strRegion = ""; |
Valeur valeurRegion = comboRegion.getValue(); |
if (valeurRegion == null) { |
strRegion = "AUTRE##" + comboRegion.getRawValue(); |
} else { |
strRegion = valeurRegion.getId(); |
} |
structureCollectee.setRegion(strRegion); |
structureCollectee.setPays(null); |
if (comboPays.getCombo().getValue() != null) { |
structureCollectee.setPays(new Valeur(comboPays.getValeur()).getId()); |
778,28 → 733,9 |
magazinLstpu.add(liste); |
comboLstpu.setStore(magazinLstpu); |
} |
if (listeValeurs.getId().equals(config.getListeId("region"))) { |
magazinRegion.removeAll(); |
magazinRegion.add(liste); |
comboRegion.setStore(magazinRegion); |
mettreAJourRegion(); |
} |
} |
} |
private void mettreAJourRegion() { |
//Met à jour la combo box en sélectionnant la valeur enregistrée pour la personne |
if (identification.get("ce_truk_region") != null && comboRegion.getStore().getCount() > 0) { |
Valeur valeurRegion = comboRegion.getStore().findModel("id_valeur", identification.get("ce_truk_region")); |
if (valeurRegion!=null) { |
comboRegion.setValue(valeurRegion); |
} else if (identification.get("ce_truk_region").toString().startsWith("AUTRE##")) { |
comboRegion.setRawValue(identification.get("ce_truk_region").toString().replaceFirst("^AUTRE##", "")); |
} |
} |
} |
public Collection<? extends String> verifier() { |
ArrayList<String> messages = new ArrayList<String>(); |
// Vérification des infos sur le nom de la structure |
/trunk/src/org/tela_botanica/client/vues/structure/StructureFormValorisation.java |
---|
171,65 → 171,65 |
} |
public void peupler() { |
if(valorisation == null) { |
initialiserValorisation(); |
} |
if (formulaireCourant.mode.equals(Formulaire.MODE_AJOUTER)) { |
// Indique que l'onglet a pu être modifié pour la méthode collecter... |
setData("acces", true); |
// Initialisation de l'objet Structure |
valorisation = new StructureValorisation(); |
} |
if (formulaireCourant.mode.equals(Formulaire.MODE_MODIFIER) && valorisation != null) { |
// ACTION : |
//TODO : check below: |
if(valorisation.getAction() != null) { |
((Radio) actionMarkRGrpChp.get(valorisation.getAction() ^ 1)).setValue(true); |
} |
// ACTION INFO |
peuplerCasesACocher(valorisation.getActionInfo(), actionTrukCacGrpChp, actionAutreChp); |
// PUBLICATION |
publicationChp.setValue(valorisation.getPublication()); |
// COLLECTION AUTRE |
peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp); |
// ACTION FUTURE |
if(valorisation.getActionFuture() != null) { |
((Radio) futureActionMarkRGrpChp.get(valorisation.getActionFuture() ^ 1)).setValue(true); |
} |
// ACTION FUTURE INFO |
futureActionChp.setValue(valorisation.getActionFutureInfo()); |
// RECHERCHE |
if(valorisation.getRecherche() != null) { |
((Radio) rechercheMarkRGrpChp.get(valorisation.getRecherche() ^ 1)).setValue(true); |
} |
// RECHERCHE PROVENANCE |
peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp); |
// RECHERCHE TYPE |
peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp); |
// ACCÈS SANS MOTIF |
if(valorisation.getAccesSansMotif() != null) { |
((Radio) sansMotifAccesMarkRGrpChp.get(valorisation.getAccesSansMotif() ^ 1)).setValue(true); |
} |
// ACCÈS SANS MOTIF INFO |
sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo()); |
// VISITE AVEC MOTIF |
if(valorisation.getVisiteAvecMotif() != null) { |
((Radio) avecMotifAccesMarkRGrpChp.get(valorisation.getVisiteAvecMotif() ^ 1)).setValue(true); |
} |
// VISITE AVEC MOTIF INFO |
avecMotifAccesChp.setValue(valorisation.getVisiteAvecMotifInfo()); |
// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter... |
this.setData("acces", true); |
} |
if(valorisation == null) { |
initialiserValorisation(); |
} |
if (formulaireCourant.mode.equals(Formulaire.MODE_AJOUTER)) { |
// Indique que l'onglet a pu être modifié pour la méthode collecter... |
setData("acces", true); |
// Initialisation de l'objet Structure |
valorisation = new StructureValorisation(); |
} |
if (formulaireCourant.mode.equals(Formulaire.MODE_MODIFIER) && valorisation != null) { |
// ACTION : |
//TODO : check below: |
if(valorisation.getAction() != null) { |
((Radio) actionMarkRGrpChp.get(valorisation.getAction() ^ 1)).setValue(true); |
} |
// ACTION INFO |
peuplerCasesACocher(valorisation.getActionInfo(), actionTrukCacGrpChp, actionAutreChp); |
// PUBLICATION |
publicationChp.setValue(valorisation.getPublication()); |
// COLLECTION AUTRE |
peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp); |
// ACTION FUTURE |
if(valorisation.getActionFuture() != null) { |
((Radio) futureActionMarkRGrpChp.get(valorisation.getActionFuture() ^ 1)).setValue(true); |
} |
// ACTION FUTURE INFO |
futureActionChp.setValue(valorisation.getActionFutureInfo()); |
// RECHERCHE |
if(valorisation.getRecherche() != null) { |
((Radio) rechercheMarkRGrpChp.get(valorisation.getRecherche() ^ 1)).setValue(true); |
} |
// RECHERCHE PROVENANCE |
peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp); |
// RECHERCHE TYPE |
peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp); |
// ACCÈS SANS MOTIF |
if(valorisation.getAccesSansMotif() != null) { |
((Radio) sansMotifAccesMarkRGrpChp.get(valorisation.getAccesSansMotif() ^ 1)).setValue(true); |
} |
// ACCÈS SANS MOTIF INFO |
sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo()); |
// VISITE AVEC MOTIF |
if(valorisation.getVisiteAvecMotif() != null) { |
((Radio) avecMotifAccesMarkRGrpChp.get(valorisation.getVisiteAvecMotif() ^ 1)).setValue(true); |
} |
// VISITE AVEC MOTIF INFO |
avecMotifAccesChp.setValue(valorisation.getVisiteAvecMotifInfo()); |
// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter... |
this.setData("acces", true); |
} |
} |
private String creerChaineDenormalisee(List<CheckBox> liste) { |
/trunk/src/org/tela_botanica/client/vues/structure/StructureVue.java |
---|
14,7 → 14,6 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout; |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.user.client.Window; |
public class StructureVue extends LayoutContainer implements Rafraichissable { |
57,7 → 56,6 |
} else { |
panneauInstitutionListe.rafraichir(nouvellesDonnees); |
} |
} |
} else { |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null); |
/trunk/src/org/tela_botanica/client/vues/structure/StructureDetailVue.java |
---|
164,10 → 164,8 |
identificationParams.set("i18n_titre_adresse", i18nC.adresse()); |
identificationParams.set("i18n_adresse", i18nC.adresse()); |
identificationParams.set("i18n_adresse_complement", i18nC.adresseComplement()); |
identificationParams.set("i18n_cp", i18nC.codePostal()); |
identificationParams.set("i18n_ville", i18nC.ville()); |
identificationParams.set("i18n_region", i18nC.region()); |
identificationParams.set("i18n_pays", i18nC.pays()); |
identificationParams.set("i18n_latitude", i18nC.latitude()); |
identificationParams.set("i18n_longitude", i18nC.longitude()); |
197,18 → 195,9 |
identificationParams.set("usage", structure.getConditionUsage()); |
identificationParams.set("adresse", structure.getAdresse()); |
identificationParams.set("adresse_complement", structure.getAdresseComplement()); |
identificationParams.set("cp", structure.getCodePostal()); |
identificationParams.set("ville", structure.getVille()); |
if (structure.getRegion().toString().matches("[0-9]+")) { |
if (ontologie.get(structure.getRegion()) == null) { |
mediateur.obtenirValeurEtRafraichir(this, null, structure.getRegion(), sequenceur); |
} |
} |
identificationParams.set("region", construireTxtListeOntologie(structure.getRegion())); |
identificationParams.set("pays", pays); |
identificationParams.set("latitude_longitude", latitudeLongitude); |
484,10 → 473,8 |
" <div class='{css_fieldset}'>"+ |
" <h2>{i18n_titre_adresse}</h2>"+ |
" <span class='{css_label}'>{i18n_adresse} :</span> {adresse}<br />" + |
" <span class='{css_label}'>{i18n_adresse_complement} :</span> {adresse_complement}<br />" + |
" <span class='{css_label}'>{i18n_cp} :</span> {cp}<br />" + |
" <span class='{css_label}'>{i18n_ville} :</span> {ville}<br />" + |
" <span class='{css_label}'>{i18n_region} :</span> {region}<br />" + |
" <span class='{css_label}'>{i18n_pays} :</span> {pays}<br />" + |
" <span class='{css_label}'>{i18n_latitude} / {i18n_longitude} :</span> {latitude_longitude}<br />" + |
" </div>"+ |