Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3260 Rev 3263
Line 155... Line 155...
155
 * Initialise les écouteurs d'événements
155
 * Initialise les écouteurs d'événements
156
 */
156
 */
157
WidgetSaisie.prototype.initEvts = function() {
157
WidgetSaisie.prototype.initEvts = function() {
158
	var lthis = this;
158
	var lthis = this;
Line 159... Line -...
159
 
-
 
160
 
-
 
161
 
159
 
162
	// identité
160
	// identité
163
	$( '#bouton-anonyme' ).on( 'click', function() {
161
	$( '#bouton-anonyme' ).on( 'click', function() {
164
		$( this ).css({
162
		$( this ).css({
165
			'background-color': 'rgba(0, 159, 184, 0.7)',
163
			'background-color': 'rgba(0, 159, 184, 0.7)',
Line 429... Line 427...
429
			if( valeurOk( $( '#referentiel' ).val(), false, 'autre' ) ) {
427
			if( valeurOk( $( '#referentiel' ).val(), false, 'autre' ) ) {
430
				var url = lthis.getUrlAutocompletionNomsSci();
428
				var url = lthis.getUrlAutocompletionNomsSci();
431
				$.getJSON( url, requete, function( data ) {
429
				$.getJSON( url, requete, function( data ) {
432
					var suggestions = lthis.traiterRetourNomsSci( data );
430
					var suggestions = lthis.traiterRetourNomsSci( data );
433
					add( suggestions );
431
					add( suggestions );
-
 
432
				})
-
 
433
				.fail( function() {
-
 
434
				    $( '#certitude' ).find( 'option' ).each( function() {
-
 
435
						if ( $( this ).hasClass( 'aDeterminer' ) ) {
-
 
436
							$( this ).attr( 'selected', true );
-
 
437
						} else {
-
 
438
							$( this ).attr( 'selected', false );
-
 
439
						}
-
 
440
					});
434
				});
441
				});
435
			}
442
			}
436
		},
443
		},
437
		html: true
444
		html: true
438
	});
445
	});
Line 874... Line 881...
874
// N'est pas utilisé en cas de taxon-liste
881
// N'est pas utilisé en cas de taxon-liste
875
WidgetSaisie.prototype.surChangementReferentiel = function() {
882
WidgetSaisie.prototype.surChangementReferentiel = function() {
876
	this.nomSciReferentiel = $( '#referentiel' ).val();
883
	this.nomSciReferentiel = $( '#referentiel' ).val();
877
	//réinitialise taxon.val
884
	//réinitialise taxon.val
878
	$( '#taxon' ).val( '' );
885
	$( '#taxon' ).val( '' );
879
	$( '#taxon' ).data( 'numNomSel', 0 );
886
	$( '#taxon' ).data( 'numNomSel', '' );
880
	// this.initialiserAutocompleteCommune();
887
	// this.initialiserAutocompleteCommune();
881
	// this.initialiserGoogleMap( false );
888
	// this.initialiserGoogleMap( false );
882
};
889
};
Line 883... Line 890...
883
 
890
 
Line 1099... Line 1106...
1099
			nomSel      = $( '#taxon' ).val(),
1106
			nomSel      = $( '#taxon' ).val(),
1100
			nomRet      = $( '#taxon' ).data( 'nomRet' ),
1107
			nomRet      = $( '#taxon' ).data( 'nomRet' ),
1101
			numNomRet   = $( '#taxon' ).data( 'numNomRet' ),
1108
			numNomRet   = $( '#taxon' ).data( 'numNomRet' ),
1102
			numTaxon    = $( '#taxon' ).data( 'nt' ),
1109
			numTaxon    = $( '#taxon' ).data( 'nt' ),
1103
			famille     = $( '#taxon' ).data( 'famille' ),
1110
			famille     = $( '#taxon' ).data( 'famille' ),
1104
			referentiel = ( !valeurOk( numNomSel ) ) ? '' : this.nomSciReferentiel;
1111
			referentiel = ( !valeurOk( numNomSel ) ) ? 'autre' : this.nomSciReferentiel;
Line 1105... Line 1112...
1105
 
1112
 
1106
	$( '#liste-obs' ).data( 'obsId' + this.obsNbre, {
1113
	$( '#liste-obs' ).data( 'obsId' + this.obsNbre, {
1107
		'num_nom_sel'        : numNomSel,
1114
		'num_nom_sel'        : numNomSel,
1108
		'nom_sel'            : nomSel,
1115
		'nom_sel'            : nomSel,