diff --git a/src/js/yunohost/controllers/backup.js b/src/js/yunohost/controllers/backup.js index 42a5d455..0d2eab44 100644 --- a/src/js/yunohost/controllers/backup.js +++ b/src/js/yunohost/controllers/backup.js @@ -102,19 +102,21 @@ data.locale = y18n.locale; c.view('backup/backup_info', data, function() { - // Configure buttons "select all" and "select none" - - // Remove active style from buttons - $(".select_all-none input").click(function(){ $(this).toggleClass("active"); }); // Select all checkbox in this panel - $(".select_all").click(function(){ + $('button[data-action="select_all"]').on('click', function() { $(this).parents(".panel").children(".list-group").find("input").prop("checked", true); }); + // Deselect all checkbox in this panel - $(".select_none").click(function(){ + $('button[data-action="select_none"]').on('click', function() { $(this).parents(".panel").children(".list-group").find("input").prop("checked", false); }); + $('button[data-action="download"]').on('click', function() { + var archive = $(this).data('archive'); + window.open('https://' + store.get('url') + '/backup/download/'+archive, '_blank'); + }); + // Delete button $('button[data-action="delete"]').on('click', function() { var storage = $(this).data('storage'); diff --git a/src/views/backup/backup_info.ms b/src/views/backup/backup_info.ms index 117558a7..92b9dbaf 100644 --- a/src/views/backup/backup_info.ms +++ b/src/views/backup/backup_info.ms @@ -9,7 +9,13 @@