Browse Source

Added desktop move file to shortcut feature

TC pushbot 5 4 years ago
parent
commit
e081dc0ce2
1 changed files with 14 additions and 3 deletions
  1. 14 3
      web/desktop.system

+ 14 - 3
web/desktop.system

@@ -3492,7 +3492,6 @@
                 targetFd = JSON.parse(decodeURIComponent(targetFd));
 
                 //Move it
-                console.log(moveSources, targetFd.Filepath);
                 moveSourceFilesToTarget(moveSources, targetFd.Filepath)
 
             } else if (target.attr("type") == "shortcut") {
@@ -3532,7 +3531,20 @@
                     openFileWithModule(shortcutModule, openFileList);
                 } else if (shortcutType == "folder") {
                     //Move the source file into this folder
-                    alert("wip");
+                    var moveSources = [sourceFilepath];
+                    if ($(".launchIconWrapper.selected").length > 1){
+                        //Multi move operations
+                        moveSources = [];
+                        $(".launchIconWrapper.selected").each(function(){
+                            var thisFileData = $(this).parent().attr("filedata");
+                            thisFileData = JSON.parse(decodeURIComponent(thisFileData));
+                            moveSources.push(thisFileData.Filepath);
+                        });
+                    }
+
+                    //Extract shortcut info from the target
+                    var targetPath = shortcutData.ShortcutPath;
+                    moveSourceFilesToTarget(moveSources, targetPath);
                 }
 
             } else {
@@ -3580,7 +3592,6 @@
                     }
                 });
             });
-           
         }
 
         function requestCSRFToken(callback){