From 9a12a7e8162673bd0d9ef135c97919446d600503 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Fri, 4 Oct 2024 16:48:02 -0400 Subject: [PATCH] drag and drop files into folders --- public/js/dashboard.js | 16 ++++++++++++++++ views/dashboard/files.erb | 17 +++++++++++++++-- views/dashboard/index.erb | 9 ++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/public/js/dashboard.js b/public/js/dashboard.js index 33eb40d2..5e2d9c2f 100644 --- a/public/js/dashboard.js +++ b/public/js/dashboard.js @@ -30,6 +30,22 @@ function hideUploadProgress() { $('#uploadingOverlay').css('display', 'none') } +function showMovingProgress() { + $('#movingOverlay').css('display', 'block'); +} + +function hideMovingProgress() { + $('#movingOverlay').css('display', 'none'); +} + +function moveFile(fileName, folderName) { + console.log(fileName); + console.log(folderName); + $('#moveCurrentPath').val(fileName.slice(1)); + $('#moveNewPath').val(folderName + fileName); + $('#moveFileForm').submit(); +} + $('#createDir').on('shown', function () { $('#newDirInput').focus(); }) diff --git a/views/dashboard/files.erb b/views/dashboard/files.erb index b207e719..e6776625 100644 --- a/views/dashboard/files.erb +++ b/views/dashboard/files.erb @@ -1,3 +1,16 @@ + + \ No newline at end of file + diff --git a/views/dashboard/index.erb b/views/dashboard/index.erb index eccb1219..6170bc62 100644 --- a/views/dashboard/index.erb +++ b/views/dashboard/index.erb @@ -112,6 +112,13 @@ +
+ + + + +
+
<% if !current_site.plan_feature(:no_file_restrictions) %> @@ -170,4 +177,4 @@
-