diff --git a/app/assets/javascripts/clients.js b/app/assets/javascripts/clients.js index 1a77cee..f28100b 100644 --- a/app/assets/javascripts/clients.js +++ b/app/assets/javascripts/clients.js @@ -1,39 +1,41 @@ $(document).ready(function() { if ($('#select-files').size() > 0) { $('#file-selector').hide(); + $('#reset-button').hide(); $('#select-files').click(function() { $('#file-selector').show(); + $('#reset-button').show(); }); } }); $(document).ready(function() { if ($('#file-submitter').size() > 0) { $("#file-tree").on("select_node.jstree", function(evt, data) { add_input(data.node.id); }); $("#file-tree").on("deselect_node.jstree", function(evt, data) { remove_input(data.node.id); }); } if ($('#invitation_user_id').size() > 0) { $('#invitation_user_id').chosen(); } }); function add_input(id) { $('#file-submitter'). append(''); if ($('.js-file-input').size() > 0 && $('#file-submitter > input[type="submit"]').attr('disabled') == 'disabled') { $('#file-submitter > input[type="submit"]').attr('disabled', false); } } function remove_input(id) { $('#js-file-id-' + id).remove(); if ($('.js-file-input').size() == 0) { $('#file-submitter > input[type="submit"]').attr('disabled', true); } } diff --git a/app/views/clients/_file_selector.html.erb b/app/views/clients/_file_selector.html.erb index 10f3e61..7b7c98c 100644 --- a/app/views/clients/_file_selector.html.erb +++ b/app/views/clients/_file_selector.html.erb @@ -1,15 +1,22 @@
Can not issue a restore for this client. It does not have any successful backups