Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 974 Rev 1507
Line 45... Line 45...
45
			data : donnees,
45
			data : donnees,
46
			beforeSend : function() {
46
			beforeSend : function() {
47
				nettoyerMsg();
47
				nettoyerMsg();
48
			},
48
			},
49
			success : function(data) {
49
			success : function(data) {
-
 
50
				if (data.message) {
50
				afficherInfo(data.message);
51
					afficherInfo(data.message);
-
 
52
				} else {
-
 
53
					afficherInfo(data);
-
 
54
				}
51
			},
55
			},
52
			error : function(jqXHR, textStatus, errorThrown) {
56
			error : function(jqXHR, textStatus, errorThrown) {
53
				erreurMsg += "Erreur Ajax :\ntype : "+textStatus+' '+errorThrown+"\n";
57
				erreurMsg += "Erreur Ajax :\ntype : "+textStatus+' '+errorThrown+"\n";
54
				reponse = jQuery.parseJSON(jqXHR.responseText);
58
				reponse = jQuery.parseJSON(jqXHR.responseText);
55
				if (reponse != null) {
59
				if (reponse != null) {
Line 68... Line 72...
68
						});
72
						});
69
					}
73
					}
70
				}
74
				}
71
				if (erreurMsg != '') {
75
				if (erreurMsg != '') {
72
					afficherMsg('Une erreur est survenue lors de la transmission de votre message.'+'<br />'+
76
					afficherMsg('Une erreur est survenue lors de la transmission de votre message.'+'<br />'+
73
						'Vous pouvez signaler le disfonctionnement à <a href="'+
77
						'Vous pouvez signaler le dysfonctionnement à <a href="'+
74
						'mailto:cel@tela-botanica.org'+'?'+
78
						'mailto:cel@tela-botanica.org'+'?'+
75
						'subject=Disfonctionnement du formulaire de contact'+
79
						'subject=Dysfonctionnement du formulaire de contact'+
76
						"&body="+erreurMsg+"\nDébogage :\n"+debugMsg+
80
						"&body="+erreurMsg+"\nDébogage :\n"+debugMsg+
77
						'">eflore_remarques@tela-botanica.org</a>.');
81
						'">eflore_remarques@tela-botanica.org</a>.');
78
				}
82
				}
79
				if (DEBUG) {
83
				if (DEBUG) {
80
					console.log('Débogage : '+debugMsg);
84
					console.log('Débogage : '+debugMsg);