Subversion Repositories eFlore/Applications.cel

Rev

Rev 2432 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2432 Rev 2439
Line 772... Line 772...
772
 
772
 
773
	$.validator.addMethod(
773
	$.validator.addMethod(
774
		'individusNbre',
774
		'individusNbre',
775
		function (value, element) {
775
		function (value, element) {
776
			var ok = true;
-
 
777
			console.log( 'nbre:'+value+'-');
776
			var ok = true;
778
			if (afficherIndividusNbreGroupe()) {
777
			if (afficherIndividusNbreGroupe()) {
779
				var abondance = $('#abondance').val();
-
 
780
				console.log('abondance:'+abondance+' - nbre:'+value);
778
				var abondance = $('#abondance').val();
781
				if (abondance === '1-4 individus') {
779
				if (abondance === '1-4 individus') {
782
					ok = value === '' || (value !== '' && /^[0-9]+$/.test(value) && value >= 1 && value < 5);
780
					ok = value === '' || (value !== '' && /^[0-9]+$/.test(value) && value >= 1 && value < 5);
783
				} else if (abondance == '5-9 individus') {
781
				} else if (abondance == '5-9 individus') {
784
					ok = value === '' || (value !== '' && /^[0-9]+$/.test(value) && value >= 5 && value < 10);
782
					ok = value === '' || (value !== '' && /^[0-9]+$/.test(value) && value >= 5 && value < 10);
Line 1030... Line 1028...
1030
}
1028
}
Line 1031... Line 1029...
1031
 
1029
 
1032
function getTextOptionSelectionne(id) {
1030
function getTextOptionSelectionne(id) {
1033
	var optionVal = $('#' + id).val(),
1031
	var optionVal = $('#' + id).val(),
1034
		optionText = $('#' + id + ' option:selected').text();
1032
		optionText = $('#' + id + ' option:selected').text();
1035
	console.log(optionVal+'-'+optionText);
1033
	//console.log(optionVal+'-'+optionText);
1036
	return ((optionVal === undefined || optionVal === '') ? '' : optionText);
1034
	return ((optionVal === undefined || optionVal === '') ? '' : optionText);
Line 1037... Line 1035...
1037
}
1035
}
1038
 
1036