Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1565 → Rev 1566

/trunk/src/org/tela_botanica/del/client/vues/pictoflora/resultats/ResultatPictofloraVue.ui.xml
19,6 → 19,11
<g:Button title="{constants.triParNbVotesAscendant}" ui:field="triParNbVotesAscendant" styleName="{style.boutonTriAsc} gauche" />
<g:Button title="{constants.triParNbVotesDescendant}" ui:field="triParNbVotesDescendant" styleName="{style.boutonTriDesc} gauche" />
</g:HTMLPanel>
<g:HTMLPanel ui:field="triParPoints" styleName="gauche">
<g:Label text="{constants.triParNbPoints}" styleName="gauche {style.votes}" ui:field="labelPoints"/>
<g:Button title="{constants.triParNbPointsAscendant}" ui:field="triParPointsAscendant" styleName="{style.boutonTriAsc} gauche" />
<g:Button title="{constants.triParNbPointsDescendant}" ui:field="triParPointsDescendant" styleName="{style.boutonTriDesc} gauche" />
</g:HTMLPanel>
<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" />
/trunk/src/org/tela_botanica/del/client/vues/pictoflora/resultats/ResultatPictofloraPresenteur.java
58,6 → 58,10
 
public HasClickHandlers getTriParNbVotesDescendant();
 
public HasClickHandlers getTriParPointsAscendant();
 
public HasClickHandlers getTriParPointsDescendant();
 
public HasClickHandlers getTriParDateAscendant();
 
public HasClickHandlers getTriParDateDescendant();
83,8 → 87,6
public void afficherVoteDescendant();
 
public HasClickHandlers getLabelDate();
public HasClickHandlers getLabelTag();
 
public void masquerDateAscendant();
 
93,6 → 95,8
public void afficherDateAscendant();
 
public void afficherDateDescendant();
public HasClickHandlers getLabelTag();
 
public void masquerTagAscendant();
 
102,6 → 106,16
 
public void afficherTagAscendant();
 
public HasClickHandlers getLabelPoints();
 
public void afficherPointsAscendant();
 
public void afficherPointsDescendant();
 
public void masquerPointsAscendant();
 
public void masquerPointsDescendant();
 
}
 
private Vue vue;
108,6 → 122,7
private ImageService imageService;
private final ProtocoleService protocoleService;
private ModeTri triCourantVote = ModeTri.TRI_ASCENDANT;
private ModeTri triCourantPoints = ModeTri.TRI_ASCENDANT;
private ModeTri triCourantDate = ModeTri.TRI_DESCENDANT;
private ModeTri triCourantTag = ModeTri.TRI_DESCENDANT;
 
128,6 → 143,8
vue.masquerDateAscendant();
vue.masquerTagAscendant();
vue.masquerTagDescendant();
vue.masquerPointsAscendant();
vue.masquerPointsDescendant();
initialiserAPartirInfosCache();
}
160,6 → 177,17
vue.getTriParNbVotesAscendant().addClickHandler(surClicTriVote);
vue.getTriParNbVotesDescendant().addClickHandler(surClicTriVote);
 
ClickHandler surClicTriPoints = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
surClicTriPoints();
}
};
 
vue.getLabelPoints().addClickHandler(surClicTriPoints);
vue.getTriParPointsAscendant().addClickHandler(surClicTriPoints);
vue.getTriParPointsDescendant().addClickHandler(surClicTriPoints);
 
ClickHandler surClicTriDate = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
200,6 → 228,7
informationsRechercheImages.setTriParNbTags(triCourantTag);
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
208,6 → 237,8
vue.masquerDateAscendant();
vue.masquerVoteDescendant();
vue.masquerVoteAscendant();
vue.masquerPointsAscendant();
vue.masquerPointsDescendant();
if (triCourantTag == ModeTri.TRI_ASCENDANT) {
triCourantTag = ModeTri.TRI_DESCENDANT;
vue.masquerTagAscendant();
227,6 → 258,7
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
235,6 → 267,8
vue.masquerDateAscendant();
vue.masquerTagAscendant();
vue.masquerTagDescendant();
vue.masquerPointsAscendant();
vue.masquerPointsDescendant();
if (triCourantVote == ModeTri.TRI_ASCENDANT) {
triCourantVote = ModeTri.TRI_DESCENDANT;
vue.masquerVoteAscendant();
246,6 → 280,36
}
}
 
public void surClicTriPoints() {
mettreAJourAffichageTriPoints();
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
informationsRechercheImages.setTriParNbPoints(triCourantPoints);
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
private void mettreAJourAffichageTriPoints() {
vue.masquerDateDescendant();
vue.masquerDateAscendant();
vue.masquerTagAscendant();
vue.masquerTagDescendant();
vue.masquerVoteAscendant();
vue.masquerVoteDescendant();
if (triCourantPoints == ModeTri.TRI_ASCENDANT) {
triCourantPoints = ModeTri.TRI_DESCENDANT;
vue.masquerPointsAscendant();
vue.afficherPointsDescendant();
} else {
triCourantPoints = ModeTri.TRI_ASCENDANT;
vue.masquerPointsDescendant();
vue.afficherPointsAscendant();
}
}
 
public void surClicTriDate() {
mettreAJourAffichageTriDate();
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
252,6 → 316,7
informationsRechercheImages.setTriParDate(triCourantDate);
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
260,6 → 325,8
vue.masquerTagDescendant();
vue.masquerVoteDescendant();
vue.masquerVoteAscendant();
vue.masquerPointsAscendant();
vue.masquerPointsDescendant();
if (triCourantDate == ModeTri.TRI_ASCENDANT) {
triCourantDate = ModeTri.TRI_DESCENDANT;
vue.masquerDateAscendant();
/trunk/src/org/tela_botanica/del/client/vues/pictoflora/resultats/ResultatPictofloraVue.java
3,23 → 3,15
import java.util.ArrayList;
import java.util.List;
 
import org.tela_botanica.del.client.modeles.Protocole;
 
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.NodeList;
import com.google.gwt.dom.client.OptionElement;
import com.google.gwt.dom.client.SelectElement;
import com.google.gwt.event.dom.client.HasChangeHandlers;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;
 
45,13 → 37,13
HTMLPanel imageTable;
 
@UiField
Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant, triParNbTagsAscendant, triParNbTagsDescendant;
Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant, triParNbTagsAscendant, triParNbTagsDescendant, triParPointsAscendant, triParPointsDescendant;
 
@UiField
Label aucunResultat;
@UiField
Label labelVote, labelDate, labelTag;
Label labelVote, labelDate, labelTag, labelPoints;
// Constructeur
148,6 → 140,14
public Button getTriParDateDescendant() {
return triParDateDescendant;
}
 
public Button getTriParPointsAscendant() {
return triParPointsAscendant;
}
 
public Button getTriParPointsDescendant() {
return triParPointsDescendant;
}
 
@Override
174,8 → 174,33
public void afficherVoteDescendant() {
triParNbVotesDescendant.setVisible(true);
}
 
@Override
public Label getLabelPoints() {
return labelPoints;
}
@Override
public void afficherPointsAscendant() {
triParPointsAscendant.setVisible(true);
}
@Override
public void afficherPointsDescendant() {
triParPointsDescendant.setVisible(true);
}
@Override
public void masquerPointsAscendant() {
triParPointsAscendant.setVisible(false);
}
@Override
public void masquerPointsDescendant() {
triParPointsDescendant.setVisible(false);
}
@Override
public Label getLabelDate() {
return labelDate;
}