diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-25 16:33:08 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-25 16:33:08 -0400 |
commit | 4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78 (patch) | |
tree | 136a050983c8feaa993805ffff53d5aad86f9cff /apps/files/js/files.js | |
parent | 6f58eca5349d8c82f7bba3a7c0f92c0caa8e3749 (diff) | |
download | nextcloud-server-4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78.tar.gz nextcloud-server-4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78.zip |
Make file actions permissions aware
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 8d52b742c1b..2f06f15f896 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -56,7 +56,7 @@ $(document).ready(function() { // Sets the file-action buttons behaviour : $('tr').live('mouseenter',function(event) { - FileActions.display($(this).children('td.filename'), $(this).attr('data-file'), $(this).attr('data-type')); + FileActions.display($(this).children('td.filename')); }); $('tr').live('mouseleave',function(event) { FileActions.hide(); @@ -106,7 +106,8 @@ $(document).ready(function() { if(!renaming && !FileList.isLoading(filename)){ var mime=$(this).parent().parent().data('mime'); var type=$(this).parent().parent().data('type'); - var action=FileActions.getDefault(mime,type); + var permissions = $(this).parent().parent().data('permissions'); + var action=FileActions.getDefault(mime,type, permissions); if(action){ action(filename); } |