diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-08 10:57:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-08 10:57:16 +0100 |
commit | fda3f4fc4188cc95f18926f0601f3dd698be9c79 (patch) | |
tree | 425880195007cb98e55e61fd2a4d06107a82a44b /apps/files | |
parent | b40603d2501059752db43bafb74ef5c11eb57b99 (diff) | |
parent | 3580a1a24096ccde98f109c167a16d8f4cddce44 (diff) | |
download | nextcloud-server-fda3f4fc4188cc95f18926f0601f3dd698be9c79.tar.gz nextcloud-server-fda3f4fc4188cc95f18926f0601f3dd698be9c79.zip |
Merge pull request #14060 from nextcloud/bugfix/noid/use-new-method
Use the new method instead of the deprecated wrapper
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/fileactions.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index ef29551c591..a844fba40a3 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -64,7 +64,7 @@ * Removes an event handler * * @param {String} eventName event name - * @param Function callback + * @param {Function} callback */ off: function(eventName, callback) { this.$el.off(eventName, callback); @@ -664,9 +664,16 @@ } }); - 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)); + this.registerAction({ + name: 'Open', + mime: 'dir', + permissions: OC.PERMISSION_READ, + icon: '', + actionHandler: 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)); + }, + displayName: t('files', 'Open') }); this.registerAction({ |