Add file action to move files and folders

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-10-14 16:23:11 +02:00
parent 53eb0f7f42
commit fdc2e8ba56
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 14 additions and 0 deletions

View File

@ -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));