Update apps_fr.md

This commit is contained in:
opi@no-log.org 2014-11-20 15:19:14 +01:00 committed by YunoHost
parent f40568dbde
commit 1a5f2902e3

View file

@ -37,8 +37,16 @@ function timeConverter(UNIX_timestamp) {
$(document).ready(function () { $(document).ready(function () {
$.getJSON('/list.json', function(app_list) { $.getJSON('/list.json', function(app_list) {
console.log(app_list); // Cast as array
$.each(app_list, function(app_id, infos) { var app_list = $.map(app_list, function(el) { return el; });
// Sort alpha
app_list.sort(function(a, b){
if (a.manifest.id > b.manifest.id) {return 1;}
else if (a.manifest.id < b.manifest.id) {return -1;}
return 0;
});
$.each(app_list, function(k, infos) {
app_id = infos.manifest.id;
if (typeof infos.manifest.description.fr === 'undefined') { if (typeof infos.manifest.description.fr === 'undefined') {
infos.manifest.description.fr = infos.manifest.description.en; infos.manifest.description.fr = infos.manifest.description.en;
} }