diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-20 11:44:18 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-30 10:06:29 +0200 |
commit | 06e53b359ac806b9103cb617e7a6bad8cbadb519 (patch) | |
tree | 777755a967bce2f8f6116ea47a628a92ee7f89c6 /apps/files/js/fileactions.js | |
parent | d21b8108c88b33dbef465c7afc07613ab6466751 (diff) | |
download | nextcloud-server-06e53b359ac806b9103cb617e7a6bad8cbadb519.tar.gz nextcloud-server-06e53b359ac806b9103cb617e7a6bad8cbadb519.zip |
Added "dir" in file actions handler context and fixed versions
Added "dir" in file actions handler context so that handlers can know
what the path of the file was without having to look it up from the file
list.
Fixed versions app to use the context.dir instead of the old $('#dir')
element. This makes the versions popup work in the sharing overview.
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 1242fea7f99..a12b1f03423 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -138,11 +138,13 @@ self.currentFile = event.data.elem; var file = self.getCurrentFile(); + var $tr = $(this).closest('tr'); event.data.actionFunc(file, { - $file: $(this).closest('tr'), + $file: $tr, fileList: fileList || OCA.Files.App.fileList, - fileActions: self + fileActions: self, + dir: $tr.attr('data-path') || fileList.getCurrentDirectory() }); }; @@ -210,7 +212,7 @@ } if (triggerEvent){ - $('#fileList').trigger(jQuery.Event("fileActionsReady")); + fileList.$fileList.trigger(jQuery.Event("fileActionsReady")); } }, getCurrentFile: function () { |