diff options
author | Robin Appelman <robin@icewind.nl> | 2016-10-14 16:23:11 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-10-14 16:23:11 +0200 |
commit | fdc2e8ba56c530fbbca5392b8a3752ac7ef53601 (patch) | |
tree | 130f80a348765aac3d45e3630e45cfc3e5b32c00 /apps/files/js | |
parent | 53eb0f7f42fc324fa15fee87ff673f7e358a4fce (diff) | |
download | nextcloud-server-fdc2e8ba56c530fbbca5392b8a3752ac7ef53601.tar.gz nextcloud-server-fdc2e8ba56c530fbbca5392b8a3752ac7ef53601.zip |
Add file action to move files and folders
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/fileactions.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 015635c2e1d..8d2178578e5 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -617,6 +617,20 @@ } }); + this.registerAction({ + name: 'Move', + displayName: t('files', 'Move'), + mime: 'all', + order: -25, + permissions: OC.PERMISSION_UPDATE, + iconClass: 'icon-rename', + actionHandler: function (filename, context) { + OC.dialogs.filepicker(t('files', 'Target folder'), function(targetPath) { + context.fileList.move(filename, targetPath); + }, false, "httpd/unix-directory", true); + } + }); + this.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory(); context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10)); |