Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1214 Rev 1282
Line 82... Line 82...
82
		public void activerLiens();
82
		public void activerLiens();
Line 83... Line 83...
83
		
83
		
Line 84... Line 84...
84
		public void activerLienAuteur();
84
		public void activerLienAuteur();
-
 
85
		
-
 
86
		public HasClickHandlers getLienIdentiplante();
85
		
87
 
Line 86... Line 88...
86
		public HasClickHandlers getLienIdentiplante();
88
		void desactiverLienAuteur();
87
	}
89
	}
88
 
90
 
Line 140... Line 142...
140
 
142
 
141
	@Override
143
	@Override
Line 142... Line 144...
142
	protected void gererEvenements() {
144
	protected void gererEvenements() {
143
		
-
 
144
		if (this.avecLiens) {
-
 
145
		vue.getLienAuteur().addClickHandler(new ClickHandler() {
-
 
146
 
-
 
147
			@Override
-
 
148
			public void onClick(ClickEvent arg0) {
-
 
149
				
145
		
150
				InformationsRecherche informationsRecherche = new InformationsRecherche();
146
		if (this.avecLiens) {
151
				informationsRecherche.setAuteur(vue.getAuteur().getText());
-
 
152
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
153
				History.fireCurrentHistoryState();
-
 
Line 154... Line -...
154
			}
-
 
155
		});
-
 
156
		
147
			if(!observation.getIdAuteur().equals("0")) {
157
		vue.getLienDateReleve().addClickHandler(new ClickHandler() {
148
				vue.getLienAuteur().addClickHandler(new ClickHandler() {
158
 
-
 
159
			@Override
-
 
160
			public void onClick(ClickEvent arg0) {
-
 
161
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
162
				informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
163
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
164
				History.fireCurrentHistoryState();
-
 
165
			}
-
 
166
		});
149
		
167
 
-
 
168
		vue.getLienDateTransmission().addClickHandler(new ClickHandler() {
-
 
169
 
150
					@Override
170
			@Override
151
					public void onClick(ClickEvent arg0) {
171
			public void onClick(ClickEvent arg0) {
-
 
172
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
173
				informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
174
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
175
				History.fireCurrentHistoryState();
-
 
176
			}
-
 
177
		});
-
 
178
 
-
 
179
		vue.getLienFamille().addClickHandler(new ClickHandler() {
-
 
180
 
-
 
181
			@Override
-
 
182
			public void onClick(ClickEvent arg0) {
-
 
183
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
184
				informationsRecherche.setFamille(vue.getFamille().getText());
-
 
185
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
186
				History.fireCurrentHistoryState();
-
 
187
			}
-
 
188
		});
-
 
189
 
-
 
190
		vue.getLienLocalite().addClickHandler(new ClickHandler() {
-
 
191
 
-
 
192
			@Override
-
 
193
			public void onClick(ClickEvent arg0) {
-
 
194
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
195
				informationsRecherche.setCommune(vue.getLocalite().getText());
-
 
196
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
197
				History.fireCurrentHistoryState();
-
 
198
			}
-
 
199
		});
-
 
200
 
-
 
201
		vue.getLienMotsClefs().addClickHandler(new ClickHandler() {
-
 
202
 
-
 
203
			@Override
-
 
204
			public void onClick(ClickEvent arg0) {
-
 
205
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
206
				informationsRecherche.setMotClef(vue.getMotsClefs().getText());
-
 
207
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
208
				History.fireCurrentHistoryState();
-
 
209
			}
-
 
210
		});
-
 
211
 
-
 
212
		vue.getLienNomCommun().addClickHandler(new ClickHandler() {
-
 
213
 
-
 
214
			@Override
-
 
215
			public void onClick(ClickEvent arg0) {
-
 
216
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
217
				informationsRecherche.setRechercheLibre(vue.getNomCommun().getText());
-
 
218
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
219
				History.fireCurrentHistoryState();
-
 
220
			}
-
 
221
		});
-
 
222
 
-
 
223
		vue.getLienNomRetenu().addClickHandler(new ClickHandler() {
-
 
224
 
-
 
225
			@Override
-
 
226
			public void onClick(ClickEvent arg0) {
152
						
227
				InformationsRecherche informationsRecherche = new InformationsRecherche();
153
						InformationsRecherche informationsRecherche = new InformationsRecherche();
228
				informationsRecherche.setRechercheLibre(vue.getNomRetenu().getText());
154
						informationsRecherche.setAuteur(vue.getAuteur().getText());
229
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
155
						setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
230
				History.fireCurrentHistoryState();
-
 
231
			}
-
 
232
		});
-
 
233
 
-
 
234
		vue.getLienMilieu().addClickHandler(new ClickHandler() {
-
 
235
 
-
 
236
			@Override
-
 
237
			public void onClick(ClickEvent arg0) {
-
 
238
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
239
				informationsRecherche.setRechercheLibre(vue.getMilieu().getText());
-
 
240
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
241
				History.fireCurrentHistoryState();
-
 
242
			}
-
 
243
		});
-
 
244
 
-
 
245
		vue.getLienCommentaire().addClickHandler(new ClickHandler() {
-
 
246
 
-
 
247
			@Override
-
 
248
			public void onClick(ClickEvent arg0) {
-
 
249
				InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
250
				informationsRecherche.setRechercheLibre(vue.getCommentaire().getText());
-
 
251
				setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
252
				History.fireCurrentHistoryState();
-
 
253
			}
-
 
254
		});
-
 
255
 
-
 
256
		final Observation monobservation = this.observation;
-
 
257
		vue.getLienIdentiplante().addClickHandler(new ClickHandler() {
-
 
258
			
-
 
259
			@Override
-
 
260
			public void onClick(ClickEvent event) {
156
						History.fireCurrentHistoryState();
261
				CacheClient.getInstance().setObservationCourante(monobservation);
-
 
Line -... Line 157...
-
 
157
					}
-
 
158
				});
-
 
159
			}
-
 
160
		
-
 
161
			vue.getLienDateReleve().addClickHandler(new ClickHandler() {
-
 
162
	
-
 
163
				@Override
-
 
164
				public void onClick(ClickEvent arg0) {
-
 
165
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
166
					informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
167
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
168
					History.fireCurrentHistoryState();
-
 
169
				}
-
 
170
			});
-
 
171
	
-
 
172
			vue.getLienDateTransmission().addClickHandler(new ClickHandler() {
-
 
173
	
-
 
174
				@Override
-
 
175
				public void onClick(ClickEvent arg0) {
-
 
176
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
177
					informationsRecherche.setDate(vue.getDateReleve().getText());
-
 
178
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
179
					History.fireCurrentHistoryState();
-
 
180
				}
-
 
181
			});
-
 
182
	
-
 
183
			vue.getLienFamille().addClickHandler(new ClickHandler() {
-
 
184
	
-
 
185
				@Override
-
 
186
				public void onClick(ClickEvent arg0) {
-
 
187
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
188
					informationsRecherche.setFamille(vue.getFamille().getText());
-
 
189
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
190
					History.fireCurrentHistoryState();
-
 
191
				}
-
 
192
			});
-
 
193
	
-
 
194
			vue.getLienLocalite().addClickHandler(new ClickHandler() {
-
 
195
	
-
 
196
				@Override
-
 
197
				public void onClick(ClickEvent arg0) {
-
 
198
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
199
					informationsRecherche.setCommune(vue.getLocalite().getText());
-
 
200
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
201
					History.fireCurrentHistoryState();
-
 
202
				}
-
 
203
			});
-
 
204
	
-
 
205
			vue.getLienMotsClefs().addClickHandler(new ClickHandler() {
-
 
206
	
-
 
207
				@Override
-
 
208
				public void onClick(ClickEvent arg0) {
-
 
209
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
210
					informationsRecherche.setMotClef(vue.getMotsClefs().getText());
-
 
211
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
212
					History.fireCurrentHistoryState();
-
 
213
				}
262
				BusEvenementiel.getInstance().fireEvent(new EvenementValidation(monobservation));
214
			});
-
 
215
	
-
 
216
			vue.getLienNomCommun().addClickHandler(new ClickHandler() {
-
 
217
	
-
 
218
				@Override
-
 
219
				public void onClick(ClickEvent arg0) {
-
 
220
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
221
					informationsRecherche.setRechercheLibre(vue.getNomCommun().getText());
-
 
222
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
223
					History.fireCurrentHistoryState();
-
 
224
				}
263
			}
225
			});
-
 
226
	
-
 
227
			vue.getLienNomRetenu().addClickHandler(new ClickHandler() {
-
 
228
	
-
 
229
				@Override
-
 
230
				public void onClick(ClickEvent arg0) {
-
 
231
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
232
					informationsRecherche.setRechercheLibre(vue.getNomRetenu().getText());
-
 
233
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
264
		});
234
					History.fireCurrentHistoryState();
-
 
235
				}
-
 
236
			});
-
 
237
	
-
 
238
			vue.getLienMilieu().addClickHandler(new ClickHandler() {
-
 
239
	
-
 
240
				@Override
-
 
241
				public void onClick(ClickEvent arg0) {
-
 
242
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
243
					informationsRecherche.setRechercheLibre(vue.getMilieu().getText());
-
 
244
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
245
					History.fireCurrentHistoryState();
-
 
246
				}
-
 
247
			});
-
 
248
	
-
 
249
			vue.getLienCommentaire().addClickHandler(new ClickHandler() {
-
 
250
	
-
 
251
				@Override
-
 
252
				public void onClick(ClickEvent arg0) {
-
 
253
					InformationsRecherche informationsRecherche = new InformationsRecherche();
-
 
254
					informationsRecherche.setRechercheLibre(vue.getCommentaire().getText());
-
 
255
					setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
-
 
256
					History.fireCurrentHistoryState();
-
 
257
				}
-
 
258
			});
265
		
259
	
266
		vue.activerLiens();
260
			final Observation monobservation = this.observation;
267
		} else {
261
			vue.getLienIdentiplante().addClickHandler(new ClickHandler() {
268
			vue.getLienAuteur().addClickHandler(new ClickHandler() {
262
				
269
				@Override
263
				@Override
270
				public void onClick(ClickEvent event) {
264
				public void onClick(ClickEvent event) {
Line -... Line 265...
-
 
265
					CacheClient.getInstance().setObservationCourante(monobservation);
-
 
266
					BusEvenementiel.getInstance().fireEvent(new EvenementValidation(monobservation));
-
 
267
				}
-
 
268
			});
-
 
269
			
-
 
270
			vue.activerLiens();
-
 
271
			
-
 
272
			if(observation.getIdAuteur().equals("0")) {
-
 
273
				vue.desactiverLienAuteur();
-
 
274
			}
-
 
275
		} else {
-
 
276
			if(!observation.getIdAuteur().equals("0")) {
-
 
277
				vue.getLienAuteur().addClickHandler(new ClickHandler() {
-
 
278
					@Override
-
 
279
					public void onClick(ClickEvent event) {
271
					Config config = new Config();
280
						Config config = new Config();
-
 
281
						Window.open(config.getUrl("annuaire") + observation.getIdAuteur(), "Consultation de l'annuaire", null);
272
					Window.open(config.getUrl("annuaire") + observation.getIdAuteur(), "Consultation de l'annuaire", null);
282
					}
273
				}
283
				});
Line 274... Line 284...
274
			});
284