Add file action to move files and folders
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
53eb0f7f42
commit
fdc2e8ba56
1 changed files with 14 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue