mirror of
https://github.com/soulaklabs/bitoduc.fr.git
synced 2025-12-09 01:23:24 +00:00
Merge pull request #53 from chmduquesne/gh-pages
Réparation des problèmes de tri pour chrome
This commit is contained in:
11
creuille.js
11
creuille.js
@@ -50,8 +50,15 @@ function construitListe(traductions) {
|
|||||||
traductions = traductions["vrais mots"].concat(traductions["faux mots"]);
|
traductions = traductions["vrais mots"].concat(traductions["faux mots"]);
|
||||||
// tri par ordre alphabétique de la langue de départ
|
// tri par ordre alphabétique de la langue de départ
|
||||||
traductions.sort(function(traduction1, traduction2){
|
traductions.sort(function(traduction1, traduction2){
|
||||||
return (sansAccents(traduction1[langue]) >
|
var s1 = sansAccents(traduction1[langue]);
|
||||||
sansAccents(traduction2[langue]));
|
var s2 = sansAccents(traduction2[langue]);
|
||||||
|
if (s1 > s2) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (s2 > s1) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
$( "#mots" ).html("");
|
$( "#mots" ).html("");
|
||||||
|
|||||||
Reference in New Issue
Block a user