diff --git a/app/assets/javascripts/clients.js b/app/assets/javascripts/clients.js index f28100b..3a433e5 100644 --- a/app/assets/javascripts/clients.js +++ b/app/assets/javascripts/clients.js @@ -1,41 +1,46 @@ $(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); + if (data.instance.is_leaf(data.node)) { + add_input(data.node.id, $('#file-tree').jstree(true).get_path(data.node, '/')); + } }); $("#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) { +function add_input(id, name) { $('#file-submitter'). append(''); + $('#restore_data_files'). + append('
Can not issue a restore for this client. It does not have any successful backups