Commit d6a76043 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

File2: allow copy on drag and drop if ctrl is pressed

parent 75115229
......@@ -226,7 +226,7 @@ define([
this.$refs.menu.show(ev);
ev.preventDefault();
},
handleDrop: function(path, data) {
handleDrop: function(path, data, ev) {
if (data.Files) {
this.view.upload(data.Files, path);
} else {
......@@ -238,7 +238,7 @@ define([
this.$dispatch("ajax", "POST", "/ajax/fs/paste", {
path: path,
paths: JSON.stringify(src),
cut: true,
cut: !ev.ctrlKey,
});
}
}
......
......@@ -8,7 +8,7 @@ define([
else {
if (tarPath && ~types.indexOf("vispa/pathbase:" + tarPath.toLowerCase())) return;
if (!~types.indexOf("vispa/workspace:" + workspaceId)) return;
return ["vispa/file", "vispa/files", "move"];
return ["vispa/file", "vispa/files", ev.ctrlKey ? "copy" : "move"];
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment