/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>"+ |
/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); |