From 1faa4bf4e91021ac8c60fedfc702fcbd1a077cee Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 5 Mar 2014 16:28:48 +0100 Subject: [PATCH] Unused prototype code to allow drag-n-drop of folders --- .../Server/webroot/scripts/editdialog.js | 87 +++++++++++++++++++ .../Server/webroot/stylesheets/editdialog.css | 4 + 2 files changed, 91 insertions(+) diff --git a/Duplicati/Server/webroot/scripts/editdialog.js b/Duplicati/Server/webroot/scripts/editdialog.js index 691d4b98b..5fae1f2c2 100644 --- a/Duplicati/Server/webroot/scripts/editdialog.js +++ b/Duplicati/Server/webroot/scripts/editdialog.js @@ -710,4 +710,91 @@ $(document).ready(function() { APP_UTIL.fill_form($('#edit-dialog-form'), data['Backup'][d], EDIT_BACKUP.fill_form_map, d); }); + /* + + Too bad, we can drop files and folders, + but not read the paths, only the contents. + That seems to make sense for web apps, + but not cross-local like this + + if(window.FileReader) { + var dragHandler = function(e) { + e = e || window.event; + + if (e.preventDefault) { e.preventDefault(); } + + var dt = e.dataTransfer; + if (!dt && e.originalEvent) + dt = e.originalEvent.dataTransfer; + + if (dt != null) + { + var allFiles = true; + for (var i=0; i