Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3434 Rev 3532
Line 2... Line 2...
2
 * Constructeur WidgetSaisie par défaut
2
 * Constructeur WidgetSaisie par défaut
3
 */
3
 */
4
function WidgetSaisie( proprietes ) {
4
function WidgetSaisie( proprietes ) {
5
	if  ( valOk(proprietes) ) {
5
	if  ( valOk(proprietes) ) {
6
		this.urlWidgets                        = proprietes.urlWidgets;
6
		this.urlWidgets                        = proprietes.urlWidgets;
7
		this.module                            = proprietes.nomSquelette;
7
		this.projet                            = proprietes.projet;
8
		this.tagsProjet                        = proprietes.tagsProjet;
8
		this.idProjet                          = proprietes.idProjet;
-
 
9
		this.tagsMotsCles                      = proprietes.tagsMotsCles;
9
		this.mode                              = proprietes.mode;
10
		this.mode                              = proprietes.mode;
10
		this.langue                            = proprietes.langue;
11
		this.langue                            = proprietes.langue;
11
		this.serviceAnnuaireIdUrl              = proprietes.serviceAnnuaireIdUrl;
12
		this.serviceAnnuaireIdUrl              = proprietes.serviceAnnuaireIdUrl;
12
		this.serviceNomCommuneUrl              = proprietes.serviceNomCommuneUrl;
13
		this.serviceNomCommuneUrl              = proprietes.serviceNomCommuneUrl;
13
		this.serviceNomCommuneUrlAlt           = proprietes.serviceNomCommuneUrlAlt;
14
		this.serviceNomCommuneUrlAlt           = proprietes.serviceNomCommuneUrlAlt;
Line 364... Line 365...
364
WidgetSaisie.prototype.locationHandler = function( location ) {
365
WidgetSaisie.prototype.locationHandler = function( location ) {
365
	var locDatas = location.originalEvent.detail;
366
	var locDatas = location.originalEvent.detail;
Line 366... Line 367...
366
 
367
 
367
	if ( this.valOk( locDatas ) ) {
368
	if ( this.valOk( locDatas ) ) {
-
 
369
		console.log( locDatas );
368
		console.log( locDatas );
370
		var geometry      = locDatas.geometry;
369
		var altitude      = ( this.valOk( locDatas.elevation ) ) ? locDatas.elevation : '';
371
		var altitude      = ( this.valOk( locDatas.elevation ) ) ? locDatas.elevation : '';
370
		var pays          = ( this.valOk( locDatas.osmCountryCode ) ) ? locDatas.osmCountryCode.toUpperCase() : 'FR';
372
		var pays          = ( this.valOk( locDatas.osmCountryCode ) ) ? locDatas.osmCountryCode.toUpperCase() : 'FR';
371
		var latitude      = '';
373
		var latitude      = '';
372
		var longitude     = '';
374
		var longitude     = '';
Line 398... Line 400...
398
		} else if ( this.valOk( locDatas.locality ) ) {
400
		} else if ( this.valOk( locDatas.locality ) ) {
399
			nomCommune = locDatas.locality;
401
			nomCommune = locDatas.locality;
400
		} else if ( this.valOk( locDatas.locality ) ) {
402
		} else if ( this.valOk( locDatas.locality ) ) {
401
			nomCommune = locDatas.osmCounty;
403
			nomCommune = locDatas.osmCounty;
402
		}
404
		}
-
 
405
		$( '#geometry' ).val( geometry );
403
		$( '#coord-lineaire' ).val( coordLineaire );
406
		$( '#coord-lineaire' ).val( coordLineaire );
404
		$( '#latitude' ).val( latitude );
407
		$( '#latitude' ).val( latitude );
405
		$( '#longitude' ).val( longitude );
408
		$( '#longitude' ).val( longitude );
406
		$( '#commune-nom' ).val( nomCommune );
409
		$( '#commune-nom' ).val( nomCommune );
407
		$( '#commune-insee' ).val( communeInsee );
410
		$( '#commune-insee' ).val( communeInsee );