From 60bcdc550e95fbf0104bbc9c8028777016d73663 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 19 May 2014 15:20:44 +0200 Subject: Fixed file actions for sharing views FileActions can now be clone to be use for separate file list views without having the side-effect of affecting the main file list view. Added "Open" action in sharing overview file lists to redirect to the regular file list when clicking on a folder. --- apps/files_trashbin/js/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/files_trashbin/js/app.js') diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/js/app.js index aa499ae1791..cf3fb1d0d16 100644 --- a/apps/files_trashbin/js/app.js +++ b/apps/files_trashbin/js/app.js @@ -39,7 +39,8 @@ OCA.Trashbin.App = { fileActions.setDefault('dir', 'Open'); - fileActions.register('all', 'Restore', OC.PERMISSION_READ, OC.imagePath('core', 'actions/history'), function(filename) { + fileActions.register('all', 'Restore', OC.PERMISSION_READ, OC.imagePath('core', 'actions/history'), function(filename, context) { + var fileList = context.fileList; var tr = fileList.findFileEl(filename); var deleteAction = tr.children("td.date").children(".action.delete"); deleteAction.removeClass('delete-icon').addClass('progress-icon'); @@ -54,7 +55,8 @@ OCA.Trashbin.App = { fileActions.register('all', 'Delete', OC.PERMISSION_READ, function() { return OC.imagePath('core', 'actions/delete'); - }, function(filename) { + }, function(filename, context) { + var fileList = context.fileList; $('.tipsy').remove(); var tr = fileList.findFileEl(filename); var deleteAction = tr.children("td.date").children(".action.delete"); -- cgit v1.2.3