Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 728 → Rev 727

/trunk/src/org/tela_botanica/client/util/AutoCompletionRefComboBox.java
File deleted
/trunk/src/org/tela_botanica/client/image/ImageMediateur.java
275,6 → 275,7
 
// on crée un modèle
iModele = ImageModele.Instance(this);
// et on demande l'arbre des mots clés
 
// on gère la mise en page du panneau principal
 
571,26 → 572,24
 
if (li.getCount() <= 0) {
aucuneSelection();
if (ongletsImage.getActiveTab().getId() == getZoomImage().getId()) {
ongletsImage.activate(0);
}
} else {
selection();
}
 
if (r != getGalerieImage()) {
getGalerieImage().rafraichir(o, false);
}
if (r != getZoomImage()) {
getZoomImage().rafraichir(o, false);
}
if (r != getListeImage()) {
getListeImage().rafraichir(o, false);
}
}
 
demasquerChargement();
if (r != getGalerieImage()) {
getGalerieImage().rafraichir(o, false);
}
if (r != getZoomImage()) {
getZoomImage().rafraichir(o, false);
}
if (r != getListeImage()) {
getListeImage().rafraichir(o, false);
}
 
}
aucuneSelection();
demasquerChargement();
}
 
1005,6 → 1004,7
getZoomImage().desactiverPanneau();
setSelection(false);
}
 
}
 
/**
1631,7 → 1631,6
setIdentifiant(cMediateur.getUtilisateur().getIdentifiant());
getIModele().initialiserArbreMotsCles();
filtres.getArbreDateRecherche().initialiser();
obtenirPhotoGalerie(getGalerieImage());
}
else
1642,7 → 1641,6
{
setIdentifiant(cMediateur.getUtilisateur().getIdentifiant());
getIModele().initialiserArbreMotsCles();
filtres.getArbreDateRecherche().initialiser();
obtenirPhotoGalerie(getGalerieImage());
panneauPrincipalImage.purgeListeners() ;
}
/trunk/src/org/tela_botanica/client/vues/observation/FormulaireSaisieObservationVue.java
18,7 → 18,6
import org.tela_botanica.client.modeles.ReferentielNom;
import org.tela_botanica.client.modeles.ListeReferentielPerso.TypesReferentiels;
import org.tela_botanica.client.observation.ObservationMediateur;
import org.tela_botanica.client.util.AutoCompletionRefComboBox;
import org.tela_botanica.client.util.Util;
 
import com.google.gwt.core.client.GWT;
149,6 → 148,9
private Button boutonAnnuler = new Button("Réinitialiser");
 
private boolean selectionCommune=false;
private boolean selectionStation=false;
private boolean selectionLieuDit=false;
private boolean selectionMilieu=false;
private boolean selectionEspece=false;
private boolean modification = false ;
317,16 → 319,16
 
panneauPremierColonne.add(htmlCommunePanel);
 
station = new AutoCompletionRefComboBox("Station", "station", observationMediateur, TypesReferentiels.REFERENTIEL_STATION) {
station = new ComboBox("Station", "station");
station.setTpl(resultTplRefPerso);
station.setMode(ComboBox.REMOTE);
// commune.setPageSize(10); // Ne fonctionne pas
station.setItemSelector("div.search-item-commune");
station.setTypeAhead(true);
station.setLoadingText("Recherche...");
station.setHideTrigger(true);
station.setAllowBlank(true);
 
public void onModificationValeur() {
stationModifiee = true;
}
 
public void onValidationSaisie() {
validerSaisie(Champs.STATION);
}
};
panneauPremierColonne.add(station, new AnchorLayoutData("95%"));
latitude = new TextField("Lat", "x");
465,29 → 467,25
 
panneauPremierColonne.add(espece, new AnchorLayoutData("95%"));
lieudit = new AutoCompletionRefComboBox("Lieu-dit", "lieudit",observationMediateur,TypesReferentiels.REFERENTIEL_LIEU_DIT) {
 
public void onModificationValeur() {
lieuDitModifie = true;
}
 
public void onValidationSaisie() {
validerSaisie(Champs.LIEUDIT);
}
};
lieudit = new ComboBox("Lieu-dit", "lieudit");
lieudit.setTpl(resultTplRefPerso);
lieudit.setMode(ComboBox.REMOTE);
lieudit.setItemSelector("div.search-item-commune");
lieudit.setTypeAhead(true);
lieudit.setLoadingText("Recherche...");
lieudit.setHideTrigger(true);
lieudit.setAllowBlank(true);
panneauSecondeColonne.add(lieudit, new AnchorLayoutData("95%"));
milieu = new AutoCompletionRefComboBox("Milieu","milieu",observationMediateur,TypesReferentiels.REFERENTIEL_MILIEU) {
 
public void onModificationValeur() {
milieuModifie = true;
}
 
public void onValidationSaisie() {
validerSaisie(Champs.MILIEU);
}
};
milieu = new ComboBox("Milieu", "milieu");
milieu.setTpl(resultTplRefPerso);
milieu.setMode(ComboBox.REMOTE);
milieu.setItemSelector("div.search-item-commune");
milieu.setTypeAhead(true);
milieu.setLoadingText("Recherche...");
milieu.setHideTrigger(true);
milieu.setAllowBlank(true);
panneauSecondeColonne.add(milieu, new AnchorLayoutData("95%"));
comment = new TextArea("Notes", "comment");
699,8 → 697,59
listenerConfigAutocompletion.setDelay(200);
listenerConfigAutocompletion.setStopPropagation(false);
listenerConfigAutocompletion.setStopEvent(false);
station.addListener(new ComboBoxListenerAdapter() {
public void onSelect(ComboBox comboBox, Record record, int index) {
station.setValue(record.getAsString("element_referentiel"));
selectionStation=true;
station.collapse();
}
public void onExpand(ComboBox comboBox) {
comboBox.focus();
}
});
station.addKeyPressListener(new EventCallback() {
 
public void execute(EventObject e) {
// TODO Auto-generated method stub
switch(e.getKey()) {
case KEY_ALT:
case KEY_CTRL:
case KEY_DOWN:
case KEY_END:
case KEY_ESCAPE:
case KEY_HOME:
case KEY_LEFT:
case KEY_PAGEDOWN:
case KEY_PAGEUP:
case KEY_RIGHT:
case KEY_SHIFT:
case KEY_TAB:
case KEY_UP:
break;
case KEY_ENTER:
if (selectionStation) {
stationModifiee= true;
selectionStation=false;
}
else {
validerSaisie(Champs.STATION);
}
break;
default:
obtenirReferentielStation();
stationModifiee = true;
}
}
},listenerConfigAutocompletion);
// Listener completion espece
espece.addListener(new ComboBoxListenerAdapter() {
public void onSelect(ComboBox comboBox, Record record, int index) {
771,6 → 820,102
);
// Listener completion lieudit
lieudit.addListener(new ComboBoxListenerAdapter() {
public void onSelect(ComboBox comboBox, Record record, int index) {
lieudit.setValue(record.getAsString("element_referentiel"));
selectionLieuDit=true;
lieudit.collapse();
}
});
lieudit.addKeyPressListener(new EventCallback() {
 
public void execute(EventObject e) {
// TODO Auto-generated method stub
switch(e.getKey()) {
case KEY_ALT:
case KEY_CTRL:
case KEY_DOWN:
case KEY_END:
case KEY_ESCAPE:
case KEY_HOME:
case KEY_LEFT:
case KEY_PAGEDOWN:
case KEY_PAGEUP:
case KEY_RIGHT:
case KEY_SHIFT:
case KEY_TAB:
case KEY_UP:
break;
case KEY_ENTER:
if (selectionLieuDit) {
lieuDitModifie= true;
selectionLieuDit=false;
}
else {
validerSaisie(Champs.LIEUDIT);
}
break;
default:
lieuDitModifie = true;
obtenirReferentielLieuDit();
}
}
},listenerConfigAutocompletion);
// Listener completion lieudit
milieu.addListener(new ComboBoxListenerAdapter() {
public void onSelect(ComboBox comboBox, Record record, int index) {
milieu.setValue(record.getAsString("element_referentiel"));
selectionMilieu=true;
milieu.collapse();
}
});
milieu.addKeyPressListener(new EventCallback() {
 
public void execute(EventObject e) {
// TODO Auto-generated method stub
switch(e.getKey()) {
case KEY_ALT:
case KEY_CTRL:
case KEY_DOWN:
case KEY_END:
case KEY_ESCAPE:
case KEY_HOME:
case KEY_LEFT:
case KEY_PAGEDOWN:
case KEY_PAGEUP:
case KEY_RIGHT:
case KEY_SHIFT:
case KEY_TAB:
case KEY_UP:
break;
case KEY_ENTER:
if (selectionMilieu) {
milieuModifie= true;
selectionMilieu=false;
}
else {
validerSaisie(Champs.MILIEU);
}
break;
default:
milieuModifie = true;
obtenirListeReferentielMilieu();
}
}
},listenerConfigAutocompletion);
comment.addKeyPressListener(new EventCallback() {
 
public void execute(EventObject e) {
1043,6 → 1188,58
}
if(nouvelleDonnees instanceof ListeReferentielPerso)
{
ListeReferentielPerso referentielPerso = (ListeReferentielPerso)nouvelleDonnees;
int i = 0;
Object[][] refData = new Object[referentielPerso.size()][1];
// on la parse et on récupère les informations quiç nous interessent
for (Iterator it = referentielPerso.keySet().iterator(); it.hasNext();)
{
String ref= referentielPerso.get(it.next());
refData[i][0]= ref;
i++;
}
//creation du store
FieldDef defStation = new StringFieldDef("element_referentiel");
FieldDef[] defTab = {defStation};
RecordDef rd = new RecordDef(defTab);
final MemoryProxy dataProxy = new MemoryProxy(refData);
final ArrayReader reader = new ArrayReader(rd);
Store store=new Store(dataProxy,reader);
switch (referentielPerso.getTypeReferentiel()) {
case REFERENTIEL_STATION:
station.setStore(store);
store.load();
break;
case REFERENTIEL_LIEU_DIT:
lieudit.setStore(store);
store.load();
break;
case REFERENTIEL_MILIEU:
milieu.setStore(store);
store.load();
break;
default:
break;
}
}
// On recoit une observation dont on veut afficher le detail
if(nouvelleDonnees instanceof Observation)
/trunk/src/org/tela_botanica/client/modeles/ListeReferentielPersoAsynchroneDAO.java
File deleted
/trunk/src/org/tela_botanica/client/modeles/ListeReferentielPerso.java
File deleted