Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 590 → Rev 591

/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/ResultatRechercheImageVue.ui.xml
13,14 → 13,15
<g:HTMLPanel styleName="gauche {style.protocoles}">
<g:ListBox ui:field="listeProtocoles" />
</g:HTMLPanel>
<g:HTMLPanel ui:field="zoneTri" styleName="gauche {style.zoneTri}">
<g:HTMLPanel ui:field="zoneTri" styleName="gauche {style.zoneTri} petit">
<g:Label text="{constants.tri}" styleName="gauche"/>
<g:HTMLPanel ui:field="triParNbVotes" styleName="gauche">
<g:Label text="{constants.triParNbVotes}" styleName="gauche"/>
<g:Label text="{constants.triParNbVotes}" styleName="gauche {style.votes}" ui:field="labelVote"/>
<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="triParDate" styleName="gauche">
<g:Label text="{constants.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>
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/ResultatRechercheImagePresenteur.java
74,9 → 74,27
 
public void selectionnerProtocole(int index);
public HasClickHandlers getLabelVote();
public void masquerVoteAscendant();
 
public void masquerVoteDescendant();
public void afficherVoteAscendant();
public void afficherVoteDescendant();
public HasClickHandlers getLabelDate();
public void masquerDateAscendant();
 
public void masquerDateDescendant();
public void afficherDateAscendant();
public void afficherDateDescendant();
}
 
// new ResultatRechercheImageVue();
private Vue vue;
private ImageService imageService;
83,8 → 101,9
private final ProtocoleService protocoleService = MockDatasource.getInstance();
private List<Protocole> protocoles;
 
// TODO : passer ça en cache
private String protocoleParDefaut = Protocole.ESTHETISME;
private ModeTri triCourantVote = ModeTri.TRI_ASCENDANT;
private ModeTri triCourantDate = ModeTri.TRI_ASCENDANT;
public ResultatRechercheImagePresenteur(ImageService imageService, Vue vue) {
this.vue = vue;
97,6 → 116,10
rechercherImagesEtCreerWidgetPagination();
gererEvenements();
chargerProtocoles();
vue.masquerVoteDescendant();
vue.masquerVoteAscendant();
vue.masquerDateDescendant();
vue.masquerDateAscendant();
}
 
public void gererEvenements() {
109,54 → 132,60
}
});
vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
 
vue.getLabelVote().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
public void onClick(ClickEvent event) {
vue.masquerDateDescendant();
vue.masquerDateAscendant();
if (triCourantVote == ModeTri.TRI_ASCENDANT) {
triCourantVote = ModeTri.TRI_DESCENDANT;
vue.masquerVoteAscendant();
vue.afficherVoteDescendant();
} else {
triCourantVote = ModeTri.TRI_ASCENDANT;
vue.masquerVoteDescendant();
vue.afficherVoteAscendant();
}
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
informationsRechercheImages.setTriParNbVotes(triCourantVote);
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
});
 
vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
 
vue.getLabelDate().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
public void onClick(ClickEvent event) {
vue.masquerVoteDescendant();
vue.masquerVoteAscendant();
if (triCourantDate == ModeTri.TRI_ASCENDANT) {
triCourantDate = ModeTri.TRI_DESCENDANT;
vue.masquerDateAscendant();
vue.afficherDateDescendant();
} else {
triCourantDate = ModeTri.TRI_ASCENDANT;
vue.masquerDateDescendant();
vue.afficherDateAscendant();
}
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
});
 
vue.getTriParDateAscendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParDate(ModeTri.TRI_ASCENDANT);
informationsRechercheImages.setTriParDate(triCourantDate);
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
});
 
vue.getTriParDateDescendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParDate(ModeTri.TRI_DESCENDANT);
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
chargerEtAfficherImagesPageEnCours();
}
});
 
BusEvenementiel.getInstance().addHandler(EvenementChangementProtocole.TYPE, new GestionnaireEvenementChangementProtocole() {
@Override
public void onChangementProtocole(EvenementChangementProtocole event) {
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/ResultatRechercheImageVue.java
41,7 → 41,7
Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant;
 
@UiField
Label aucunResultat;
Label aucunResultat, labelVote, labelDate;
@UiField
ListBox listeProtocoles;
166,4 → 166,53
return listeProtocoles.getSelectedIndex();
}
 
@Override
public Label getLabelVote() {
return labelVote;
}
 
@Override
public void masquerVoteAscendant() {
triParNbVotesAscendant.setVisible(false);
}
@Override
public void masquerVoteDescendant() {
triParNbVotesDescendant.setVisible(false);
}
@Override
public void afficherVoteAscendant() {
triParNbVotesAscendant.setVisible(true);
}
@Override
public void afficherVoteDescendant() {
triParNbVotesDescendant.setVisible(true);
}
@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/rechercheimages/resultats/ResultatRechercheImage.css
3,16 → 3,29
}
 
.barreNavigation {
max-width:810px;
margin-top:-15px;
padding-bottom:20px
max-width: 810px;
margin-top: -15px;
padding-bottom: 20px
}
 
.votes {
padding-left: 10px;
cursor: pointer;
}
 
.date {
padding-left: 10px;
cursor: pointer;
}
 
.zoneTri {
padding-left:10px;
padding-left: 10px;
}
 
.protocoles {
padding-left:10px;
padding-left: 10px;
}
 
.paginationHaut {
}
28,7 → 41,6
margin: 0 20px 40px 0px
}
 
 
.boutonTriAsc,.boutonTriDesc {
border: none;
cursor: pointer;
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.properties
47,9 → 47,10
#ecran recherche image
rechercherImage = Rechercher une image
entrerMotClef = Recherchez par espèce, genre, famille, numéro ou nom de département, commune, auteur ou mot-clé.
rechercherTaxon = Rechercher le taxon
triParNbVotes = Tri par nombre de votes
triParDate = Tri par date
rechercherTaxon = Rechercher le taxon
tri = Tri :
triParNbVotes = Votes
triParDate = Date
triParNbVotesAscendant = Tri par nombre de votes du maximum au minimum
triParDateAscendant = Tri par date du plus ancien au plus récent
triParNbVotesDescendant = Tri par nombre de votes du minimum au maximum
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.java
718,11 → 718,11
String rechercherObservation();
 
/**
* Translated "Rechercher le taxon ".
* Translated "Rechercher le taxon".
*
* @return translated "Rechercher le taxon "
* @return translated "Rechercher le taxon"
*/
@DefaultStringValue("Rechercher le taxon ")
@DefaultStringValue("Rechercher le taxon")
@Key("rechercherTaxon")
String rechercherTaxon();
 
781,11 → 781,20
String transmisLe();
 
/**
* Translated "Tri par date".
* Translated "Tri ".
*
* @return translated "Tri par date"
* @return translated "Tri "
*/
@DefaultStringValue("Tri par date")
@DefaultStringValue("Tri ")
@Key("tri")
String tri();
 
/**
* Translated "Date".
*
* @return translated "Date"
*/
@DefaultStringValue("Date")
@Key("triParDate")
String triParDate();
 
808,11 → 817,11
String triParDateDescendant();
 
/**
* Translated "Tri par nombre de votes".
* Translated "Votes".
*
* @return translated "Tri par nombre de votes"
* @return translated "Votes"
*/
@DefaultStringValue("Tri par nombre de votes")
@DefaultStringValue("Votes")
@Key("triParNbVotes")
String triParNbVotes();