mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Update apps.md
This commit is contained in:
parent
1a5f2902e3
commit
4f47b9faa7
1 changed files with 10 additions and 2 deletions
12
apps.md
12
apps.md
|
@ -37,8 +37,16 @@ function timeConverter(UNIX_timestamp) {
|
|||
|
||||
$(document).ready(function () {
|
||||
$.getJSON('/list.json', function(app_list) {
|
||||
console.log(app_list);
|
||||
$.each(app_list, function(app_id, infos) {
|
||||
// Cast as array
|
||||
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;
|
||||
html = $('#app-template').html()
|
||||
.replace(/{app_id}/g, app_id)
|
||||
.replace(/{app_name}/g, infos.manifest.name)
|
||||
|
|
Loading…
Reference in a new issue