From 3580a1a24096ccde98f109c167a16d8f4cddce44 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 6 Feb 2019 13:34:12 +0100 Subject: [PATCH] Use the new method instead of the deprecated wrapper Signed-off-by: Joas Schilling --- apps/files/js/fileactions.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index ef29551c59..a844fba40a 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({