Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3016 Rev 3039
Line 118... Line 118...
118
		var stationNbreFormate = stationNbre;
118
		var stationNbreFormate = stationNbre;
119
		if(stationNbre != 0) {
119
		if(stationNbre != 0) {
120
		  	stationNbreFormate = stations.stats.stations.formaterNombre();
120
		  	stationNbreFormate = stations.stats.stations.formaterNombre();
121
		}
121
		}
Line 122... Line 122...
122
	
122
	
123
		var stats = obsNbreFormate+' observation';
123
		var stats = obsNbreFormate+' ' + msg('observation');
Line 124... Line 124...
124
		stats += (obsNbre > 1) ? 's' : '' ;
124
		stats += (obsNbre > 1) ? 's' : '' ;
125
 
125
 
126
		if (photos != null && photos == 1) {
126
		if (photos != null && photos == 1) {
Line 127... Line 127...
127
			stats += ' avec photos ';
127
			stats += ' ' + msg('avec photos') + ' ';
128
		}
128
		}
Line 129... Line 129...
129
		
129
		
130
		stats += ' sur '+(stationNbre+ communeNbre)+' station';
130
		stats += ' ' + msg('sur') + ' '+(stationNbre+ communeNbre)+' ' + msg('station');
131
		stats += (stationNbre > 1) ? 's' : '' ;
131
		stats += (stationNbre > 1) ? 's' : '' ;
132
		
132
		
133
		if (nt == '*') {
133
		if (nt == '*') {
134
			stats += ' parmi '+plteNbreFormate+' taxon';
134
			stats += ' ' + msg('parmi') + ' '+plteNbreFormate+' ' + msg('taxon');
135
			stats += (plteNbre > 1) ? 's' : '' ;
135
			stats += (plteNbre > 1) ? 's' : '' ;
136
		} else {
136
		} else {
137
			if($('.taxon-actif .taxon').text() != '') {
137
			if($('.taxon-actif .taxon').text() != '') {
138
				var element = $('.taxon-actif .taxon').clone();
138
				var element = $('.taxon-actif .taxon').clone();
139
				element.children().remove();
139
				element.children().remove();
140
				var taxon = element.text();
140
				var taxon = element.text();
141
				stats += ' pour '+taxon;
141
				stats += ' ' + msg('pour') + ' '+taxon;
142
			} else {
142
			} else {
143
				if (taxonsCarte[0]) {
143
				if (taxonsCarte[0]) {
144
					var taxon = taxonsCarte[0];
144
					var taxon = taxonsCarte[0];
Line 145... Line 145...
145
					stats += ' pour '+taxon.nom;
145
					stats += ' ' + msg('pour') + ' ' + taxon.nom;
146
				}
146
				}
147
			}
147
			}
Line 148... Line 148...
148
		}
148
		}
149
		
149
		
150
		if(utilisateur != '*') {
150
		if(utilisateur != '*') {
151
			stats += ' pour l\'utilisateur '+utilisateur+' ';
151
			stats += " " + msg("pour l'utilisateur") + " "+utilisateur+' ';
Line 152... Line 152...
152
		}
152
		}
153
		
153
		
154
		$('#zone-stats').show();
154
		$('#zone-stats').show();
Line 173... Line 173...
173
		window.open(window.location.href);
173
		window.open(window.location.href);
174
		event.preventDefault();
174
		event.preventDefault();
175
	});
175
	});
Line 176... Line 176...
176
	
176
	
177
	$('#lien-voir-cc a').click(function(event) {		
177
	$('#lien-voir-cc a').click(function(event) {		
178
		ouvrirPopUp(this, 'Avertissement', event);
178
		ouvrirPopUp(this, msg('Avertissement'), event);
179
		event.preventDefault();
179
		event.preventDefault();
180
	});
180
	});
Line 181... Line 181...
181
}
181
}
Line 346... Line 346...
346
				'onClick="ouvrirNouvelleFenetre(this, event)">' +
346
				'onClick="ouvrirNouvelleFenetre(this, event)">' +
347
				'Tela Botanica' +
347
				'Tela Botanica' +
348
			'</a> ';
348
			'</a> ';
349
		if (map.getMapTypeId() == 'OSM') {
349
		if (map.getMapTypeId() == 'OSM') {
350
			// ajout licence OSM
350
			// ajout licence OSM
351
			mention += ' - Carte : <a href="http://www.openstreetmap.org/copyright" target="_blank">© les contributeurs d’OpenStreetMap</a>' +
351
			mention += ' - Carte : <a href="http://www.openstreetmap.org/copyright" target="_blank">© ' + msg("contributeurs-osm") + '</a>' +
352
				' - Tuiles : <a href="http://www.openstreetmap.fr" target="_blank">OsmFr</a>';
352
				' - Tuiles : <a href="http://www.openstreetmap.fr" target="_blank">OsmFr</a>';
353
		}
353
		}
354
		$('#origine-donnees').html(mention);
354
		$('#origine-donnees').html(mention);
355
	});
355
	});
356
}
356
}
Line 504... Line 504...
504
}
504
}
Line 505... Line 505...
505
 
505
 
506
function creerMarqueur(station) {
506
function creerMarqueur(station) {
507
	var titre = '';
507
	var titre = '';
508
	if (station.nbreMarqueur) {
508
	if (station.nbreMarqueur) {
509
		titre = station.nbreMarqueur+' points renseignés';
509
		titre = station.nbreMarqueur+' ' + ('points-renseignes');
510
	} else {
510
	} else {
511
		if(station.nom) {
511
		if(station.nom) {
512
			titre = station.nom;
512
			titre = station.nom;
513
		}
513
		}
Line 746... Line 746...
746
		$('#tpl-chargement').tmpl().appendTo(element);
746
		$('#tpl-chargement').tmpl().appendTo(element);
747
	}
747
	}
748
}
748
}
Line 749... Line 749...
749
 
749
 
750
function afficherMessageChargementTitreInfoBulle() {
750
function afficherMessageChargementTitreInfoBulle() {
751
	$("#obs-station-titre").text("Chargement des observations");	
751
	$("#obs-station-titre").text(msg("chargement-observations"));	
Line 752... Line 752...
752
}
752
}
753
 
753
 
754
function supprimerMessageChargement() {
754
function supprimerMessageChargement() {
Line 820... Line 820...
820
 
820
 
821
function creerTitreInfoBulle() {
821
function creerTitreInfoBulle() {
822
	$('#obs-total').text(station.obsNbre);
822
	$('#obs-total').text(station.obsNbre);
823
	$('#obs-commune').text(station.commune);
823
	$('#obs-commune').text(station.commune);
824
	var titre = '';
824
	var titre = '';
825
	titre += pointClique.stationInfos.obsNbre+' observation';
825
	titre += pointClique.stationInfos.obsNbre+' ' + msg('observation');
826
	titre += (pointClique.stationInfos.obsNbre > 1) ? 's': '' ;
826
	titre += (pointClique.stationInfos.obsNbre > 1) ? 's': '' ;
827
	titre += ' pour ';
827
	titre += ' ' + msg('pour') + ' ';
828
	if (etreMarqueurCommune(pointClique.stationInfos.id)) {
828
	if (etreMarqueurCommune(pointClique.stationInfos.id)) {
829
		nomStation = 'la commune : ';
829
		nomStation = msg('la-commune') + ' : ';
830
	} else {
830
	} else {
831
		nomStation = 'la station : ';
831
		nomStation = msg('la-station') + ' : ';
832
	}
832
	}
833
	titre += pointClique.stationInfos.nom;
833
	titre += pointClique.stationInfos.nom;
834
	$('#obs-station-titre').text(titre);	
834
	$('#obs-station-titre').text(titre);
Line 835... Line 835...
835
}
835
}
836
 
836
 
837
function actualiserPagineur() {
837
function actualiserPagineur() {
Line 848... Line 848...
848
 
848
 
849
function afficherPagination(observations) {
849
function afficherPagination(observations) {
850
	$('.navigation').pagination(pagineur.total, {
850
	$('.navigation').pagination(pagineur.total, {
851
		items_per_page:pagineur.limite,
851
		items_per_page:pagineur.limite,
852
		callback:surClicPagePagination,
852
		callback:surClicPagePagination,
853
		next_text:'Suivant',
853
		next_text: msg('Suivant'),
854
		prev_text:'Précédent',
854
		prev_text: msg('Precedent'),
855
		prev_show_always:false,
855
		prev_show_always:false,
856
		num_edge_entries:1,
856
		num_edge_entries:1,
857
		num_display_entries:4,
857
		num_display_entries:4,
858
		load_first_page:true
858
		load_first_page:true
Line 987... Line 987...
987
			motif.exec(titre);
987
			motif.exec(titre);
988
			var id = RegExp.$1,
988
			var id = RegExp.$1,
989
				info = $('#cel-info-'+id).clone().html(),
989
				info = $('#cel-info-'+id).clone().html(),
990
				tpl = 
990
				tpl = 
991
					'<div class="cel-legende">'+
991
					'<div class="cel-legende">'+
992
					'<p class="cel-legende-vei">'+'Image n°' + (currentIndex + 1) + ' sur ' + currentArray.length +'<\/p>'+	
992
					'<p class="cel-legende-vei">'+ msg('Image-n') + ' ' + (currentIndex + 1) + ' ' + msg('sur') + ' ' + currentArray.length +'<\/p>'+	
993
					(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
993
					(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
994
					'<\/div>';
994
					'<\/div>';
995
			return tpl;
995
			return tpl;
996
		}
996
		}
997
	}).live('click', function(e) {
997
	}).live('click', function(e) {
Line 1053... Line 1053...
1053
function chargerInfoObsPourMessage(idObs) {
1053
function chargerInfoObsPourMessage(idObs) {
1054
	var nomSci = jQuery.trim($(".cel-obs-"+idObs+" .nom-sci:eq(0)").text());
1054
	var nomSci = jQuery.trim($(".cel-obs-"+idObs+" .nom-sci:eq(0)").text());
1055
	var date = jQuery.trim($(".cel-obs-"+idObs+" .date:eq(0)").text());
1055
	var date = jQuery.trim($(".cel-obs-"+idObs+" .date:eq(0)").text());
1056
	var lieu = jQuery.trim($(".cel-obs-"+idObs+" .lieu:eq(0)").text());
1056
	var lieu = jQuery.trim($(".cel-obs-"+idObs+" .lieu:eq(0)").text());
1057
	var sujet = "Observation #"+idObs+" de "+nomSci;
1057
	var sujet = "Observation #"+idObs+" de "+nomSci;
1058
	var message = "\n\n\n\n\n\n\n\n--\nConcerne l'observation de \""+nomSci+'" du "'+date+'" au lieu "'+lieu+'".';
1058
	var message = "\n\n\n\n\n\n\n\n--\n" + msg('concerne-l-observation') + " \""+nomSci+'" ' + msg('du') + ' "'+date+'" ' + msg('au-lieu') + ' "'+lieu+'".';
1059
	$("#fc_sujet").attr('value', sujet);
1059
	$("#fc_sujet").attr('value', sujet);
1060
	$("#fc_message").text(message);
1060
	$("#fc_message").text(message);
1061
}
1061
}
Line 1062... Line 1062...
1062
 
1062
 
Line 1138... Line 1138...
1138
						});
1138
						});
1139
					}
1139
					}
1140
				}
1140
				}
1141
				if (erreurMsg != '') {
1141
				if (erreurMsg != '') {
1142
					$("#fc-zone-dialogue").append('<p class="msg">'+
1142
					$("#fc-zone-dialogue").append('<p class="msg">'+
1143
							'Une erreur est survenue lors de la transmission de votre message.'+'<br />'+
1143
							msg('erreur-transmission-message') +'<br />'+
1144
							'Vous pouvez signaler le disfonctionnement à <a href="'+
1144
							msg('signaler-dysfonctionnement') + ' <a href="'+
1145
							'mailto:cel@tela-botanica.org'+'?'+
1145
							'mailto:cel@tela-botanica.org'+'?'+
1146
							'subject=Disfonctionnement du widget carto'+
1146
							'subject=Disfonctionnement du widget carto'+
1147
							"&body="+erreurMsg+"\nDébogage :\n"+debugMsg+
1147
							"&body="+erreurMsg+"\nDébogage :\n"+debugMsg+
1148
							'">cel@tela-botanica.org</a>.'+
1148
							'">cel@tela-botanica.org</a>.'+
1149
							'</p>');
1149
							'</p>');