/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/resultats/ResultatsRechercheObservationsVue.ui.xml |
---|
8,15 → 8,17 |
<ui:style src="ResultatsRechercheObservations.css" /> |
<g:HTMLPanel> |
<g:HTMLPanel ui:field="zoneTri" styleName="{style.zoneTri}"> |
<g:HTMLPanel ui:field="triParDate" styleName="gauche"> |
<g:Label text="{constants.triParDate}" styleName="gauche"/> |
<g:Button title="{constants.triParDateAscendant}" ui:field="triParDateAscendant" styleName="{style.boutonTriAsc} gauche" /> |
<g:Button title="{constants.triParDateDescendant}" ui:field="triParDateDescendant" styleName="{style.boutonTriDesc} gauche" /> |
<g:HTMLPanel styleName="{style.barreNavigation}"> |
<g:VerticalPanel ui:field="zonePaginationHaut" styleName="gauche" /> |
<g:HTMLPanel ui:field="zoneTri" styleName="droite {style.zoneTri} petit"> |
<g:HTMLPanel ui:field="triParDate" styleName="gauche"> |
<g:Label text="{constants.triParDate}" styleName="gauche {style.date}" ui:field="labelDate"/> |
<g:Button title="{constants.triParDateAscendant}" ui:field="triParDateAscendant" styleName="{style.boutonTriAsc} gauche" /> |
<g:Button title="{constants.triParDateDescendant}" ui:field="triParDateDescendant" styleName="{style.boutonTriDesc} gauche" /> |
</g:HTMLPanel> |
</g:HTMLPanel> |
</g:HTMLPanel> |
</g:HTMLPanel> |
<g:HTMLPanel> |
<g:VerticalPanel ui:field="zonePaginationHaut" /> |
<g:VerticalPanel ui:field="panneauChargement"> |
<g:Image url="./img/wait.gif"></g:Image> |
</g:VerticalPanel> |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/resultats/ResultatsRechercheObservationsPresenteur.java |
---|
18,6 → 18,7 |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
import com.google.gwt.user.client.ui.Label; |
public class ResultatsRechercheObservationsPresenteur extends Presenteur { |
44,13 → 45,26 |
public void afficherElementsAucunResultatTrouve(); |
public void afficherElementsResultatsTrouves(); |
public Label getLabelDate(); |
public void masquerDateAscendant(); |
public void masquerDateDescendant(); |
public void afficherDateAscendant(); |
public void afficherDateDescendant(); |
} |
private Vue vue; |
private ModeTri triCourantDate = ModeTri.TRI_ASCENDANT; |
public ResultatsRechercheObservationsPresenteur(ObservationService serviceObs, Vue vue) { |
this.vue = vue; |
this.serviceObs = serviceObs; |
vue.masquerDateAscendant(); |
vue.masquerDateDescendant(); |
} |
public void go(HasWidgets composite) { |
61,27 → 75,26 |
protected void gererEvenements() { |
vue.getTriParDateAscendant().addClickHandler(new ClickHandler() { |
vue.getLabelDate().addClickHandler(new ClickHandler() { |
@Override |
public void onClick(ClickEvent arg0) { |
public void onClick(ClickEvent event) { |
if (triCourantDate == ModeTri.TRI_ASCENDANT) { |
triCourantDate = ModeTri.TRI_DESCENDANT; |
vue.masquerDateAscendant(); |
vue.afficherDateDescendant(); |
} else { |
triCourantDate = ModeTri.TRI_ASCENDANT; |
vue.masquerDateDescendant(); |
vue.afficherDateAscendant(); |
} |
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation(); |
informationsRechercheObservations.setTriParDate(ModeTri.TRI_ASCENDANT); |
informationsRechercheObservations.setTriParDate(triCourantDate); |
informationsRechercheObservations.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
chercherEtAfficherObservationsPageEnCours(); |
} |
}); |
vue.getTriParDateDescendant().addClickHandler(new ClickHandler() { |
@Override |
public void onClick(ClickEvent arg0) { |
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation(); |
informationsRechercheObservations.setTriParDate(ModeTri.TRI_DESCENDANT); |
informationsRechercheObservations.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
chercherEtAfficherObservationsPageEnCours(); |
} |
}); |
} |
public void chargerEtAfficherObservations(int debut, int fin) { |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/resultats/ResultatsRechercheObservationsVue.java |
---|
28,7 → 28,7 |
Button triParDateAscendant, triParDateDescendant; |
@UiField |
Label aucunResultat; |
Label aucunResultat, labelDate; |
// Constructeur de la vue |
public ResultatsRechercheObservationsVue() { |
91,4 → 91,29 |
public Button getTriParDateDescendant() { |
return triParDateDescendant; |
} |
@Override |
public Label getLabelDate() { |
return labelDate; |
} |
@Override |
public void masquerDateAscendant() { |
triParDateAscendant.setVisible(false); |
} |
@Override |
public void masquerDateDescendant() { |
triParDateDescendant.setVisible(false); |
} |
@Override |
public void afficherDateAscendant() { |
triParDateAscendant.setVisible(true); |
} |
@Override |
public void afficherDateDescendant() { |
triParDateDescendant.setVisible(true); |
} |
} |
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/resultats/ResultatsRechercheObservations.css |
---|
1,11 → 1,30 |
.zoneObservation { |
width: 100%; |
clear: left; |
margin-top: 10px |
margin-top: 10px; |
} |
.zoneTri {float:right} |
.barreNavigation { |
max-width: 810px; |
margin-top: 0; |
padding-bottom: 20px; |
} |
.votes { |
padding-left: 10px; |
cursor: pointer; |
} |
.date { |
padding-left: 10px; |
cursor: pointer; |
} |
.zoneTri { |
padding-left: 10px; |
} |
.boutonTriAsc, .boutonTriDesc { |
border:none; |
cursor:pointer; |