Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3427 Rev 3430
Line 107... Line 107...
107
 
107
 
108
WidgetsSaisiesASL.prototype.btnsChargerForm = function( btn, modifierReleveData = true, dansRelevesUtilisateur = true ) {
108
WidgetsSaisiesASL.prototype.btnsChargerForm = function( btn, modifierReleveData = true, dansRelevesUtilisateur = true ) {
109
	const lthis = this;
109
	const lthis = this;
Line 110... Line 110...
110
	var bloc = ( dansRelevesUtilisateur ) ? '#releves-utilisateur' : '#charger-form';
110
	var bloc = ( dansRelevesUtilisateur ) ? '#releves-utilisateur' : '#charger-form';
111
 
111
 
112
	$( btn, bloc ).off().on( 'click', function( event ) {
112
	$( btn, bloc ).off().on( 'click touch', function( event ) {
113
		var nomSquelette  = $( this ).data( 'load' ),
113
		var nomSquelette  = $( this ).data( 'load' ),
Line 114... Line 114...
114
			thisWidgetObs = $.parseJSON( $( '#' + lthis.module + '-obs' ).val() ),
114
			thisWidgetObs = $.parseJSON( $( '#' + lthis.module + '-obs' ).val() ),
Line 373... Line 373...
373
		texteArbre = '',
373
		texteArbre = '',
374
		releveHtml = '';
374
		releveHtml = '';
Line 375... Line 375...
375
 
375
 
376
	$( '#bouton-list-releves' )
376
	$( '#bouton-list-releves' )
377
		.removeClass( 'hidden' )
377
		.removeClass( 'hidden' )
378
		.on( 'click', function(event) {
378
		.on( 'click touch', function(event) {
379
			$( '#table-releves' ).removeClass( 'hidden' );
379
			$( '#table-releves' ).removeClass( 'hidden' );
380
			$( this ).addClass( 'hidden' );
380
			$( this ).addClass( 'hidden' );
381
	});
381
	});
382
	function boutonsChargerReleve( lthis, squelette, indice ) {
382
	function boutonsChargerReleve( lthis, squelette, indice ) {
383
		var boutonLichens =
383
		var boutonLichens =
384
				'<div class="saisir-lichens btn btn-sm btn-info" data-releve="' + indice + '" data-load="lichens">'+
384
				'<div class="saisir-lichens btn btn-sm btn-info" data-releve="' + indice + '" data-load="lichens" role="button">'+
385
					'<i class="far fa-snowflake"></i> ' + lthis.msgTraduction( 'saisir-lichens' )+
385
					'<i class="far fa-snowflake"></i> ' + lthis.msgTraduction( 'saisir-lichens' )+
386
				'</div> ',
386
				'</div> ',
387
			boutonPlantes =
387
			boutonPlantes =
388
				'<div class="saisir-plantes btn btn-sm btn-info mb-1" data-releve="' + indice + '" data-load="plantes">'+
388
				'<div class="saisir-plantes btn btn-sm btn-info mb-1" data-releve="' + indice + '" data-load="plantes" role="button">'+
389
					'<i class="fas fa-seedling"></i> ' + lthis.msgTraduction( 'saisir-plantes' )+
389
					'<i class="fas fa-seedling"></i> ' + lthis.msgTraduction( 'saisir-plantes' )+
Line 390... Line 390...
390
				'</div> ';
390
				'</div> ';
391
 
391
 
Line 413... Line 413...
413
					'</p><p>'+
413
					'</p><p>'+
414
						'(' + nbArbres + texteArbre + ')' +
414
						'(' + nbArbres + texteArbre + ')' +
415
					'</p>'+
415
					'</p>'+
416
				'</td>'+
416
				'</td>'+
417
				'<td class="d-flex flex-column">' +
417
				'<td class="d-flex flex-column">' +
418
					'<div class="charger-releve btn btn-sm btn-info mb-1" data-releve="' + i + '" data-load="arbres">'+
418
					'<div class="charger-releve btn btn-sm btn-info mb-1" data-releve="' + i + '" data-load="arbres" role="button">'+
419
						'<i class="fas fa-clone"></i> ' + lthis.msgTraduction( 'dupliquer' )+
419
						'<i class="fas fa-clone"></i> ' + lthis.msgTraduction( 'dupliquer' )+
420
					'</div> '+
420
					'</div> '+
421
					boutonsChargerReleve( lthis, lthis.module, i ) +
421
					boutonsChargerReleve( lthis, lthis.module, i ) +
422
				'</td>'+
422
				'</td>'+
423
			'</tr>';
423
			'</tr>';