Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 200 Rev 278
Line 35... Line 35...
35
	return (boutonRadioNomSci.attr("checked") != "undefined" && boutonRadioNomSci.attr("checked") == "checked");
35
	return (boutonRadioNomSci.attr("checked") != "undefined" && boutonRadioNomSci.attr("checked") == "checked");
36
}
36
}
Line 37... Line 37...
37
 
37
 
38
/**------------ Fonctions de gestion des urls d'autocompletion et des fiches ------------------*/
38
/**------------ Fonctions de gestion des urls d'autocompletion et des fiches ------------------*/
39
function getUrlAutocompletion(baseUrl, requete, format) {
39
function getUrlAutocompletion(baseUrl, requete, format) {
40
	return baseUrl+"?recherche=etendue&retour.format="+format+"&navigation.limite=25&masque="+requete;
40
	return baseUrl+"?recherche=etendue&retour.format="+format+"&navigation.limite=50&masque="+requete;
Line 41... Line 41...
41
}
41
}
42
 
42
 
43
function getUrlAutocompletionNomsVerna(requete) {
43
function getUrlAutocompletionNomsVerna(requete) {
Line 71... Line 71...
71
			listeNomsScientifiques[val.nom_sci] = val;
71
			listeNomsScientifiques[val.nom_sci] = val;
72
			suggestions.push(val.nom_sci);
72
			suggestions.push(val.nom_sci);
73
		});
73
		});
74
	}
74
	}
Line 75... Line 75...
75
	
75
	
76
	if(suggestions.length >= 25) {
76
	if(suggestions.length >= 50) {
77
		suggestions.push("...");
77
		suggestions.push("...");
Line 78... Line 78...
78
	}
78
	}
79
	
79
	
Line 87... Line 87...
87
		$.each(data[1], function(i, val){
87
		$.each(data[1], function(i, val){
88
			suggestions.push(val);
88
			suggestions.push(val);
89
		});
89
		});
90
	}
90
	}
Line 91... Line 91...
91
	
91
	
92
	if(suggestions.length >= 25) {
92
	if(suggestions.length >= 50) {
93
		suggestions.push("...");
93
		suggestions.push("...");
Line 94... Line 94...
94
	}
94
	}
95
	
95
	
Line 128... Line 128...
128
		}
128
		}
129
	});
129
	});
130
}
130
}
Line 131... Line 131...
131
 
131
 
132
function formulaireAfficheValeurParDefaut() {
132
function formulaireAfficheValeurParDefaut() {
-
 
133
	valeur_form = $('#nom').val();
133
	valeur_form = $('#nom').val().trim();
134
	valeur_form = $.trim(valeur_form);
134
	return valeur_form == '' || valeur_form == valeurDefautNomSci || valeur_form == valeurDefautNomVerna;
135
	return valeur_form == '' || valeur_form == valeurDefautNomSci || valeur_form == valeurDefautNomVerna;
Line 135... Line 136...
135
}
136
}
136
 
137
 
Line 149... Line 150...
149
	});
150
	});
150
}
151
}
Line 151... Line 152...
151
 
152
 
152
function afficherValeurParDefaut() {
153
function afficherValeurParDefaut() {
153
	if($('#nom') != undefined && $('#nom').val() != undefined) { 
154
	if($('#nom') != undefined && $('#nom').val() != undefined) { 
-
 
155
		valeur_form = $('#nom').val();
154
		valeur_form = $('#nom').val().trim();
156
		valeur_form = $.trim(valeur_form);
155
		if(formulaireAfficheValeurParDefaut()) {
157
		if(formulaireAfficheValeurParDefaut()) {
156
			if(nomSciEstDemande()) {
158
			if(nomSciEstDemande()) {
157
	    		$('#nom').val(valeurDefautNomSci);
159
	    		$('#nom').val(valeurDefautNomSci);
158
	    	} else {
160
	    	} else {