Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 136 Rev 191
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+"&ns.structure=au&navigation.limite=10&masque="+requete;
40
	return baseUrl+"?recherche=etendue&retour.format="+format+"&ns.structure=au&navigation.limite=25&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 -... Line 75...
-
 
75
	
-
 
76
	if(suggestions.length >= 25) {
-
 
77
		suggestions.push("...");
-
 
78
	}
75
	
79
	
76
	return suggestions;
80
	return suggestions;
Line 77... Line 81...
77
}
81
}
Line 83... Line 87...
83
		$.each(data[1], function(i, val){
87
		$.each(data[1], function(i, val){
84
			suggestions.push(val);
88
			suggestions.push(val);
85
		});
89
		});
86
	}
90
	}
Line -... Line 91...
-
 
91
	
-
 
92
	if(suggestions.length >= 25) {
-
 
93
		suggestions.push("...");
-
 
94
	}
87
	
95
	
88
	return suggestions;
96
	return suggestions;
Line 89... Line 97...
89
}
97
}
90
 
98
 
Line 197... Line 205...
197
	_renderItem: function( ul, item) {
205
	_renderItem: function( ul, item) {
198
		if(listeNomsScientifiques[item.label] != undefined && listeNomsScientifiques[item.label].retenu == "true") {
206
		if(listeNomsScientifiques[item.label] != undefined && listeNomsScientifiques[item.label].retenu == "true") {
199
			item.label = "<b>"+item.label+"</b>";
207
			item.label = "<b>"+item.label+"</b>";
200
		}
208
		}
Line -... Line 209...
-
 
209
		
-
 
210
		if(item.label == '...') {
-
 
211
			item.label = "<b>"+item.label+"</b>";
-
 
212
		}
201
		
213
		
202
		return $( "<li></li>" )
214
		return $( "<li></li>" )
203
			.data( "item.autocomplete", item )
215
			.data( "item.autocomplete", item )
204
			.append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) )
216
			.append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) )
205
			.appendTo( ul );
217
			.appendTo( ul );