Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1620 Rev 1822
Line 94... Line 94...
94
}
94
}
Line 95... Line 95...
95
 
95
 
96
function afficherMiniature(reponse) { 
96
function afficherMiniature(reponse) { 
97
	if (DEBUG) {
97
	if (DEBUG) {
98
		var debogage = $("debogage", reponse).text();
98
		var debogage = $("debogage", reponse).text();
99
		console.log("Débogage upload : "+debogage);
99
		//console.log("Débogage upload : "+debogage);
100
	}
100
	}
101
	var message = $("message", reponse).text();
101
	var message = $("message", reponse).text();
102
	if (message != '') {
102
	if (message != '') {
103
		$("#miniature-msg").append(message);
103
		$("#miniature-msg").append(message);
Line 388... Line 388...
388
	var urlAnnuaire = "http://www.tela-botanica.org/client/annuaire_nouveau/actuelle/jrest/utilisateur/identite-par-courriel/"+courriel;//http://localhost/applications/annuaire/jrest/
388
	var urlAnnuaire = "http://www.tela-botanica.org/client/annuaire_nouveau/actuelle/jrest/utilisateur/identite-par-courriel/"+courriel;//http://localhost/applications/annuaire/jrest/
389
	$.ajax({
389
	$.ajax({
390
		url : urlAnnuaire,
390
		url : urlAnnuaire,
391
		type : "GET",
391
		type : "GET",
392
		success : function(data, textStatus, jqXHR) {
392
		success : function(data, textStatus, jqXHR) {
393
			console.log('SUCCESS:'+textStatus);
393
			//console.log('SUCCESS:'+textStatus);
394
			if (data != undefined && data[courriel] != undefined) {
394
			if (data != undefined && data[courriel] != undefined) {
395
				var infos = data[courriel];
395
				var infos = data[courriel];
396
				$("#id_utilisateur").val(infos.id);
396
				$("#id_utilisateur").val(infos.id);
397
				$("#prenom").val(infos.prenom);
397
				$("#prenom").val(infos.prenom);
398
				$("#nom").val(infos.nom);
398
				$("#nom").val(infos.nom);
Line 402... Line 402...
402
			} else {
402
			} else {
403
				surErreurCompletionCourriel();
403
				surErreurCompletionCourriel();
404
			}
404
			}
405
		},
405
		},
406
		error : function(jqXHR, textStatus, errorThrown) {
406
		error : function(jqXHR, textStatus, errorThrown) {
407
			console.log('ERREUR :'+textStatus);
407
			//console.log('ERREUR :'+textStatus);
408
			surErreurCompletionCourriel();
408
			surErreurCompletionCourriel();
409
		},
409
		},
410
		complete : function(jqXHR, textStatus) {
410
		complete : function(jqXHR, textStatus) {
411
			console.log('COMPLETE :'+textStatus);
411
			//console.log('COMPLETE :'+textStatus);
412
			$("#zone-prenom-nom").removeClass("hidden");
412
			$("#zone-prenom-nom").removeClass("hidden");
413
			$("#zone-courriel-confirmation").removeClass("hidden");
413
			$("#zone-courriel-confirmation").removeClass("hidden");
414
		}
414
		}
415
	});
415
	});
416
}
416
}
Line 714... Line 714...
714
	}
714
	}
715
}
715
}
Line 716... Line 716...
716
 
716
 
717
function transmettreObs() {
717
function transmettreObs() {
718
	var observations = $("#liste-obs").data();
718
	var observations = $("#liste-obs").data();
Line 719... Line 719...
719
	console.log(observations);
719
	//console.log(observations);
720
	
720
	
721
	if (observations == undefined || jQuery.isEmptyObject(observations)) {
721
	if (observations == undefined || jQuery.isEmptyObject(observations)) {
722
		afficherPanneau("#dialogue-zero-obs");
722
		afficherPanneau("#dialogue-zero-obs");
Line 899... Line 899...
899
			miniatureAffichee = miniatureSelectionne.next('.miniature');
899
			miniatureAffichee = miniatureSelectionne.next('.miniature');
900
		} else {
900
		} else {
901
			miniatureAffichee = miniatureSelectionne.siblings(".miniature").first();
901
			miniatureAffichee = miniatureSelectionne.siblings(".miniature").first();
902
		}
902
		}
903
	}
903
	}
904
	console.log(miniatureAffichee);
904
	//console.log(miniatureAffichee);
905
	miniatureAffichee.addClass('miniature-selectionnee');
905
	miniatureAffichee.addClass('miniature-selectionnee');
906
	miniatureAffichee.removeClass('miniature-cachee');
906
	miniatureAffichee.removeClass('miniature-cachee');
907
}
907
}
Line 908... Line 908...
908
 
908