/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherche.css |
---|
73,4 → 73,8 |
.rechercherAvance { |
margin-top:10px; |
margin-left:0px; |
} |
.zoneRecherche { |
margin-bottom:30px; |
} |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.ui.xml |
---|
8,7 → 8,7 |
<ui:style src="MoteurRecherche.css" /> |
<g:HTMLPanel styleName="limiteMin"> |
<g:HTMLPanel styleName="limiteMin {style.zoneRecherche}"> |
<g:TextBox styleName="{style.recherchePrincipale} arrondi" ui:field="recherchePrincipale" text="{constants.rechercherObservation}"></g:TextBox> |
<g:Button styleName="{style.boutonRecherche} arrondi" ui:field="boutonRecherche" text="{constants.rechercher}"> |
</g:Button> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/resultats/ResultatsRechercheObservationsPresenteur.java |
---|
55,6 → 55,7 |
private ObservationService serviceObs; |
private ModeTri triCourantDate = ModeTri.TRI_DESCENDANT; |
private CacheClient cache = CacheClient.getInstance(); |
private String statut; |
/** |
* Constructeur de la classe |
63,10 → 64,11 |
* serviceObs le service pour récupérer les observations |
* @Vue Vue l'objet implémentant l'interface |
* */ |
public ResultatsRechercheObservationsPresenteur(ObservationService serviceObs, Vue vue) { |
public ResultatsRechercheObservationsPresenteur(ObservationService serviceObs, Vue vue, String statut) { |
this.vue = vue; |
vue.setModeTri(triCourantDate); |
this.serviceObs = serviceObs; |
this.statut = statut; |
} |
/** |
106,7 → 108,7 |
} |
}; |
serviceObs.getObservations(cache.getInformationsRechercheObservation(), debut, fin, callback); |
serviceObs.getObservations(cache.getInformationsRechercheObservation(), debut, fin, statut, callback); |
} |
/** |
221,7 → 223,7 |
} |
}; |
serviceObs.getObservations(cache.getInformationsRechercheObservation(), debut, fin, surReceptionObservation); |
serviceObs.getObservations(cache.getInformationsRechercheObservation(), debut, fin, statut, surReceptionObservation); |
} |
/** |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/moteur/MoteurRechercheObservations.css |
---|
6,3 → 6,6 |
float: right; |
} |
.zoneStatut { |
margin-top:-36px; |
} |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/moteur/MoteurRechercheObservationsVue.ui.xml |
---|
15,6 → 15,12 |
<g:Label text="{constants.rechercherObservation}" styleName="titre" /> |
<g:Label text="{constants.entrerMotClef}" styleName="gris {style.entrerMotClef}" /> |
<g:HTMLPanel ui:field="zoneRecherche" /> |
<g:HorizontalPanel styleName="{style.zoneStatut}"> |
<g:RadioButton ui:field="radioTout" text="Tout" name="statut" checked="true" formValue="tout"></g:RadioButton> |
<g:RadioButton ui:field="radioDeterminer" text="A déterminer" name="statut" formValue="adeterminer"></g:RadioButton> |
<g:RadioButton ui:field="radioConfirmer" text="A confirmer" name="statut" formValue="aconfirmer"></g:RadioButton> |
<g:RadioButton ui:field="radioDiscussion" text="En discussion" name="statut" formValue="endiscussion"></g:RadioButton> |
</g:HorizontalPanel> |
</g:HTMLPanel> |
<g:HTMLPanel> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/moteur/MoteurRechercheObservationsPresenteur.java |
---|
25,6 → 25,8 |
public HasWidgets getZoneResultats(); |
HasClickHandlers getLienAjoutObservation(); |
public String getValeurRadioStatut(); |
} |
55,7 → 57,7 |
public void chercherObservations() { |
vue.getZoneResultats().clear(); |
new ResultatsRechercheObservationsPresenteur(new ObservationServiceConcret(), new ResultatsRechercheObservationsVue()).go(vue.getZoneResultats()); |
new ResultatsRechercheObservationsPresenteur(new ObservationServiceConcret(), new ResultatsRechercheObservationsVue(), vue.getValeurRadioStatut()).go(vue.getZoneResultats()); |
} |
protected void gererEvenements() { |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/moteur/MoteurRechercheObservationsVue.java |
---|
8,6 → 8,7 |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.Label; |
import com.google.gwt.user.client.ui.Panel; |
import com.google.gwt.user.client.ui.RadioButton; |
import com.google.gwt.user.client.ui.Widget; |
public class MoteurRechercheObservationsVue extends Composite implements MoteurRechercheObservationsPresenteur.Vue { |
24,6 → 25,9 |
@UiField |
Label ajouterObservation; |
@UiField |
RadioButton radioTout, radioDeterminer, radioConfirmer, radioDiscussion; |
public HasWidgets getZoneRecherche() { |
return zoneRecherche; |
} |
41,5 → 45,19 |
public HasClickHandlers getLienAjoutObservation() { |
return ajouterObservation; |
} |
public String getValeurRadioStatut() { |
String valeurStatut = null; |
if (radioDeterminer.getValue()) { |
valeurStatut = radioDeterminer.getFormValue(); |
} else if (radioConfirmer.getValue()) { |
valeurStatut = radioConfirmer.getFormValue(); |
} else if (radioDiscussion.getValue()) { |
valeurStatut = radioDiscussion.getFormValue(); |
} |
return valeurStatut; |
} |
} |
/trunk/src/org/tela_botanica/del/client/services/rest/ObservationService.java |
---|
5,7 → 5,7 |
public interface ObservationService { |
public void getObservations(InformationsRecherche informationsRecherche, int debut, int fin, ObservationsCallback callback); |
public void getObservations(InformationsRecherche informationsRecherche, int debut, int fin, String statut, ObservationsCallback callback); |
public void getObservation(String idObservation, |
ObservationsCallback observationsCallback); |
/trunk/src/org/tela_botanica/del/client/services/rest/ObservationServiceConcret.java |
---|
21,8 → 21,8 |
} |
@Override |
public void getObservations(InformationsRecherche infos, int debut, int fin, ObservationsCallback callback) { |
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "observations" + assemblerChaineRequete(infos, debut, fin)); |
public void getObservations(InformationsRecherche infos, int debut, int fin, String statut, ObservationsCallback callback) { |
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "observations" + assemblerChaineRequete(infos, debut, fin, statut)); |
callback.setMode(ModeRequete.LECTURE); |
try { |
rb.sendRequest(null, callback); |
31,9 → 31,12 |
} |
} |
private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) { |
private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin, String statut) { |
String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut); |
if (statut != null) { |
chaineRequete += "&masque.type=" + statut; |
} |
chaineRequete+= infos.versChaineRequete(); |
return chaineRequete; |