diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-01 21:32:04 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-01 21:32:04 +0200 |
commit | 025b71d068bf530581693af67a31a56dca24beb1 (patch) | |
tree | 1d3aeda7b7f569b02adf96399896b1a59c307913 /apps/files/js/fileactions.js | |
parent | 509cdebab7bb99c34467b053a2e596f48a10399d (diff) | |
download | nextcloud-server-025b71d068bf530581693af67a31a56dca24beb1.tar.gz nextcloud-server-025b71d068bf530581693af67a31a56dca24beb1.zip |
Use fileActionsReady to re-render sharing icons
Whenever file actions are modified, either by registering new actions or
when appending a new page of entries, the sharing app is now notified so
it can correctly refresh the sharing icon status.
Additionally, the core's loadIcons() method is also used to load the
existing shares and also refresh the sharing icons afterwards.
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index fc7c9ccacef..e06d2912274 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -181,11 +181,12 @@ return; } this.currentFile = parent; + var $tr = parent.closest('tr'); var self = this; var actions = this.getActions(this.getCurrentMimeType(), this.getCurrentType(), this.getCurrentPermissions()); var file = this.getCurrentFile(); var nameLinks; - if (parent.closest('tr').data('renaming')) { + if ($tr.data('renaming')) { return; } @@ -278,7 +279,7 @@ } if (triggerEvent){ - fileList.$fileList.trigger(jQuery.Event("fileActionsReady", {fileList: fileList})); + fileList.$fileList.trigger(jQuery.Event("fileActionsReady", {fileList: fileList, $files: $tr})); } }, getCurrentFile: function () { |