Subversion Repositories eFlore/Applications.del

Rev

Rev 491 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 491 Rev 509
Line 9... Line 9...
9
import org.tela_botanica.del.client.composants.pagination.PaginationVue;
9
import org.tela_botanica.del.client.composants.pagination.PaginationVue;
10
import org.tela_botanica.del.client.modeles.Image;
10
import org.tela_botanica.del.client.modeles.Image;
11
import org.tela_botanica.del.client.modeles.ImageServiceResultat;
11
import org.tela_botanica.del.client.modeles.ImageServiceResultat;
12
import org.tela_botanica.del.client.modeles.InformationsRecherche;
12
import org.tela_botanica.del.client.modeles.InformationsRecherche;
13
import org.tela_botanica.del.client.modeles.ModeTri;
13
import org.tela_botanica.del.client.modeles.ModeTri;
-
 
14
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
-
 
15
import org.tela_botanica.del.client.navigation.evenement.changementprotocole.EvenementChangementProtocole;
-
 
16
import org.tela_botanica.del.client.navigation.evenement.changementprotocole.GestionnaireEvenementChangementProtocole;
14
import org.tela_botanica.del.client.services.rest.ImageService;
17
import org.tela_botanica.del.client.services.rest.ImageService;
15
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
18
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
16
import org.tela_botanica.del.client.vues.rechercheimages.resultats.images.ImagePresenteur;
19
import org.tela_botanica.del.client.vues.rechercheimages.resultats.images.ImagePresenteur;
17
import org.tela_botanica.del.client.vues.rechercheimages.resultats.images.ImageVue;
20
import org.tela_botanica.del.client.vues.rechercheimages.resultats.images.ImageVue;
Line 73... Line 76...
73
		vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
76
		vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
Line 74... Line 77...
74
 
77
 
75
			@Override
78
			@Override
76
			public void onClick(ClickEvent arg0) {
79
			public void onClick(ClickEvent arg0) {
-
 
80
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
77
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
81
				int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
-
 
82
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
78
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
83
				informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole+"");
79
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
84
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
80
				chargerEtAfficherImagesPageEnCours();
85
				chargerEtAfficherImagesPageEnCours();
81
			}
86
			}
Line 82... Line 87...
82
		});
87
		});
Line 83... Line 88...
83
 
88
 
84
		vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
89
		vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
85
 
90
 
-
 
91
			@Override
86
			@Override
92
			public void onClick(ClickEvent arg0) {
-
 
93
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
87
			public void onClick(ClickEvent arg0) {
94
				int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
88
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
95
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
89
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
96
				informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole+"");
90
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
97
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
Line 111... Line 118...
111
				informationsRechercheImages.setTriParDate(ModeTri.TRI_DESCENDANT);
118
				informationsRechercheImages.setTriParDate(ModeTri.TRI_DESCENDANT);
112
				informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
119
				informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
113
				chargerEtAfficherImagesPageEnCours();
120
				chargerEtAfficherImagesPageEnCours();
114
			}
121
			}
115
		});
122
		});
-
 
123
		
-
 
124
		BusEvenementiel.getInstance().addHandler(EvenementChangementProtocole.TYPE, new GestionnaireEvenementChangementProtocole() {
-
 
125
			@Override
-
 
126
			public void onChangementProtocole(EvenementChangementProtocole event) {
-
 
127
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
-
 
128
				if(informationsRechercheImages.getTriParNbVotes() != ModeTri.PAS_DE_TRI) {
-
 
129
					informationsRechercheImages.setIdProtocoleSelectionne(event.getProtocole().getId()+"");
-
 
130
					chargerEtAfficherImagesPageEnCours();
-
 
131
				}
-
 
132
			}
-
 
133
		});
116
	}
134
	}
Line 117... Line 135...
117
 
135
 
Line 118... Line 136...
118
	public void rechercherImagesEtCreerWidgetPagination() {
136
	public void rechercherImagesEtCreerWidgetPagination() {