summaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index f342f21a4fb..4525da876e3 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -711,6 +711,30 @@
});
this.registerAction({
+ name: 'EditLocally',
+ displayName: function(context) {
+ var locked = context.$file.data('locked');
+ if (!locked) {
+ return t('files', 'Edit locally');
+ }
+ },
+ mime: 'all',
+ order: -23,
+ iconClass: function(filename, context) {
+ var locked = context.$file.data('locked');
+ if (!locked) {
+ return 'icon-rename';
+ }
+ },
+ permissions: OC.PERMISSION_UPDATE,
+ actionHandler: function (filename, context) {
+ var dir = context.dir || context.fileList.getCurrentDirectory();
+ var path = dir === '/' ? dir + filename : dir + '/' + filename;
+ context.fileList.openLocalClient(path);
+ },
+ });
+
+ this.registerAction({
name: 'Open',
mime: 'dir',
permissions: OC.PERMISSION_READ,