/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.ui.xml |
---|
17,69 → 17,81 |
<g:Button ui:field="boutonFermer" styleName="{style.boutonFermer}" text="Fermer"></g:Button> |
<g:Button ui:field="boutonVider" styleName="{style.boutonVider}" text="Vider"></g:Button> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.contientMots}" styleName="petit"/> |
<g:TextBox ui:field="contientMots" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.famille}" styleName="petit"/> |
<g:TextBox ui:field="famille" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.referentiel}" styleName="petit"/> |
<g:ListBox ui:field="referentiel" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.taxon}" styleName="petit"/> |
<g:HTMLPanel ui:field="taxon" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.genre}" styleName="petit"/> |
<g:TextBox ui:field="genre" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.commune}" styleName="petit"/> |
<g:HTMLPanel ui:field="commune" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.departement}" styleName="petit"/> |
<g:TextBox ui:field="departement" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.conteneurDeuxPanneaux}"> |
<g:HTMLPanel styleName="{style.panneauGauche}"> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.contientMots}" styleName="petit"/> |
<g:TextBox ui:field="contientMots" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.referentiel}" styleName="petit"/> |
<g:ListBox ui:field="referentiel" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.auteur}" styleName="petit"/> |
<g:TextBox ui:field="auteur" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.date} {constants.formatDate}" styleName="petit"/> |
<g:TextBox ui:field="date" /> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.famille}" styleName="petit"/> |
<g:TextBox ui:field="famille" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.genre}" styleName="petit"/> |
<g:TextBox ui:field="genre" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.taxon}" styleName="petit"/> |
<g:HTMLPanel ui:field="taxon" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.date} {constants.formatDate}" styleName="petit"/> |
<g:TextBox ui:field="date" /> |
</g:HTMLPanel> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.panneauDroite}"> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.pays}" styleName="petit"/> |
<g:ListBox ui:field="pays" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.departement}" styleName="petit"/> |
<g:TextBox ui:field="departement" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.commune}" styleName="petit"/> |
<g:HTMLPanel ui:field="commune" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="{style.champRecherche}"> |
<g:Label text="{constants.auteur}" styleName="petit"/> |
<g:TextBox ui:field="auteur" /> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCle" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tag}" styleName="petit"/> |
<g:TextBox ui:field="motCle" /> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCleCel" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tagCel}" styleName="petit"/> |
<g:TextBox ui:field="motCleCel" /> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCleDel" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tagDel}" styleName="petit"/> |
<g:TextBox ui:field="motCleDel" /> |
</g:HTMLPanel> |
</g:HTMLPanel> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCle" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tag}" styleName="petit"/> |
<g:TextBox ui:field="motCle" /> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCleCel" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tagCel}" styleName="petit"/> |
<g:TextBox ui:field="motCleCel" /> |
</g:HTMLPanel> |
<g:HTMLPanel ui:field="conteneurMotCleDel" styleName="{style.champRecherche}"> |
<g:Label text="{constants.tagDel}" styleName="petit"/> |
<g:TextBox ui:field="motCleDel" /> |
</g:HTMLPanel> |
<g:Button styleName="{style.boutonRecherche} {style.rechercherAvance}" ui:field="boutonRechercheAvancee" text="{constants.rechercher}"></g:Button> |
<g:HTMLPanel styleName="nettoyage" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="droite"> |
<g:HTMLPanel ui:field="zoneRss" styleName="{style.zoneRss}"></g:HTMLPanel> |
</g:HTMLPanel> |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherchePresenteur.java |
---|
12,6 → 12,9 |
import org.tela_botanica.del.client.modeles.InformationsRecherche; |
import org.tela_botanica.del.client.modeles.ModeRecherche; |
import org.tela_botanica.del.client.services.ReferentielService; |
import org.tela_botanica.del.client.services.rest.PaysService; |
import org.tela_botanica.del.client.services.rest.PaysServiceConcret; |
import org.tela_botanica.del.client.services.rest.async.PaysCallback; |
import org.tela_botanica.del.client.utils.InfosNomPourAutocompletion; |
import org.tela_botanica.del.client.utils.UtilitairesAutoCompletionService; |
68,6 → 71,8 |
public String getAuteur(); |
public String getDate(); |
public String getPays(); |
public void setValeurRechercheSimple(String valeurRecherche); |
114,6 → 119,8 |
public void cacherChampsTagsImage(); |
public void cacherChampsTagsObs(); |
void remplirListePays(Map<String, String> listePays); |
} |
private Vue vue; |
160,6 → 167,19 |
vue.setReferentielLectureSeule(true); |
} |
if(CacheClient.getInstance().getListePays() != null) { |
vue.remplirListePays(CacheClient.getInstance().getListePays()); |
} else { |
PaysService paysService = new PaysServiceConcret(); |
paysService.getPays(new PaysCallback() { |
@Override |
public void surRetour(Map<String, String> listePays) { |
CacheClient.getInstance().setListePays(listePays); |
MoteurRecherchePresenteur.this.vue.remplirListePays(listePays); |
} |
}); |
} |
if(estPourRechercheImages()) { |
vue.cacherChampsTagsObs(); |
} else { |
361,6 → 381,7 |
informationRecherche.setAuteur(vue.getAuteur()); |
informationRecherche.setDate(vue.getDate()); |
informationRecherche.setReferentiel(vue.getReferentiel()); |
informationRecherche.setPays(vue.getPays()); |
} |
if(CacheClient.getInstance().getReferentielNonModifiable()) { |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.java |
---|
28,6 → 28,14 |
private static Binder uiBinder = GWT.create(Binder.class); |
private String labelRecherche = ""; |
private Map<String,String> listePays; |
private InformationsRecherche informationRecherche; |
// Si l'on charge une recherche précédente et que la liste des pays n'est |
// pas encore arrivée, on stocke le pays pour l'afficher quand la liste arrive |
private String paysEnAttente; |
@UiField |
Panel rechercheAvancee, taxon, commune, zoneRss, conteneurMotCle, conteneurMotCleCel, conteneurMotCleDel ; |
38,7 → 46,7 |
@UiField |
TextBox recherchePrincipale, contientMots, departement, famille, genre, motCle, motCleCel, motCleDel, auteur, date; |
@UiField |
ListBox referentiel; |
ListBox referentiel, pays; |
public MoteurRechercheVue(String labelRecherche) { |
initWidget(uiBinder.createAndBindUi(this)); |
55,6 → 63,29 |
} |
referentiel.setItemSelected(1, true); |
} |
@Override |
public void remplirListePays(Map<String, String> listePays) { |
this.listePays = listePays; |
pays.clear(); |
// Pour pouvoir annuler la selection de pays, on ajoute un item vide |
pays.addItem("", ""); |
int index = 1; |
for (Iterator<String> iterator = listePays.keySet().iterator(); iterator.hasNext();) { |
String codePays = iterator.next(); |
pays.addItem(listePays.get(codePays), codePays); |
if(paysEnAttente != null && codePays.equals(paysEnAttente)) { |
pays.setItemSelected(index, true); |
} |
index++; |
} |
if(paysEnAttente != null) { |
afficherLigneInfoRecherche(informationRecherche); |
} |
paysEnAttente = null; |
} |
public String getLabelRecherche() { |
return labelRecherche; |
103,6 → 134,10 |
public void setContientMots(String mots) { |
contientMots.setText(mots); |
} |
public String getPays() { |
return pays.getValue(pays.getSelectedIndex()); |
} |
public String getDepartement() { |
return departement.getText(); |
179,6 → 214,18 |
referentiel.setSelectedIndex(i); |
} |
} |
// la liste des pays du champs de recherche est asynchrone |
// donc elle peut ne pas avoir encore été chargée |
if(listePays != null) { |
for(int i = 0; i < pays.getItemCount(); i++) { |
if(pays.getValue(i).equals(paysEnAttente)) { |
pays.setSelectedIndex(i); |
} |
} |
} else { |
paysEnAttente = informationsRecherche.getPays(); |
} |
afficherLigneInfoRecherche(informationsRecherche); |
} |
190,6 → 237,9 |
* @param informationRecherche |
*/ |
private void afficherLigneInfoRecherche(InformationsRecherche informationRecherche) { |
this.informationRecherche = informationRecherche; |
// tax dep com fam gen ta mo au date |
StringBuffer texteRecherchePrecedente = new StringBuffer(); |
202,6 → 252,9 |
if (informationRecherche.getDepartement() != null && !informationRecherche.getDepartement().equals("")) { |
texteRecherchePrecedente.append(I18n.getVocabulary().departement() + ":" + informationRecherche.getDepartement() + " "); |
} |
if (listePays != null && informationRecherche.getPays() != null && !informationRecherche.getPays().equals("")) { |
texteRecherchePrecedente.append(I18n.getVocabulary().pays() + ":" + listePays.get(informationRecherche.getPays()) + " "); |
} |
if (informationRecherche.getCommune() != null && !informationRecherche.getCommune().equals("")) { |
texteRecherchePrecedente.append(I18n.getVocabulary().commune() + ":" + informationRecherche.getCommune() + " "); |
} |
232,7 → 285,7 |
if (informationRecherche.getReferentiel() != null && !informationRecherche.getReferentiel().equals("")) { |
texteRecherchePrecedente.append(I18n.getVocabulary().referentiel() + ":" + informationRecherche.getReferentiel() + " "); |
} |
recherchePrecedente.setText(texteRecherchePrecedente.toString()); |
} |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherche.css |
---|
33,9 → 33,22 |
z-index: 2000 |
} |
.conteneurDeuxPanneaux { |
width: 700px; |
} |
.panneauGauche { |
float: left; |
width: 300px; |
} |
.panneauDroite { |
float: left; |
width: 300px; |
} |
.champRecherche { |
float: left; |
width: 40%; |
width: 90%; |
padding-bottom: 5px |
} |
57,7 → 70,8 |
padding: 0 0 0 16px; |
color: blue; |
text-decoration: underline; |
cursor: pointer |
cursor: pointer; |
height: 19px; |
} |
.boutonVider { |
67,12 → 81,16 |
padding: 0 0 0 16px; |
color: blue; |
text-decoration: underline; |
cursor: pointer |
cursor: pointer; |
height: 19px |
} |
.rechercherAvance { |
margin-top:10px; |
margin-top: 0px; |
margin-left:0px; |
top: 195px; |
position: relative; |
left: 25px; |
} |
.zoneRecherche { |
83,4 → 101,9 |
} |
.zoneRss a { |
border:none; |
} |
.nettoyage { |
visibility: hidden; |
clear: both; |
} |