/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherchePresenteur.java |
---|
76,6 → 76,19 |
public void focusSaisie(); |
public void nettoyer(); |
public HasKeyPressHandlers getChampsFamille(); |
public HasKeyPressHandlers getChampsGenre(); |
public HasKeyPressHandlers getChampsTag(); |
public HasKeyPressHandlers getChampsMotCle(); |
public HasKeyPressHandlers getChampsAuteur(); |
public HasKeyPressHandlers getChampsDate(); |
} |
private Vue vue; |
112,10 → 125,6 |
gererEvenements(); |
} |
private Vue getVue() { |
return vue; |
} |
public ModeRecherche getMode() { |
return modeRecherche; |
} |
249,8 → 258,33 |
} |
} |
}); |
vue.getChampsAuteur().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
vue.getChampsDate().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
vue.getChampsFamille().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
vue.getChampsGenre().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
vue.getChampsMotCle().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
vue.getChampsTag().addKeyPressHandler(createKeyboardAdvancedSearchHandler()); |
} |
public KeyPressHandler createKeyboardAdvancedSearchHandler() { |
return new KeyPressHandler() { |
public void onKeyPress(KeyPressEvent event) { |
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { |
vue.basculerAffichageZoneCache(); |
collecterInfosRecherche(); |
afficherRequeteEtLancerRecherche(); |
} |
} |
}; |
} |
private void nettoyerChamps() { |
completionCommunesPresenteur.nettoyer(); |
completionTaxonsPresenteur.nettoyer(); |
272,7 → 306,6 |
informationRecherche.setDate(vue.getDate()); |
} |
if (estPourRechercheImages()) { |
CacheClient.getInstance().setPageCouranteRechercheImages(1); |
CacheClient.getInstance().setInformationsRechercheImage(informationRecherche); |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.java |
---|
18,7 → 18,8 |
public class MoteurRechercheVue extends Composite implements MoteurRecherchePresenteur.Vue { |
interface Binder extends UiBinder<Widget, MoteurRechercheVue> {} |
interface Binder extends UiBinder<Widget, MoteurRechercheVue> { |
} |
private static Binder uiBinder = GWT.create(Binder.class); |
private String labelRecherche = ""; |
70,15 → 71,15 |
public String getValeurRechercheSimple() { |
return recherchePrincipale.getText(); |
} |
public void setValeurRechercheSimple(String valeurRecherche) { |
recherchePrincipale.setText(valeurRecherche); |
} |
public HasClickHandlers getChampSaisieCliquable() { |
return recherchePrincipale; |
} |
public String getContientMots() { |
return contientMots.getText(); |
} |
86,7 → 87,7 |
public void setContientMots(String mots) { |
contientMots.setText(mots); |
} |
public String getDepartement() { |
return departement.getText(); |
} |
126,7 → 127,7 |
public String getDate() { |
return date.getText(); |
} |
public void focusSaisie() { |
this.recherchePrincipale.setFocus(true); |
} |
134,17 → 135,17 |
public void ajouterVue(HasWidgets composite) { |
composite.add(this.asWidget()); |
} |
public void basculerAffichageZoneCache() { |
rechercheAvancee.setVisible(!rechercheAvancee.isVisible()); |
recherchePrincipale.setVisible(!recherchePrincipale.isVisible()); |
boutonRecherche.setVisible(!boutonRecherche.isVisible()); |
} |
public void nettoyer() { |
chargerValeursRecherchePrecedente(new InformationsRecherche()); |
} |
public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche) { |
recherchePrincipale.setText(informationsRecherche.getRechercheLibre()); |
contientMots.setText(informationsRecherche.getRechercheLibre()); |
202,4 → 203,34 |
recherchePrecedente.setText(texteRecherchePrecedente.toString()); |
} |
@Override |
public HasKeyPressHandlers getChampsFamille() { |
return famille; |
} |
@Override |
public HasKeyPressHandlers getChampsGenre() { |
return genre; |
} |
@Override |
public HasKeyPressHandlers getChampsTag() { |
return tag; |
} |
@Override |
public HasKeyPressHandlers getChampsMotCle() { |
return motCle; |
} |
@Override |
public HasKeyPressHandlers getChampsAuteur() { |
return auteur; |
} |
@Override |
public HasKeyPressHandlers getChampsDate() { |
return date; |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/formulaires/AutoCompletionComboBoxPresenteur.java |
---|
165,4 → 165,8 |
* @return String[] le tableau des suggestions qui sera affiché dans la combobox |
*/ |
protected abstract String[] parserResultatRequete(Response response); |
public Vue getAutoCompletionComboBoxVue() { |
return autoCompletionComboBoxVue; |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/pagination/PaginationPresenteur.java |
---|
66,7 → 66,7 |
public void afficherPas(int pas); |
public void mettreEnValeurPageActive(int pageActive); |
public void mettreNbTotalPages(int nbPages); |
} |
75,7 → 75,7 |
private int pageCourante = 1; |
private int nbElementsTotal = 0; |
private int pas = 10; |
private String groupePagination = null; |
/** |
151,7 → 151,7 |
@Override |
public void onChangementPage(EvenementChangementPage event) { |
if(event.getGroupePagination() == groupePagination) { |
if (event.getGroupePagination() == groupePagination) { |
pageCourante = event.getPageAAfficher(); |
mettreEnValeurPageCourante(); |
} |
162,7 → 162,7 |
@Override |
public void onChangementPas(EvenementChangementPas event) { |
if(event.getGroupePagination() == groupePagination) { |
if (event.getGroupePagination() == groupePagination) { |
// modifie le pas et les liens en fonction |
pas = event.getPas(); |
actualiserPas(); |
171,14 → 171,14 |
} |
}); |
} |
private void gererDecalagePageCourante(int ancienPas, int nouveauPas) { |
if(ancienPas != nouveauPas) { |
double rapportPas = (double)ancienPas/(double)nouveauPas; |
pageCourante = (int)(Math.ceil((double)pageCourante*(double)rapportPas)); |
private void gererDecalagePageCourante(int ancienPas, int nouveauPas) { |
if (ancienPas != nouveauPas) { |
double rapportPas = (double) ancienPas / (double) nouveauPas; |
pageCourante = (int) (Math.ceil((double) pageCourante * (double) rapportPas)); |
} |
} |
/** |
* Gérer les évènements sur les boutons dynamiques (qui sont recréés à |
* chaque fois) |
237,14 → 237,17 |
public void setPageCourante(int pageCourante) { |
this.pageCourante = pageCourante; |
} |
public void changerPas(int nouveauPas) { |
gererDecalagePageCourante(pas, nouveauPas); |
// TODO corriger bug qui ne charge pas la bonne page ds certains cas |
// gererDecalagePageCourante(pas, nouveauPas); |
// pas = nouveauPas; |
// chargerElements((pageCourante - 1)*pas, pageCourante*pas); |
pas = nouveauPas; |
chargerElements((pageCourante - 1)*pas, pageCourante*pas); |
chargerElements(0, pas); |
BusEvenementiel.getInstance().fireEvent(new EvenementChangementPas(nouveauPas, groupePagination)); |
BusEvenementiel.getInstance().fireEvent(new EvenementChangementPage(1, groupePagination)); |
//BusEvenementiel.getInstance().fireEvent(new EvenementChangementPage(pageCourante, groupePagination)); |
} |
public void allerALaPagePrecedente() { |
258,7 → 261,7 |
} |
public void allerALapageSuivante() { |
if (pageCourante < nbPage ) { |
if (pageCourante < nbPage) { |
int pageAAfficher = pageCourante + 1; |
pageCourante = pageAAfficher; |
chargerElements(pas * (pageAAfficher - 1), pas * (pageAAfficher)); |
274,7 → 277,7 |
} |
public void allerAlaDernierePage() { |
int pageAAfficher = nbPage ; |
int pageAAfficher = nbPage; |
pageCourante = pageAAfficher; |
chargerElements(pas * (pageAAfficher - 1), pas * (pageAAfficher)); |
BusEvenementiel.getInstance().fireEvent(new EvenementChangementPage(pageAAfficher, groupePagination)); |
309,11 → 312,11 |
public void setPas(int pas) { |
this.pas = pas; |
} |
public void setGroupePagination(String groupePagination) { |
this.groupePagination = groupePagination; |
} |
public String getGroupePagination() { |
return groupePagination; |
} |
/trunk/src/org/tela_botanica/del/client/composants/metadonnees/MetadonneesVue.java |
---|
5,6 → 5,7 |
import com.google.gwt.uibinder.client.UiBinder; |
import com.google.gwt.uibinder.client.UiField; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.HTML; |
import com.google.gwt.user.client.ui.HasText; |
import com.google.gwt.user.client.ui.Hyperlink; |
import com.google.gwt.user.client.ui.InlineLabel; |
18,8 → 19,12 |
private static Binder binder = GWT.create(Binder.class); |
@UiField |
Hyperlink nomRetenu, famille, auteur, localite, motsClefs, numNomenclatural, nomCommun, lieuDit, commentaire, milieu; |
Hyperlink nomRetenu, famille, auteur, localite, motsClefs, numNomenclatural, nomCommun, commentaire, milieu; |
@UiField |
HTML lieuDit; |
@UiField |
InlineLabel dateReleve, dateTransmission; |
public MetadonneesVue() { |
78,7 → 83,7 |
public HasClickHandlers getLienNomRetenu() { |
return nomRetenu; |
} |
public HasClickHandlers getLienFamille() { |
return this.famille; |
} |
111,10 → 116,6 |
return nomCommun; |
} |
public HasClickHandlers getLienLieuDit() { |
return lieuDit; |
} |
public HasClickHandlers getLienMilieu() { |
return milieu; |
} |
/trunk/src/org/tela_botanica/del/client/composants/metadonnees/metadonnees.css |
---|
9,14 → 9,13 |
.nomRetenu { |
font-size: 15px; |
cursor: pointer; |
text-decoration: underline; |
color: blue; |
color: white; |
} |
.zoneFamille { |
margin-top: 1em; |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneFamille div { |
29,7 → 28,7 |
.zoneLocalite { |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneLocalite div { |
50,7 → 49,7 |
.zoneMilieu { |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneMilieu div { |
63,7 → 62,7 |
.zoneCommentaire { |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneCommentaire div { |
76,12 → 75,12 |
.zoneDateReleve { |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneAuteur { |
cursor: pointer; |
color: blue; |
color: white; |
} |
.zoneAuteur div { |
/trunk/src/org/tela_botanica/del/client/composants/metadonnees/MetadonneesVue.ui.xml |
---|
36,7 → 36,7 |
<!-- Lieu-dit --> |
<g:HTMLPanel ui:field="zoneLieuDit" styleName="{style.zoneLieuDit}"> |
<g:Label styleName="petit gris" text="{constants.lieuDit}" /> |
<g:Hyperlink ui:field="lieuDit" /> |
<g:HTML ui:field="lieuDit" /> |
</g:HTMLPanel> |
<!-- Milieu --> |
/trunk/src/org/tela_botanica/del/client/composants/metadonnees/MetadonneesPresenteur.java |
---|
61,8 → 61,6 |
public HasClickHandlers getLienNomCommun(); |
public HasClickHandlers getLienLieuDit(); |
public HasClickHandlers getLienMilieu(); |
public HasClickHandlers getLienCommentaire(); |