From b3c63c93b6bef0761c4b27c0989e020122868d85 Mon Sep 17 00:00:00 2001 From: opi Date: Fri, 18 Mar 2016 10:49:22 +0100 Subject: [PATCH] [fix] Only display apps with backup script on backup creation page. #227 --- src/js/yunohost/controllers/backup.js | 10 ++-------- src/views/backup/backup_create.ms | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/js/yunohost/controllers/backup.js b/src/js/yunohost/controllers/backup.js index 3f4767ed..389e81d1 100644 --- a/src/js/yunohost/controllers/backup.js +++ b/src/js/yunohost/controllers/backup.js @@ -52,14 +52,8 @@ c.api('/hooks/backup', function(hooks) { data['hooks']=c.groupHooks(hooks['hooks']); data['apps']={}; - c.api('/apps?raw', function(apps) { // http://api.yunohost.org/#!/app/app_list_get_8 - $.each(apps, function(app_id, app) { - if (app['installed']) - data['apps'][app_id]={ - id: app_id, - name: app['manifest']['name'] - }; - }); + c.api('/apps?with_backup', function(apps_list) { + data['apps'] = apps_list.apps; c.view('backup/backup_create', data); }); }); diff --git a/src/views/backup/backup_create.ms b/src/views/backup/backup_create.ms index 00ee3b24..970ac46a 100644 --- a/src/views/backup/backup_create.ms +++ b/src/views/backup/backup_create.ms @@ -33,8 +33,7 @@
-

{{name}} {{id}}

-

{{description}}

+

{{label}} {{id}}

{{/each}}