Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 264 Rev 268
Line 16... Line 16...
16
import org.tela_botanica.client.modeles.ReferentielNom;
16
import org.tela_botanica.client.modeles.ReferentielNom;
17
import org.tela_botanica.client.observation.ObservationMediateur;
17
import org.tela_botanica.client.observation.ObservationMediateur;
Line 18... Line 18...
18
 
18
 
19
import com.google.gwt.core.client.JavaScriptObject;
19
import com.google.gwt.core.client.JavaScriptObject;
-
 
20
import com.google.gwt.maps.client.geom.LatLng;
20
import com.google.gwt.maps.client.geom.LatLng;
21
import com.google.gwt.user.client.Timer;
-
 
22
import com.google.gwt.user.client.Window;
21
import com.google.gwt.user.client.Window;
23
import com.google.gwt.user.client.ui.ClickListener;
-
 
24
import com.google.gwt.user.client.ui.HTML;
22
import com.google.gwt.user.client.ui.HTML;
25
import com.google.gwt.user.client.ui.Widget;
23
import com.gwtext.client.core.EventCallback;
26
import com.gwtext.client.core.EventCallback;
24
import com.gwtext.client.core.EventObject;
27
import com.gwtext.client.core.EventObject;
25
import com.gwtext.client.core.Ext;
28
import com.gwtext.client.core.Ext;
-
 
29
import com.gwtext.client.core.ExtElement;
26
import com.gwtext.client.core.ExtElement;
30
import com.gwtext.client.core.Function;
27
import com.gwtext.client.core.ListenerConfig;
31
import com.gwtext.client.core.ListenerConfig;
28
import com.gwtext.client.core.Position;
32
import com.gwtext.client.core.Position;
29
import com.gwtext.client.data.ArrayReader;
33
import com.gwtext.client.data.ArrayReader;
30
import com.gwtext.client.data.FieldDef;
34
import com.gwtext.client.data.FieldDef;
Line 50... Line 54...
50
import com.gwtext.client.widgets.event.PanelListenerAdapter;
54
import com.gwtext.client.widgets.event.PanelListenerAdapter;
51
import com.gwtext.client.widgets.form.ComboBox;
55
import com.gwtext.client.widgets.form.ComboBox;
52
import com.gwtext.client.widgets.form.DateField;
56
import com.gwtext.client.widgets.form.DateField;
53
import com.gwtext.client.widgets.form.Field;
57
import com.gwtext.client.widgets.form.Field;
54
import com.gwtext.client.widgets.form.FormPanel;
58
import com.gwtext.client.widgets.form.FormPanel;
-
 
59
import com.gwtext.client.widgets.form.Label;
55
import com.gwtext.client.widgets.form.MultiFieldPanel;
60
import com.gwtext.client.widgets.form.MultiFieldPanel;
56
import com.gwtext.client.widgets.form.TextArea;
61
import com.gwtext.client.widgets.form.TextArea;
57
import com.gwtext.client.widgets.form.TextField;
62
import com.gwtext.client.widgets.form.TextField;
58
import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
63
import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
-
 
64
import com.gwtext.client.widgets.form.event.TextFieldListener;
59
import com.gwtext.client.widgets.form.event.TextFieldListenerAdapter;
65
import com.gwtext.client.widgets.form.event.TextFieldListenerAdapter;
60
import com.gwtext.client.widgets.layout.AnchorLayoutData;
66
import com.gwtext.client.widgets.layout.AnchorLayoutData;
61
import com.gwtext.client.widgets.layout.ColumnLayout;
67
import com.gwtext.client.widgets.layout.ColumnLayout;
62
import com.gwtext.client.widgets.layout.ColumnLayoutData;
68
import com.gwtext.client.widgets.layout.ColumnLayoutData;
63
import com.gwtext.client.widgets.layout.FormLayout;
69
import com.gwtext.client.widgets.layout.FormLayout;
Line 199... Line 205...
199
	private TextField latitude;
205
	private TextField latitude;
Line 200... Line 206...
200
 
206
 
Line 201... Line 207...
201
	private MultiFieldPanel coordPanel;
207
	private MultiFieldPanel coordPanel;
-
 
208
 
-
 
209
	private TextField coordonnees;
Line 202... Line 210...
202
 
210
	
Line 203... Line 211...
203
	private TextField coordonnees;
211
	private Label lienSelectionCommune = null;
Line 204... Line 212...
204
 
212
 
Line 205... Line 213...
205
	private HTML accesformulaire;
213
	private HTML accesformulaire;
Line 206... Line 214...
206
 
214
 
-
 
215
	private HTML basculerverscarto;
-
 
216
	
-
 
217
	private boolean longlatAjoutee;
-
 
218
 
Line 207... Line 219...
207
	private HTML basculerverscarto;
219
	private boolean latModifiee;
208
	
220
 
209
	private boolean longlatAjoutee;
221
	private boolean longModifiee;
210
 
222
 
Line 280... Line 292...
280
		commune.setLoadingText("Recherche...");  
292
		commune.setLoadingText("Recherche...");  
Line 281... Line 293...
281
		  
293
		  
282
		commune.setHideTrigger(true);
294
		commune.setHideTrigger(true);
Line -... Line 295...
-
 
295
		//commune.setTabIndex(1);
-
 
296
		
-
 
297
		  //création du lien "Accès carto" dans le formulaire	
-
 
298
		basculerverscarto = new HTML("");
-
 
299
		basculerverscarto = new HTML(" <a id=\"lien_carto\" href=\"#\" tabindex=\"2\">Localiser</a>");
-
 
300
		basculerverscarto.addStyleName("lien_actif");
-
 
301
		
-
 
302
		//création info bulle sur le lien "accès carto"
-
 
303
		ToolTip tip2 = new ToolTip();  
-
 
304
		tip2.setHtml("Via une carte, obtenez les coordonnées (longitude/latitude) de votre observation ");  
-
 
305
		tip2.applyTo(basculerverscarto.getElement());
-
 
306
		
283
		//commune.setTabIndex(1);
307
		//Sur une meme ligne, ajout de plusieurs champs
-
 
308
		final MultiFieldPanel htmlCommunePanel = new MultiFieldPanel();  
-
 
309
		htmlCommunePanel.addToRow(commune,new ColumnLayoutData(0.5)); 
-
 
310
		htmlCommunePanel.addToRow(basculerverscarto,100); 
-
 
311
		htmlCommunePanel.setBorder(false);
-
 
312
		htmlCommunePanel.setId("x-commune-panel"); 
Line 284... Line 313...
284
		
313
 
285
	    panneauPremierColonne.add(commune, new AnchorLayoutData("95%"));  
314
		panneauPremierColonne.add(htmlCommunePanel);
286
 
-
 
-
 
315
 
287
	    station = new TextField("Station", "station");  
316
	    station = new TextField("Station", "station");  
Line 288... Line 317...
288
	    station.setAllowBlank(true);
317
	    station.setAllowBlank(true);
289
	    //station.setTabIndex(3);
318
 
Line 290... Line 319...
290
	    panneauPremierColonne.add(station, new AnchorLayoutData("95%"));  
319
	    panneauPremierColonne.add(station, new AnchorLayoutData("95%"));  
291
	    
320
	    
-
 
321
		latitude = new TextField("X", "x", 100);
-
 
322
		latitude.setAllowBlank(true);
-
 
323
	    
-
 
324
	    longitude = new TextField("Y", "y", 100);
Line 292... Line 325...
292
		latitude = new TextField("X", "x", 100);
325
		longitude.setAllowBlank(true);
293
		latitude.setAllowBlank(true);
326
		
294
	    
327
		lienSelectionCommune = new Label();
295
	    longitude = new TextField("Y", "y", 100);
328
		lienSelectionCommune.setId("conteneur_selection_commune");
296
		longitude.setAllowBlank(true);
329
		lienSelectionCommune.setStyleName("conteneur_selection_commune");
-
 
330
			
297
			
331
		// Panneau de type plusieurs champs de formulaire sur une meme ligne, où seront renseignés X/Y
Line 298... Line 332...
298
		// Panneau de type plusieurs champs de formulaire sur une meme ligne, où seront renseignés X/Y
332
		coordPanel = new MultiFieldPanel(); 
299
		coordPanel = new MultiFieldPanel(); 
333
		coordPanel.setVisible(false);
Line 300... Line 334...
300
		coordPanel.setVisible(false);
334
		coordPanel.addToRow(latitude, new ColumnLayoutData(0.3)); 
301
		coordPanel.addToRow(latitude, new ColumnLayoutData(0.5)); 
335
		coordPanel.addToRow(longitude, new ColumnLayoutData(0.3));  
302
		coordPanel.addToRow(longitude, new ColumnLayoutData(0.5));  
336
		coordPanel.addToRow(lienSelectionCommune, new ColumnLayoutData(0.4));  
303
		coordPanel.setBorder(false);
337
		coordPanel.setBorder(false);
Line 304... Line 338...
304
		
338
		
Line 305... Line 339...
305
		  //création du champs coordonnées	
339
		  //création du champs coordonnées	
306
		referentielGeo = Configuration.getReferentielGeo();
340
		referentielGeo = Configuration.getReferentielGeo();
Line 307... Line 341...
307
		
341
		
308
		coordonnees = new TextField("Coordonnées ("+referentielGeo+")", "", 0);
342
		coordonnees = new TextField("Coordonnées", "", 0);
309
		coordonnees.setMaxLength(0);
343
		coordonnees.setMaxLength(0);
310
		coordonnees.setReadOnly(true);
344
		coordonnees.setReadOnly(true);
Line 337... Line 371...
337
					lienCarto.removeAllListeners();
371
					lienCarto.removeAllListeners();
338
					lienCarto.addListener("click", new EventCallback() {
372
					lienCarto.addListener("click", new EventCallback() {
Line 339... Line 373...
339
 
373
 
Line 340... Line -...
340
						public void execute(EventObject e) {
-
 
341
							
374
						public void execute(EventObject e) {
342
							if(coordonneesValides() == null) {
375
							
343
								if(commune.getValue() != null && !commune.getValue().equals("")) {
376
							if(commune.getValue() != null && !commune.getValue().equals("")) {
344
									obtenirInformationCommune();
377
								obtenirInformationCommune();
345
									longlatAjoutee = true;
-
 
346
						
-
 
347
								} else {
-
 
348
									Window.alert("Veuillez renseigner au moins une commune ou des coordonnées pour la géolocalisation");
378
								longlatAjoutee = true;
349
								}
379
					
350
							} else {
380
							} else {
351
								obtenirInformationCoord();
381
								Window.alert("Veuillez renseigner une commune à préciser");
352
							}
382
							}
353
						}
383
						}
Line 354... Line 384...
354
					});
384
					});
355
				}
-
 
356
 
385
				}
357
			});
-
 
358
			
-
 
359
			
-
 
360
			  //création du lien "Accès carto" dans le formulaire			
-
 
361
			basculerverscarto = new HTML(" <a id=\"lien_carto\" href=\"#\" tabindex=\"6\">Selection depuis une carte</a>");
-
 
362
			basculerverscarto.addStyleName("lien");
-
 
363
			
-
 
364
			//création info bulle sur le lien "accès carto"
-
 
365
			ToolTip tip2 = new ToolTip();  
-
 
366
			tip2.setHtml("Via une carte, obtenez les coordonnées (longitude/latitude) de votre observation ");  
386
 
367
			tip2.applyTo(basculerverscarto.getElement());
387
			});
368
			
388
						
369
			//Sur une meme ligne, ajout de plusieurs champs
-
 
370
			final MultiFieldPanel htmlPanel = new MultiFieldPanel();  
389
			//Sur une meme ligne, ajout de plusieurs champs
371
			htmlPanel.addToRow(coordonnees, 100); 
390
			final MultiFieldPanel htmlPanel = new MultiFieldPanel();  
372
			htmlPanel.addToRow(basculerverscarto, new ColumnLayoutData(0.5)); 
391
			htmlPanel.addToRow(coordonnees, 100); 
Line 373... Line 392...
373
			htmlPanel.addToRow(accesformulaire, new ColumnLayoutData(0.5)); 
392
			htmlPanel.addToRow(accesformulaire, new ColumnLayoutData(0.5)); 
Line 447... Line 466...
447
		bt = new Toolbar() ;
466
		bt = new Toolbar() ;
448
		bt.addSpacer() ;
467
		bt.addSpacer() ;
449
		bt.addText("Mode de saisie ") ;
468
		bt.addText("Mode de saisie ") ;
450
		bt.addField(selecteurMode) ;
469
		bt.addField(selecteurMode) ;
Line 451... Line -...
451
		
-
 
452
		boutonOK.setTabIndex(8);
-
 
453
		boutonAnnuler.setTabIndex(9);
-
 
Line 454... Line 470...
454
		
470
		
455
		
471
		
456
		if (Ext.isIE6()) {
472
		if (Ext.isIE6()) {
457
			panneauPremierColonne.setButtonAlign(Position.RIGHT);
473
			panneauPremierColonne.setButtonAlign(Position.RIGHT);
Line 500... Line 516...
500
	}
516
	}
Line 501... Line 517...
501
	
517
	
502
	private void ajouterListeners()
518
	private void ajouterListeners()
503
	{	
519
	{	
-
 
520
		// Listener completion communne 
Line 504... Line 521...
504
		// Listener completion communne 
521
		final Rafraichissable r = this;
505
		
522
		
506
		   commune.addListener(new ComboBoxListenerAdapter() {  
523
		   commune.addListener(new ComboBoxListenerAdapter() {  
507
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
524
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
Line 798... Line 815...
798
						commModifie = true;
815
						commModifie = true;
799
					}
816
					}
800
				}
817
				}
801
		    });
818
		    });
Line -... Line 819...
-
 
819
			
-
 
820
			tCoord = new Timer() {
-
 
821
 
-
 
822
				public void run() {
-
 
823
    	        	double[] coord = coordonneesValides();
-
 
824
    	        	if(!rechercheCommuneEnCours && coord != null && (longModifiee || latModifiee)) {
-
 
825
    	        		rechercheCommuneEnCours = true;
-
 
826
    	        		Ext.get(lienSelectionCommune.getElement()).mask("recherche");
-
 
827
    	        		observationMediateur.obtenirInformationCoord(r,LatLng.newInstance(coord[0], coord[1]));
-
 
828
    	        	}
-
 
829
				}
-
 
830
				
-
 
831
			};
802
			
832
			
Line 803... Line 833...
803
			latitude.addKeyPressListener(new EventCallback() {
833
			latitude.addKeyPressListener(new EventCallback() {
804
 
834
 
805
				public void execute(EventObject e) {
835
				public void execute(EventObject e) {
Line 824... Line 854...
824
	  	    	    		validerSaisie(Champs.LATITUDE); 	    	    		 
854
	  	    	    		validerSaisie(Champs.LATITUDE); 	    	    		 
825
	  	    	    	  break;
855
	  	    	    	  break;
Line 826... Line 856...
826
 
856
 
827
		    	        default:
857
		    	        default:
-
 
858
						latModifiee = true;
-
 
859
	    	        	tCoord.cancel();
828
						latModifiee = true;
860
	    	        	tCoord.schedule(250);
829
					}
861
					}
830
				}
862
				}
Line 831... Line 863...
831
		    });
863
		    });
Line 832... Line 864...
832
			
864
			
833
			longitude.addKeyPressListener(new EventCallback() {
865
			longitude.addKeyPressListener(new EventCallback() {
-
 
866
 
834
 
867
				public void execute(EventObject e) {
835
				public void execute(EventObject e) {
868
					switch(e.getKey()) { 
836
					switch(e.getKey()) { 
869
					
837
						case KEY_ALT:
870
						case KEY_ALT:
838
			    	      case KEY_CTRL:
871
			    	      case KEY_CTRL:
Line 843... Line 876...
843
			    	      case KEY_LEFT:
876
			    	      case KEY_LEFT:
844
			    	      case KEY_PAGEDOWN:
877
			    	      case KEY_PAGEDOWN:
845
			    	      case KEY_PAGEUP:
878
			    	      case KEY_PAGEUP:
846
			    	      case KEY_RIGHT:
879
			    	      case KEY_RIGHT:
847
			    	      case KEY_SHIFT:
880
			    	      case KEY_SHIFT:
848
			    	      case KEY_TAB:
-
 
849
			    	      case KEY_UP:
881
			    	      case KEY_UP:
850
		    	    	
-
 
-
 
882
			    	      case KEY_TAB:
851
		    	        break;
883
			    	      break;
852
		    	        
884
			    	      
853
			    	      case KEY_ENTER:	  	    	    	  
885
			    	      case KEY_ENTER:	  	    	    	  
854
		  	    	    		validerSaisie(Champs.LONGITUDE); 	    	    		 
886
		  	    	    		validerSaisie(Champs.LONGITUDE); 	    	    		 
855
		  	    	    	  break;
887
		  	    	    	break;
Line 856... Line 888...
856
 
888
 
857
		    	        default:
889
		    	        default:
-
 
890
							longModifiee = true;
-
 
891
		    	        	tCoord.cancel();
858
						longModifiee = true;
892
		    	        	tCoord.schedule(250);
859
					}
893
					}
860
				}
894
				}
Line 861... Line -...
861
		    });
-
 
862
 
-
 
863
		  
895
		    });
Line 864... Line 896...
864
 
896
 
Line 865... Line 897...
865
		boutonOK.addListener(new ButtonListenerAdapter() {
897
		boutonOK.addListener(new ButtonListenerAdapter() {
Line 892... Line 924...
892
				}
924
				}
893
				else
925
				else
894
				{
926
				{
895
					raz();
927
					raz();
896
				}
928
				}
897
				
-
 
898
				
-
 
899
			}
929
			}
Line 900... Line 930...
900
			
930
			
Line 901... Line 931...
901
		});
931
		});
Line 1057... Line 1087...
1057
			}
1087
			}
Line 1058... Line 1088...
1058
			
1088
			
1059
			if(nouvelleDonnees instanceof EntiteGeographiqueObservation)
1089
			if(nouvelleDonnees instanceof EntiteGeographiqueObservation)
1060
			{
1090
			{
-
 
1091
				EntiteGeographiqueObservation infosComm = (EntiteGeographiqueObservation)nouvelleDonnees ;
-
 
1092
				if(rechercheCommuneEnCours) {
-
 
1093
					afficherIndicationCommune(infosComm);
1061
				EntiteGeographiqueObservation infosComm = (EntiteGeographiqueObservation)nouvelleDonnees ;
1094
				} else {
-
 
1095
					rafraichirCommuneEtCoord(infosComm);
1062
				rafraichirCommuneEtCoord(infosComm);
1096
				}
Line 1063... Line 1097...
1063
			}
1097
			}
Line -... Line 1098...
-
 
1098
 
1064
 
1099
	}
Line 1065... Line 1100...
1065
	}
1100
	
-
 
1101
	
-
 
1102
	private void afficherIndicationCommune(
-
 
1103
			final EntiteGeographiqueObservation infosCom) {
-
 
1104
		
-
 
1105
		String nCommune = "";
-
 
1106
		if(infosCom != null && !infosCom.getCommune().trim().equals("")){
-
 
1107
			nCommune += infosCom.getCommune();
-
 
1108
			if(!infosCom.getIdLocalite().trim().equals(""))
-
 
1109
			nCommune += " ("+infosCom.getIdLocalite()+")";
-
 
1110
		}
-
 
1111
		lienSelectionCommune.setHtml("<a id=\"lien_selection_commune\" tabindex=\"9\">"+nCommune+"</a>");
-
 
1112
		lienSelectionCommune.setStyleName("img-curseur-depl");
-
 
1113
		Ext.get("lien_selection_commune").addListener("click",new EventCallback() {
-
 
1114
			public void execute(EventObject e) {
-
 
1115
				rafraichirCommune(infosCom);
-
 
1116
			}			
-
 
1117
		});
-
 
1118
		
-
 
1119
		Ext.get("lien_selection_commune").addListener("keypress",new EventCallback() {
-
 
1120
			public void execute(EventObject e) {
-
 
1121
				if(e.getCharCode() == KEY_ENTER) {
-
 
1122
					rafraichirCommune(infosCom);
-
 
1123
				}
-
 
1124
			}			
-
 
1125
		});
-
 
1126
		
-
 
1127
		Ext.get("lien_selection_commune").addListener("focus",new EventCallback() {
-
 
1128
			public void execute(EventObject e) {
-
 
1129
				Ext.get("lien_selection_commune").toggleClass("lien_sel");
-
 
1130
			}			
-
 
1131
		});
-
 
1132
		
-
 
1133
		Ext.get("lien_selection_commune").addListener("blur",new EventCallback() {
-
 
1134
			public void execute(EventObject e) {
-
 
1135
				Ext.get("lien_selection_commune").toggleClass("lien_sel");
-
 
1136
			}			
-
 
1137
		});
-
 
1138
 
-
 
1139
		Ext.get(lienSelectionCommune.getElement()).unmask();
-
 
1140
		rechercheCommuneEnCours = false;
-
 
1141
		latModifiee = false;
Line 1066... Line 1142...
1066
	
1142
		longModifiee = false;
1067
	
1143
	}
1068
	private void rafraichirCommuneEtCoord(EntiteGeographiqueObservation infosCom) {
1144
	
Line 1069... Line 1145...
1069
		
1145
	private void rafraichirCommune(EntiteGeographiqueObservation infosCom) {
1070
		String nCommune = "";
1146
		String nCommune = "";
1071
 
1147
 
1072
		
1148
		
1073
		if(infosCom.getCommune() != null && !infosCom.getCommune().equals("")) {
-
 
1074
			nCommune += infosCom.getCommune();
1149
		if(infosCom.getCommune() != null && !infosCom.getCommune().equals("")) {
-
 
1150
			nCommune += infosCom.getCommune();
-
 
1151
		}
-
 
1152
		
-
 
1153
		if(infosCom.getIdLocalite() != null && !infosCom.getIdLocalite().equals("")) {
-
 
1154
			nCommune += " ("+infosCom.getIdLocalite()+")";
Line 1075... Line 1155...
1075
		}
1155
			departement = infosCom.getIdLocalite();
1076
		
1156
		}
1077
		if(infosCom.getIdLocalite() != null && !infosCom.getIdLocalite().equals("")) {
1157
		commune.setValue(nCommune);
Line 1089... Line 1169...
1089
			longitude.setValue(infosCom.getLon());
1169
			longitude.setValue(infosCom.getLon());
1090
		}
1170
		}
Line 1091... Line 1171...
1091
		
1171
		
Line 1092... Line 1172...
1092
		coordPanel.setVisible(true);
1172
		coordPanel.setVisible(true);
1093
		
1173
		
1094
		latModifiee = true;
1174
		latModifiee = false;
Line 1095... Line 1175...
1095
		longModifiee = true;
1175
		longModifiee = false;
Line 1096... Line 1176...
1096
	}
1176
	}
1097
 
1177
 
Line 1098... Line 1178...
1098
	public void obtenirListeReferentielCommune() {
1178
	public void obtenirListeReferentielCommune() {
Line 1099... Line 1179...
1099
		
1179
		
Line 1417... Line 1497...
1417
 
1497
 
1418
 
1498
 
1419
			case COMMUNE:
1499
			case COMMUNE:
-
 
1500
				commune.reset() ;
-
 
1501
				departement ="";
1420
				commune.reset() ;
1502
				latitude.reset();
Line 1421... Line 1503...
1421
				departement ="";
1503
				longitude.reset();
1422
				break;
1504
				break;
1423
				
1505
				
1424
			case ESPECE:
1506
			case ESPECE:
1425
				espece.reset();
1507
				espece.reset();
Line 1426... Line 1508...
1426
				numeroNom = "" ;
1508
				numeroNom = "" ;
1427
				numeroOrdre = "";
1509
				numeroOrdre = "";
-
 
1510
				break;
1428
				break;
1511
				
Line 1429... Line 1512...
1429
				
1512
			case LATITUDE:
1430
			case LATITUDE:
1513
				latitude.reset();
-
 
1514
				afficherIndicationCommune(null);
1431
				latitude.reset();
1515
				break;
Line 1432... Line 1516...
1432
				break;
1516
				
1433
				
1517
			case LONGITUDE:
1434
			case LONGITUDE:
1518
				longitude.reset();
Line 1447... Line 1531...
1447
				longitude.reset();
1531
				longitude.reset();
1448
				departement ="";
1532
				departement ="";
1449
				espece.reset();
1533
				espece.reset();
1450
				numeroNom = "" ;
1534
				numeroNom = "" ;
1451
				numeroOrdre = "";
1535
				numeroOrdre = "";
-
 
1536
				afficherIndicationCommune(null);
1452
				break;
1537
				break;
Line 1453... Line 1538...
1453
 
1538
 
Line 1454... Line 1539...
1454
		}
1539
		}
Line 1586... Line 1671...
1586
	public void saisieTabindex()
1671
	public void saisieTabindex()
1587
	{
1672
	{
Line 1588... Line 1673...
1588
		
1673
		
1589
		selecteurMode.setTabIndex(0);
1674
		selecteurMode.setTabIndex(0);
1590
		commune.setTabIndex(1);
1675
		commune.setTabIndex(1);
1591
		lieudit.setTabIndex(2);
1676
		lieudit.setTabIndex(3);
1592
		station.setTabIndex(3);
1677
		station.setTabIndex(4);
1593
		milieu.setTabIndex(4);
1678
		milieu.setTabIndex(5);
1594
		coordonnees.setTabIndex(-1);
1679
		coordonnees.setTabIndex(-1);
Line 1595... Line 1680...
1595
		coordonnees.addListener(new TextFieldListenerAdapter() {
1680
		coordonnees.addListener(new TextFieldListenerAdapter() {
1596
 
1681
 
Line 1601... Line 1686...
1601
					Ext.get("lien_carto").focus();
1686
					Ext.get("lien_carto").focus();
1602
				}
1687
				}
1603
			}	
1688
			}	
1604
		});
1689
		});
Line 1605... Line 1690...
1605
			
1690
			
1606
		latitude.setTabIndex(8);
1691
		latitude.setTabIndex(7);
1607
		longitude.setTabIndex(9);
1692
		longitude.setTabIndex(8);
1608
		comment.setTabIndex(10);
1693
		comment.setTabIndex(10);
1609
		date.setTabIndex(11);
1694
		date.setTabIndex(11);
1610
		espece.setTabIndex(12);
1695
		espece.setTabIndex(12);
1611
		boutonOK.setTabIndex(13);
1696
		boutonOK.setTabIndex(13);
Line 1691... Line 1776...
1691
		}
1776
		}
Line 1692... Line 1777...
1692
		
1777
		
1693
		return departement;
1778
		return departement;
Line 1694... Line -...
1694
	}
-
 
1695
	
1779
	}
1696
	/*private Field obtenirCorrespondanceChampsEnum(Champs champ) {
-
 
1697
		switch(champ) {
-
 
1698
    	case DATE:
-
 
1699
    		return date;
-
 
1700
    		
1780
	
1701
    	case COMMUNE:
1781
	public String getCommune() {
1702
    		return commune;
-
 
1703
    	
-
 
1704
		case LIEUDIT:
1782
		return commune.getValue();
1705
			return lieudit;
-
 
1706
    	
1783
	}
1707
		case STATION:
-
 
1708
			return station;
-
 
1709
    	
1784
	
1710
		case MILIEU:
1785
	public String getDepartement() {
1711
			return milieu;
-
 
1712
    	
-
 
1713
		case COMMENT:
1786
		return obtenirDepartementAPartirChampCommune();
1714
			return comment;
-
 
1715
    	
1787
	}
1716
    	case ESPECE:
-
 
1717
    		return espece;
1788
 
1718
    	}
1789
	public boolean communeInitialisee() {
1719
		return null;
1790
		return communeModifiee;