diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-08-27 15:28:26 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-09-15 16:53:10 +0200 |
commit | 246a5a5750dd2b8f990797b2c6cc4270a9a5b59d (patch) | |
tree | 5fd3e6bdfe70f6d1afdcd2bd2f9ed0f2c5a3c03d /apps/files/js/fileactions.js | |
parent | 8500e114575d7e02ffda8070980cc77ba147e60f (diff) | |
download | nextcloud-server-246a5a5750dd2b8f990797b2c6cc4270a9a5b59d.tar.gz nextcloud-server-246a5a5750dd2b8f990797b2c6cc4270a9a5b59d.zip |
Allow files to be copied through action menu & multiple files actions
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/files/js/fileactions.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 3e0cf998254..527cbc0bd34 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -631,6 +631,20 @@ } }); + this.registerAction({ + name: 'Copy', + displayName: t('files', 'Copy'), + mime: 'all', + order: -25, + permissions: OC.PERMISSION_READ, + iconClass: 'icon-external', + actionHandler: function (filename, context) { + OC.dialogs.filepicker(t('files', 'Target folder'), function(targetPath) { + context.fileList.copy(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)); |