diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-17 05:51:12 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-17 05:51:12 -0700 |
commit | 01349850b0ceed7ca1653d500b417c99e144bc65 (patch) | |
tree | dc88e18fa7893730a971f0c756722cc28da63a2a /apps/files_sharing/js/share.js | |
parent | 9c8d1190c0295e4ded8e9812d842af5c65679926 (diff) | |
parent | 8a5c7612390a8755784f6b2dad128936190e7ee0 (diff) | |
download | nextcloud-server-01349850b0ceed7ca1653d500b417c99e144bc65.tar.gz nextcloud-server-01349850b0ceed7ca1653d500b417c99e144bc65.zip |
Merge pull request #5381 from owncloud/files-sharingstateafterupload
Fixed sharing status update for new/uploaded files
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r-- | apps/files_sharing/js/share.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 03ed02f41ef..68f6f3ba76f 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,11 +1,19 @@ $(document).ready(function() { - var disableSharing = $('#disableSharing').data('status'); + var disableSharing = $('#disableSharing').data('status'), + sharesLoaded = false; if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { - $('#fileList').on('fileActionsReady',function(){ - OC.Share.loadIcons('file'); + if (!sharesLoaded){ + OC.Share.loadIcons('file'); + // assume that we got all shares, so switching directories + // will not invalidate that list + sharesLoaded = true; + } + else{ + OC.Share.updateIcons('file'); + } }); FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { |