Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2736 Rev 2746
Line 780... Line 780...
780
 
780
 
781
/**
781
/**
782
 * Affiche une observation dans la liste des observations à transmettre
782
 * Affiche une observation dans la liste des observations à transmettre
783
 */
783
 */
-
 
784
WidgetSaisie.prototype.afficherObs = function() {
-
 
785
	
-
 
786
	var commune = $("#commune-nom").text();
-
 
787
	commune = commune.trim() != "" ? commune : $("#carte-recherche").val();
-
 
788
	
-
 
789
	var code_insee = $('#commune-code-insee').text();
-
 
790
	code_insee = code_insee.trim() != "" ? "("+code_insee+")" : "";
-
 
791
	
-
 
792
	console.log(commune+'  -  '+code_insee);
784
WidgetSaisie.prototype.afficherObs = function() {
793
	
785
	$("#liste-obs").prepend(
794
	$("#liste-obs").prepend(
786
		'<div id="obs'+this.obsNbre+'" class="row-fluid obs obs'+this.obsNbre+'">'+
795
		'<div id="obs'+this.obsNbre+'" class="row-fluid obs obs'+this.obsNbre+'">'+
787
			'<div class="span12">'+
796
			'<div class="span12">'+
788
				'<div class="well">'+
797
				'<div class="well">'+
Line 801... Line 810...
801
								'<li>'+
810
								'<li>'+
802
									'<span class="nom-sci">'+$("#taxon").val()+'</span> '+
811
									'<span class="nom-sci">'+$("#taxon").val()+'</span> '+
803
									this.ajouterNumNomSel()+'<span class="referentiel-obs">'+
812
									this.ajouterNumNomSel()+'<span class="referentiel-obs">'+
804
									($("#taxon").data("numNomSel") == undefined ? '' : '['+ this.nomSciReferentiel +']')+'</span>'+
813
									($("#taxon").data("numNomSel") == undefined ? '' : '['+ this.nomSciReferentiel +']')+'</span>'+
805
									' observé à '+
814
									' observé à '+
806
									'<span class="commune">'+$('#commune-nom').text()+'</span> '+
815
									'<span class="commune">'+commune+'</span> '+
807
									'('+$('#commune-code-insee').text()+') ['+$("#latitude").val()+' / '+$("#longitude").val()+']'+
816
									code_insee+' ['+$("#latitude").val()+' / '+$("#longitude").val()+']'+
808
									' le '+
817
									' le '+
809
									'<span class="date">'+$("#date").val()+'</span>'+
818
									'<span class="date">'+$("#date").val()+'</span>'+
810
								'</li>'+
819
								'</li>'+
811
								'<li>'+
820
								'<li>'+
812
									'<span>Lieu-dit :</span> '+$('#lieudit').val()+' '+
821
									'<span>Lieu-dit :</span> '+$('#lieudit').val()+' '+
Line 825... Line 834...
825
	$('#zone-liste-obs').removeClass("hidden").show();
834
	$('#zone-liste-obs').removeClass("hidden").show();
826
};
835
};
Line 827... Line 836...
827
 
836
 
828
WidgetSaisie.prototype.stockerObsData = function() {
837
WidgetSaisie.prototype.stockerObsData = function() {
-
 
838
	var lthis = this;
-
 
839
	
-
 
840
	var commune = $("#commune-nom").text();
-
 
841
	commune = commune.trim() == "" ? commune : $("#carte-recherche").val();
829
	var lthis = this;
842
	
830
	$("#liste-obs").data('obsId'+this.obsNbre, {
843
	$("#liste-obs").data('obsId'+this.obsNbre, {
831
		'date' : $("#date").val(),
844
		'date' : $("#date").val(),
Line 832... Line 845...
832
		'notes' : $("#notes").val().trim(),
845
		'notes' : $("#notes").val().trim(),
Line 839... Line 852...
839
		'famille' : $("#taxon").data("famille"),
852
		'famille' : $("#taxon").data("famille"),
840
		'referentiel' : ($("#taxon").data("numNomSel") == undefined ? '' : lthis.nomSciReferentiel),
853
		'referentiel' : ($("#taxon").data("numNomSel") == undefined ? '' : lthis.nomSciReferentiel),
Line 841... Line 854...
841
 
854
 
842
		'latitude' : $("#latitude").val(),
855
		'latitude' : $("#latitude").val(),
843
		'longitude' : $("#longitude").val(),
856
		'longitude' : $("#longitude").val(),
844
		'commune_nom' : $("#commune-nom").text(),
857
		'commune_nom' : commune,
845
		'commune_code_insee' : $("#commune-code-insee").text(),
858
		'commune_code_insee' : $("#commune-code-insee").text(),
846
		'lieudit' : $("#lieudit").val(),
859
		'lieudit' : $("#lieudit").val(),
847
		'station' : $("#station").val(),
860
		'station' : $("#station").val(),