Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1105 Rev 1108
Line 31... Line 31...
31
 
31
 
32
	$("#effacer-miniature").click(function () {
32
	$("#effacer-miniature").click(function () {
33
		supprimerMiniature();
33
		supprimerMiniature();
Line 34... Line 34...
34
	});
34
	});
-
 
35
	
35
	
36
	$("#fichier").bind('change', function (e) {
36
	$("#fichier").bind('change', function () {
37
		arreter(e);
37
		$("#form-upload").ajaxSubmit(options);
38
		$("#form-upload").ajaxSubmit(options);
Line 38... Line 39...
38
		return false;
39
		return false;
Line 52... Line 53...
52
	// jQuery to extract the content of the message node from the XML doc 
53
	// jQuery to extract the content of the message node from the XML doc 
53
	var miniatureUrl = $("miniature-url", reponse).text();
54
	var miniatureUrl = $("miniature-url", reponse).text();
54
	var imgNom = $("image-nom", reponse).text();
55
	var imgNom = $("image-nom", reponse).text();
55
	$("#miniature").empty();
56
	$("#miniature").empty();
56
	$("#miniature").append('<img id="miniature-img" class="miniature" alt="'+imgNom+'" src="'+miniatureUrl+'"/>');
57
	$("#miniature").append('<img id="miniature-img" class="miniature" alt="'+imgNom+'" src="'+miniatureUrl+'"/>');
57
	$("#effacer-miniature").show();
58
	$("#effacer-miniature").show();		
58
	console.log(imgNom);
-
 
59
	console.log(miniatureUrl);		
-
 
60
}
59
}
Line 61... Line 60...
61
 
60
 
62
function supprimerMiniature() {
61
function supprimerMiniature() {
63
	$("#miniature").empty();
62
	$("#miniature").empty();
Line 75... Line 74...
75
	// Carte
74
	// Carte
76
	var latLng = new google.maps.LatLng(43.29545, 5.37458);
75
	var latLng = new google.maps.LatLng(43.29545, 5.37458);
77
	if (VILLE == 'Montpellier') {
76
	if (VILLE == 'Montpellier') {
78
		latLng = new google.maps.LatLng(43.61077, 3.87672);
77
		latLng = new google.maps.LatLng(43.61077, 3.87672);
79
	} else {
78
	} else {
80
		console.log('Ville:'+VILLE);
79
		//console.log('Ville:'+VILLE);
81
	}
80
	}
Line 82... Line 81...
82
	
81
	
83
	// Tentative de geocalisation
82
	// Tentative de geocalisation
84
	if (navigator.geolocation) {
83
	if (navigator.geolocation) {
Line 114... Line 113...
114
	map = new google.maps.Map(document.getElementById('map-canvas'), options); //affiche la google map dans la div map_canvas
113
	map = new google.maps.Map(document.getElementById('map-canvas'), options); //affiche la google map dans la div map_canvas
115
	map.mapTypes.set('OSM', osmMapType);
114
	map.mapTypes.set('OSM', osmMapType);
Line 116... Line 115...
116
	
115
	
117
	// Geocodeur
116
	// Geocodeur
118
	geocoder = new google.maps.Geocoder();
-
 
Line 119... Line 117...
119
	console.log(GOOGLE_MAP_MARQUEUR_URL);
117
	geocoder = new google.maps.Geocoder();
120
 
118
 
121
	// Marqueur google draggable
119
	// Marqueur google draggable
122
	marker = new google.maps.Marker({
120
	marker = new google.maps.Marker({
Line 423... Line 421...
423
				dataType : "json",
421
				dataType : "json",
424
				beforeSend : function() {
422
				beforeSend : function() {
425
					$(".msg").remove();	
423
					$(".msg").remove();	
426
					$(".msg-erreur").remove();
424
					$(".msg-erreur").remove();
427
					$(".msg-debug").remove();
425
					$(".msg-debug").remove();
-
 
426
					$("#chargement").show();
428
				},
427
				},
429
				success : function(data, textStatus, jqXHR) {
428
				success : function(data, textStatus, jqXHR) {
430
					$("#dialogue-obs-transaction").append('<p class="msg">Vos observations ont bien été transmises.</p>');
429
					$("#dialogue-obs-transaction").append('<p class="msg">Vos observations ont bien été transmises.</p>');
431
					supprimerMiniature();
430
					supprimerMiniature();
432
				},
431
				},
Line 478... Line 477...
478
								'</p>');
477
								'</p>');
479
					}
478
					}
480
					if (DEBUG) {
479
					if (DEBUG) {
481
						$("#dialogue-obs-transaction").append('<pre class="msg-debug">Débogage : '+debugMsg+'</pre>');
480
						$("#dialogue-obs-transaction").append('<pre class="msg-debug">Débogage : '+debugMsg+'</pre>');
482
					}
481
					}
483
					
-
 
-
 
482
					$("#chargement").hide();
484
					$("#dialogue-obs-transaction").dialog();
483
					$("#dialogue-obs-transaction").dialog();
485
					$("#liste-obs").removeData();
484
					$("#liste-obs").removeData();
486
					$('.obs').remove();
485
					$('.obs').remove();
487
					obsNumero = 0;
486
					obsNumero = 0;
488
				}
487
				}