54,9 → 54,9 |
|
public HasWidgets getPanneauPaginationHaut(); |
|
public HasClickHandlers getTriParNbVotesAscendant(); |
public HasClickHandlers getTriParMoyenneArithmetiqueAscendant(); |
|
public HasClickHandlers getTriParNbVotesDescendant(); |
public HasClickHandlers getTriParMoyenneArithmetiqueDescendant(); |
|
public HasClickHandlers getTriParPointsAscendant(); |
|
76,15 → 76,15 |
|
public HTMLPanel getImageTable(); |
|
public HasClickHandlers getLabelVote(); |
public HasClickHandlers getLabelMoyenneArithmetique(); |
|
public void masquerVoteAscendant(); |
public void masquerMoyenneArithmetiqueAscendant(); |
|
public void masquerVoteDescendant(); |
public void masquerMoyenneArithmetiqueDescendant(); |
|
public void afficherVoteAscendant(); |
public void afficherMoyenneArithmetiqueAscendant(); |
|
public void afficherVoteDescendant(); |
public void afficherMoyenneArithmetiqueDescendant(); |
|
public HasClickHandlers getLabelDate(); |
|
121,7 → 121,7 |
private Vue vue; |
private ImageService imageService; |
private final ProtocoleService protocoleService; |
private ModeTri triCourantVote = ModeTri.TRI_ASCENDANT; |
private ModeTri triCourantMoyenneArithmetique = ModeTri.TRI_ASCENDANT; |
private ModeTri triCourantPoints = ModeTri.TRI_ASCENDANT; |
private ModeTri triCourantDate = ModeTri.TRI_DESCENDANT; |
private ModeTri triCourantTag = ModeTri.TRI_DESCENDANT; |
137,8 → 137,8 |
vue.startChargement(); |
rechercherImagesEtCreerWidgetPagination(); |
gererEvenements(); |
vue.masquerVoteDescendant(); |
vue.masquerVoteAscendant(); |
vue.masquerMoyenneArithmetiqueDescendant(); |
vue.masquerMoyenneArithmetiqueAscendant(); |
vue.masquerDateDescendant(); |
vue.masquerDateAscendant(); |
vue.masquerTagAscendant(); |
151,31 → 151,30 |
|
private void initialiserAPartirInfosCache() { |
InformationsRecherche infos = CacheClient.getInstance().getInformationsRechercheImage(); |
if(infos.getTriParDate() != ModeTri.PAS_DE_TRI) { |
if (infos.getTriParDate() != ModeTri.PAS_DE_TRI) { |
mettreAJourAffichageTriDate(); |
} |
|
if(infos.getTriParNbVotes() != ModeTri.PAS_DE_TRI) { |
mettreAJourAffichageTriVote(); |
if (infos.getTriParMoyenneArithmetique() != ModeTri.PAS_DE_TRI) { |
mettreAJourAffichageTriMoyenneArithmetique(); |
} |
|
if(infos.getTriParNbTags() != ModeTri.PAS_DE_TRI) { |
if (infos.getTriParNbTags() != ModeTri.PAS_DE_TRI) { |
mettreAjourAffichageTriTag(); |
} |
|
} |
|
public void gererEvenements() { |
ClickHandler surClicTriVote = new ClickHandler() { |
ClickHandler surClicTriMoyenneArithmetique = new ClickHandler() { |
@Override |
public void onClick(ClickEvent event) { |
surClicTriVote(); |
surClicTriMoyenneArithmetique(); |
} |
}; |
|
vue.getLabelVote().addClickHandler(surClicTriVote); |
vue.getTriParNbVotesAscendant().addClickHandler(surClicTriVote); |
vue.getTriParNbVotesDescendant().addClickHandler(surClicTriVote); |
vue.getLabelMoyenneArithmetique().addClickHandler(surClicTriMoyenneArithmetique); |
vue.getTriParMoyenneArithmetiqueAscendant().addClickHandler(surClicTriMoyenneArithmetique); |
vue.getTriParMoyenneArithmetiqueDescendant().addClickHandler(surClicTriMoyenneArithmetique); |
|
ClickHandler surClicTriPoints = new ClickHandler() { |
@Override |
214,7 → 213,7 |
@Override |
public void onChangementProtocole(EvenementChangementProtocole event) { |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
if (informationsRechercheImages.getTriParNbVotes() != ModeTri.PAS_DE_TRI) { |
if (informationsRechercheImages.getTriParMoyenneArithmetique() != ModeTri.PAS_DE_TRI) { |
informationsRechercheImages.setIdProtocoleSelectionne(event.getProtocole().getId() + ""); |
chargerEtAfficherImagesPageEnCours(); |
} |
223,11 → 222,12 |
} |
|
protected void surClicTriTag() { |
triCourantTag = (triCourantTag == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT; |
mettreAjourAffichageTriTag(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
informationsRechercheImages.setTriParNbTags(triCourantTag); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
235,26 → 235,25 |
private void mettreAjourAffichageTriTag() { |
vue.masquerDateDescendant(); |
vue.masquerDateAscendant(); |
vue.masquerVoteDescendant(); |
vue.masquerVoteAscendant(); |
vue.masquerMoyenneArithmetiqueDescendant(); |
vue.masquerMoyenneArithmetiqueAscendant(); |
vue.masquerPointsAscendant(); |
vue.masquerPointsDescendant(); |
if (triCourantTag == ModeTri.TRI_ASCENDANT) { |
triCourantTag = ModeTri.TRI_DESCENDANT; |
vue.masquerTagDescendant(); |
vue.afficherTagAscendant(); |
} else { |
vue.masquerTagAscendant(); |
vue.afficherTagDescendant(); |
} else { |
triCourantTag = ModeTri.TRI_ASCENDANT; |
vue.masquerTagDescendant(); |
vue.afficherTagAscendant(); |
} |
} |
|
public void surClicTriVote() { |
mettreAJourAffichageTriVote(); |
public void surClicTriMoyenneArithmetique() { |
triCourantMoyenneArithmetique = (triCourantMoyenneArithmetique == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT; |
mettreAJourAffichageTriMoyenneArithmetique(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId(); |
informationsRechercheImages.setTriParNbVotes(triCourantVote); |
informationsRechercheImages.setTriParMoyenneArithmetique(triCourantMoyenneArithmetique); |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + ""); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
262,7 → 261,7 |
chargerEtAfficherImagesPageEnCours(); |
} |
|
private void mettreAJourAffichageTriVote() { |
private void mettreAJourAffichageTriMoyenneArithmetique() { |
vue.masquerDateDescendant(); |
vue.masquerDateAscendant(); |
vue.masquerTagAscendant(); |
269,18 → 268,17 |
vue.masquerTagDescendant(); |
vue.masquerPointsAscendant(); |
vue.masquerPointsDescendant(); |
if (triCourantVote == ModeTri.TRI_ASCENDANT) { |
triCourantVote = ModeTri.TRI_DESCENDANT; |
vue.masquerVoteAscendant(); |
vue.afficherVoteDescendant(); |
if (triCourantMoyenneArithmetique == ModeTri.TRI_ASCENDANT) { |
vue.masquerMoyenneArithmetiqueDescendant(); |
vue.afficherMoyenneArithmetiqueAscendant(); |
} else { |
triCourantVote = ModeTri.TRI_ASCENDANT; |
vue.masquerVoteDescendant(); |
vue.afficherVoteAscendant(); |
vue.masquerMoyenneArithmetiqueAscendant(); |
vue.afficherMoyenneArithmetiqueDescendant(); |
} |
} |
|
public void surClicTriPoints() { |
triCourantPoints = (triCourantPoints == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT; |
mettreAJourAffichageTriPoints(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId(); |
288,7 → 286,7 |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + ""); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
|
297,24 → 295,23 |
vue.masquerDateAscendant(); |
vue.masquerTagAscendant(); |
vue.masquerTagDescendant(); |
vue.masquerVoteAscendant(); |
vue.masquerVoteDescendant(); |
vue.masquerMoyenneArithmetiqueAscendant(); |
vue.masquerMoyenneArithmetiqueDescendant(); |
if (triCourantPoints == ModeTri.TRI_ASCENDANT) { |
triCourantPoints = ModeTri.TRI_DESCENDANT; |
vue.masquerPointsDescendant(); |
vue.afficherPointsAscendant(); |
} else { |
vue.masquerPointsAscendant(); |
vue.afficherPointsDescendant(); |
} else { |
triCourantPoints = ModeTri.TRI_ASCENDANT; |
vue.masquerPointsDescendant(); |
vue.afficherPointsAscendant(); |
} |
} |
|
public void surClicTriDate() { |
triCourantDate = (triCourantDate == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT; |
mettreAJourAffichageTriDate(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
informationsRechercheImages.setTriParDate(triCourantDate); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
323,18 → 320,16 |
private void mettreAJourAffichageTriDate() { |
vue.masquerTagAscendant(); |
vue.masquerTagDescendant(); |
vue.masquerVoteDescendant(); |
vue.masquerVoteAscendant(); |
vue.masquerMoyenneArithmetiqueDescendant(); |
vue.masquerMoyenneArithmetiqueAscendant(); |
vue.masquerPointsAscendant(); |
vue.masquerPointsDescendant(); |
if (triCourantDate == ModeTri.TRI_ASCENDANT) { |
triCourantDate = ModeTri.TRI_DESCENDANT; |
vue.masquerDateDescendant(); |
vue.afficherDateAscendant(); |
} else { |
vue.masquerDateAscendant(); |
vue.afficherDateDescendant(); |
} else { |
triCourantDate = ModeTri.TRI_ASCENDANT; |
vue.masquerDateDescendant(); |
vue.afficherDateAscendant(); |
} |
} |
|