Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1361 Rev 1370
Line 499... Line 499...
499
			elementHtml.attachEvent("on" + nomEvenement, function() {functionCallBack.call(elementHtml);}); 
499
			elementHtml.attachEvent("on" + nomEvenement, function() {functionCallBack.call(elementHtml);}); 
500
		} else if(elementHtml.addEventListener) { // Firefox & autres
500
		} else if(elementHtml.addEventListener) { // Firefox & autres
501
			elementHtml.addEventListener(nomEvenement, functionCallBack, false);
501
			elementHtml.addEventListener(nomEvenement, functionCallBack, false);
502
		}
502
		}
503
	}
503
	}
504
} 
504
}
Line 505... Line 505...
505
 
505
 
-
 
506
$(document).one('ongletRepartitionCharge', function() {
506
$(document).one('ongletRepartitionCharge', function() {
507
	var contRepObs = $(".conteneur_repartition_observations");
507
	$(".conteneur_repartition_observations").addClass("chargement_repartition");
508
	contRepObs.addClass("chargement_repartition");
508
	// utilisation d'une fonction native car jQuery refuse d'ajouter un évènement load
509
	// utilisation d'une fonction native car jQuery refuse d'ajouter un évènement load
509
	// sur autre chose qu'une image
510
	// sur autre chose qu'une image
510
	$('#repartition_observations').ready(function() {
511
	$('#repartition_observations').ready(function() {
511
		ajouterEvenement(document.getElementById("repartition_observations"), "load", function() {
512
		ajouterEvenement(document.getElementById("repartition_observations"), "load", function() {
512
			$(".conteneur_repartition_observations").removeClass("chargement_repartition");
513
			contRepObs.removeClass("chargement_repartition");
513
		});
514
		});
-
 
515
	});
-
 
516
	// lien "recalculer la carte de moissonnage"
-
 
517
	$('#lien_recalculer_carte').click(function() {
-
 
518
		var carteMoissonnageSvg = $('#repartition_observations'); // c'est plutôt "moissonnage" que "répartition" => squelette pourave power
-
 
519
		var urlCarte = carteMoissonnageSvg.attr("data");
-
 
520
		urlCarte += '&recalculer=1';
-
 
521
		contRepObs.addClass("chargement_repartition");
-
 
522
		carteMoissonnageSvg.attr("data", urlCarte);ajouterEvenement(document.getElementById("repartition_observations"), "load", function() {
-
 
523
			contRepObs.removeClass("chargement_repartition");
-
 
524
		});
514
	});
525
		return false;
515
 
526
	});
Line 516... Line 527...
516
});
527
});
517
 
528