Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 389 Rev 391
Line 23... Line 23...
23
import com.google.gwt.user.client.ui.HTML;
23
import com.google.gwt.user.client.ui.HTML;
24
import com.gwtext.client.core.EventCallback;
24
import com.gwtext.client.core.EventCallback;
25
import com.gwtext.client.core.EventObject;
25
import com.gwtext.client.core.EventObject;
26
import com.gwtext.client.core.Ext;
26
import com.gwtext.client.core.Ext;
27
import com.gwtext.client.core.ExtElement;
27
import com.gwtext.client.core.ExtElement;
-
 
28
import com.gwtext.client.core.Function;
28
import com.gwtext.client.core.ListenerConfig;
29
import com.gwtext.client.core.ListenerConfig;
29
import com.gwtext.client.core.Position;
30
import com.gwtext.client.core.Position;
30
import com.gwtext.client.data.ArrayReader;
31
import com.gwtext.client.data.ArrayReader;
31
import com.gwtext.client.data.FieldDef;
32
import com.gwtext.client.data.FieldDef;
32
import com.gwtext.client.data.MemoryProxy;
33
import com.gwtext.client.data.MemoryProxy;
Line 304... Line 305...
304
	    station = new TextField("Station", "station");  
305
	    station = new TextField("Station", "station");  
305
	    station.setAllowBlank(true);
306
	    station.setAllowBlank(true);
Line 306... Line 307...
306
 
307
 
Line 307... Line 308...
307
	    panneauPremierColonne.add(station, new AnchorLayoutData("95%"));  
308
	    panneauPremierColonne.add(station, new AnchorLayoutData("95%"));  
308
	    
309
	    
309
		latitude = new TextField("X", "x");
310
		latitude = new TextField("Lat", "x");
Line 310... Line 311...
310
		latitude.setGrowMax(70);
311
		latitude.setGrowMax(70);
311
		latitude.setAllowBlank(true);
312
		latitude.setAllowBlank(true);
312
	    
313
	    
Line 313... Line 314...
313
	    longitude = new TextField("Y", "y");
314
	    longitude = new TextField("Lon", "y");
Line 342... Line 343...
342
		coordonnees.setMaxLength(0);
343
		coordonnees.setMaxLength(0);
343
		coordonnees.setReadOnly(true);
344
		coordonnees.setReadOnly(true);
344
		coordonnees.setCls("fieldname");
345
		coordonnees.setCls("fieldname");
Line 345... Line 346...
345
		
346
		
346
		//création du lien "saisie X/Y" dans le formulaire
347
		//création du lien "saisie X/Y" dans le formulaire
347
		accesformulaire = new HTML("<a id=\"lien_coord\" href=\"#\" tabindex=\"6\">Saisie X/Y ("+referentielGeo+")</a>");
348
		accesformulaire = new HTML("<a id=\"lien_coord\" href=\"#\" tabindex=\"6\">Saisie Lat/Lon ("+referentielGeo+")</a>");
348
		accesformulaire.setWidth("100%");
349
		accesformulaire.setWidth("100%");
Line 349... Line 350...
349
		accesformulaire.addStyleName("lien_actif");
350
		accesformulaire.addStyleName("lien_actif");
350
			
351
			
351
		//création info bulle sur le lien "saisie X/Y"
352
		//création info bulle sur le lien "saisie X/Y"
352
			ToolTip tip1 = new ToolTip();  
353
			ToolTip tip1 = new ToolTip();  
Line 353... Line 354...
353
			tip1.setHtml("X / Y sont les longitudes / latitudes, à remplir en degrés décimaux");  
354
			tip1.setHtml("Lat / Lon sont les longitudes / latitudes, à remplir en degrés décimaux");  
Line 354... Line 355...
354
			tip1.applyTo(accesformulaire.getElement());
355
			tip1.applyTo(accesformulaire.getElement());
Line 452... Line 453...
452
	    panneauSecondeColonne.add(milieu,  new AnchorLayoutData("95%"));
453
	    panneauSecondeColonne.add(milieu,  new AnchorLayoutData("95%"));
Line 453... Line 454...
453
	    
454
	    
454
	    comment = new TextArea("Notes", "comment");  
455
	    comment = new TextArea("Notes", "comment");  
455
	    comment.setAllowBlank(true);
456
	    comment.setAllowBlank(true);
-
 
457
	    comment.setHeight(50);
456
	    comment.setHeight(50);
458
	    
457
	    //comment.setTabIndex(7);
459
	    //comment.setTabIndex(7);
Line 458... Line 460...
458
	    panneauSecondeColonne.add(comment, new AnchorLayoutData("95%") );
460
	    panneauSecondeColonne.add(comment, new AnchorLayoutData("95%") );
459
	    
461
	    
Line 1188... Line 1190...
1188
		commune.setValue(nCommune);
1190
		commune.setValue(nCommune);
1189
		communeModifiee = true;
1191
		communeModifiee = true;
1190
	}
1192
	}
Line 1191... Line 1193...
1191
 
1193
 
1192
	private void rafraichirCommuneEtCoord(EntiteGeographiqueObservation infosCom) {
1194
	private void rafraichirCommuneEtCoord(EntiteGeographiqueObservation infosCom) {
-
 
1195
		;
-
 
1196
		// on ne remplace la commune que si le champ était vide
1193
		
1197
		if(commune.getRawValue() == null || commune.getRawValue().equals("")) {
-
 
1198
			rafraichirCommune(infosCom);
Line 1194... Line 1199...
1194
		rafraichirCommune(infosCom);
1199
		} 
1195
 
1200
 
1196
		if(infosCom.getLat() != null && !infosCom.getLat().equals("")) {
1201
		if(infosCom.getLat() != null && !infosCom.getLat().equals("")) {
Line 1497... Line 1502...
1497
		
1502
		
1498
		if(!obs.getCoordonneeX().equals("null") && !obs.getCoordonneeX().equals("000null")
1503
		if(!obs.getCoordonneeX().equals("null") && !obs.getCoordonneeX().equals("000null")
1499
				&& !obs.getCoordonneeY().equals("null") && !obs.getCoordonneeY().equals("000null")) {
1504
				&& !obs.getCoordonneeY().equals("null") && !obs.getCoordonneeY().equals("000null")) {
1500
			latitude.setValue(obs.getCoordonneeX()) ;
1505
			latitude.setValue(obs.getCoordonneeX()) ;
1501
			longitude.setValue(obs.getCoordonneeY()) ;
1506
			longitude.setValue(obs.getCoordonneeY()) ;
1502
		}	
1507
		}
Line 1503... Line 1508...
1503
	}
1508
	}
1504
	
1509
	
Line 1747... Line 1752...
1747
	
1752
	
1748
	private void obtenirInformationCommune() {
1753
	private void obtenirInformationCommune() {
1749
		observationMediateur.obtenirInformationCommune(commune.getValue(), obtenirDepartementAPartirChampCommune());
1754
		observationMediateur.obtenirInformationCommune(commune.getValue(), obtenirDepartementAPartirChampCommune());
Line 1750... Line 1755...
1750
	}
1755
	}
Line 1751... Line 1756...
1751
	
1756
	
Line 1752... Line 1757...
1752
	private double[] coordonneesValides() {
1757
	public double[] coordonneesValides() {
1753
		
1758