Use the new method instead of the deprecated wrapper

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-02-06 13:34:12 +01:00
parent 5faf6f5186
commit 3580a1a240
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 11 additions and 4 deletions

View File

@ -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({