Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2700 Rev 2701
Line 488... Line 488...
488
};
488
};
Line 489... Line 489...
489
 
489
 
490
WidgetSaisie.prototype.requeterIdentite = function() {
490
WidgetSaisie.prototype.requeterIdentite = function() {
491
	var lthis = this;
491
	var lthis = this;
492
	var courriel = $("#courriel").val();
-
 
493
	//TODO: mettre ceci en paramètre de config
492
	var courriel = $("#courriel").val();
494
	var urlAnnuaire = this.serviceAnnuaireIdUrl + courriel;//http://localhost/applications/annuaire/jrest/
493
	var urlAnnuaire = this.serviceAnnuaireIdUrl + courriel;
495
	$.ajax({
494
	$.ajax({
496
		url : urlAnnuaire,
495
		url : urlAnnuaire,
497
		type : "GET",
496
		type : "GET",
498
		success : function(data, textStatus, jqXHR) {
497
		success : function(data, textStatus, jqXHR) {
Line 503... Line 502...
503
				$("#prenom").val(infos.prenom);
502
				$("#prenom").val(infos.prenom);
504
				$("#nom").val(infos.nom);
503
				$("#nom").val(infos.nom);
505
				$("#courriel_confirmation").val(courriel);
504
				$("#courriel_confirmation").val(courriel);
506
				$("#prenom, #nom, #courriel_confirmation").attr('disabled', 'disabled');
505
				$("#prenom, #nom, #courriel_confirmation").attr('disabled', 'disabled');
507
				$("#date").focus();
506
				$("#date").focus();
-
 
507
				lthis.masquerPanneau("#dialogue-courriel-introuvable");
508
			} else {
508
			} else {
509
				lthis.surErreurCompletionCourriel();
509
				lthis.surErreurCompletionCourriel();
510
			}
510
			}
511
		},
511
		},
512
		error : function(jqXHR, textStatus, errorThrown) {
512
		error : function(jqXHR, textStatus, errorThrown) {
Line 516... Line 516...
516
		complete : function(jqXHR, textStatus) {
516
		complete : function(jqXHR, textStatus) {
517
			//console.log('COMPLETE :'+textStatus);
517
			//console.log('COMPLETE :'+textStatus);
518
			// @TODO harmoniser class="hidden" VS style="display:none;"
518
			// @TODO harmoniser class="hidden" VS style="display:none;"
519
			$("#zone-prenom-nom").removeClass("hidden").show();
519
			$("#zone-prenom-nom").removeClass("hidden").show();
520
			$("#zone-courriel-confirmation").removeClass("hidden").show();
520
			$("#zone-courriel-confirmation").removeClass("hidden").show();
-
 
521
			
521
		}
522
		}
522
	});
523
	});
523
};
524
};
Line 524... Line 525...
524
 
525
 
Line 1170... Line 1171...
1170
	return suggestions;
1171
	return suggestions;
1171
};
1172
};
Line 1172... Line 1173...
1172
 
1173
 
1173
WidgetSaisie.prototype.afficherPanneau = function(selecteur) {
1174
WidgetSaisie.prototype.afficherPanneau = function(selecteur) {
1174
	$(selecteur).fadeIn("slow").delay(this.dureeMessage).fadeOut("slow");
1175
	$(selecteur).fadeIn("slow").delay(this.dureeMessage).fadeOut("slow");
-
 
1176
};
-
 
1177
 
-
 
1178
WidgetSaisie.prototype.masquerPanneau = function(selecteur) {
-
 
1179
	$(selecteur).hide();
Line 1175... Line 1180...
1175
}
1180
};
Line 1176... Line 1181...
1176
 
1181
 
1177
// lib hors objet --
1182
// lib hors objet --