128,8 → 128,26 |
vue.masquerDateAscendant(); |
vue.masquerTagAscendant(); |
vue.masquerTagDescendant(); |
|
initialiserAPartirInfosCache(); |
} |
|
private void initialiserAPartirInfosCache() { |
InformationsRecherche infos = CacheClient.getInstance().getInformationsRechercheImage(); |
if(infos.getTriParDate() != ModeTri.PAS_DE_TRI) { |
mettreAJourAffichageTriDate(); |
} |
|
if(infos.getTriParNbVotes() != ModeTri.PAS_DE_TRI) { |
mettreAJourAffichageTriVote(); |
} |
|
if(infos.getTriParNbTags() != ModeTri.PAS_DE_TRI) { |
mettreAjourAffichageTriTag(); |
} |
|
} |
|
public void gererEvenements() { |
ClickHandler surClicTriVote = new ClickHandler() { |
@Override |
177,6 → 195,15 |
} |
|
protected void surClicTriTag() { |
mettreAjourAffichageTriTag(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
informationsRechercheImages.setTriParNbTags(triCourantTag); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
|
private void mettreAjourAffichageTriTag() { |
vue.masquerDateDescendant(); |
vue.masquerDateAscendant(); |
vue.masquerVoteDescendant(); |
190,14 → 217,20 |
vue.masquerTagDescendant(); |
vue.afficherTagAscendant(); |
} |
} |
|
public void surClicTriVote() { |
mettreAJourAffichageTriVote(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
informationsRechercheImages.setTriParNbTags(triCourantTag); |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId(); |
informationsRechercheImages.setTriParNbVotes(triCourantVote); |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + ""); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
|
public void surClicTriVote() { |
private void mettreAJourAffichageTriVote() { |
vue.masquerDateDescendant(); |
vue.masquerDateAscendant(); |
vue.masquerTagAscendant(); |
211,16 → 244,20 |
vue.masquerVoteDescendant(); |
vue.afficherVoteAscendant(); |
} |
} |
|
public void surClicTriDate() { |
mettreAJourAffichageTriDate(); |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId(); |
informationsRechercheImages.setTriParNbVotes(triCourantVote); |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + ""); |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParDate(triCourantDate); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
|
public void surClicTriDate() { |
private void mettreAJourAffichageTriDate() { |
vue.masquerTagAscendant(); |
vue.masquerTagDescendant(); |
vue.masquerVoteDescendant(); |
vue.masquerVoteAscendant(); |
if (triCourantDate == ModeTri.TRI_ASCENDANT) { |
232,11 → 269,6 |
vue.masquerDateDescendant(); |
vue.afficherDateAscendant(); |
} |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage(); |
informationsRechercheImages.setTriParDate(triCourantDate); |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI); |
chargerEtAfficherImagesPageEnCours(); |
} |
|
public void rechercherImagesEtCreerWidgetPagination() { |
324,6 → 356,7 |
final int debut = (CacheClient.getInstance().getPageCouranteRechercheImage() - 1) * CacheClient.getInstance().getPasPagination(); |
final int fin = (CacheClient.getInstance().getPageCouranteRechercheImage()) * CacheClient.getInstance().getPasPagination(); |
chargerEtAfficherImages(debut, fin); |
CacheClient.getInstance().mettreAjourUrlCourante(); |
} |
|
public Vue getVue() { |