summaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-20 11:44:18 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-30 10:06:29 +0200
commit06e53b359ac806b9103cb617e7a6bad8cbadb519 (patch)
tree777755a967bce2f8f6116ea47a628a92ee7f89c6 /apps/files/js/fileactions.js
parentd21b8108c88b33dbef465c7afc07613ab6466751 (diff)
downloadnextcloud-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.js8
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 () {