Skip to content

Commit

Permalink
Reload list of shares on directory change
Browse files Browse the repository at this point in the history
  • Loading branch information
rullzer committed Feb 11, 2016
1 parent f5be48d commit a823485
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/files_sharing/js/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@
}
});

fileList.$el.on('changeDirectory', function() {
OCA.Sharing.sharesLoaded = false;
});

fileActions.registerAction({
name: 'Share',
displayName: '',
Expand Down
8 changes: 7 additions & 1 deletion core/js/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ OC.Share = _.extend(OC.Share || {}, {
* @param callback function to call after the shares were loaded
*/
loadIcons:function(itemType, fileList, callback) {
var path = fileList.dirInfo.path;
if (path === '/') {
path = '';
}
path += '/' + fileList.dirInfo.name;

// Load all share icons
$.get(
OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',
{
subfiles: 'true',
path: fileList.dirInfo.path,
path: path,
format: 'json'
}, function(result) {
if (result && result.ocs.meta.statuscode === 200) {
Expand Down

0 comments on commit a823485

Please sign in to comment.