Reload list of shares on directory change

This commit is contained in:
Roeland Jago Douma 2016-02-11 11:06:26 +01:00
parent f5be48d81d
commit a823485638
2 changed files with 11 additions and 1 deletions

View File

@ -122,6 +122,10 @@
}
});
fileList.$el.on('changeDirectory', function() {
OCA.Sharing.sharesLoaded = false;
});
fileActions.registerAction({
name: 'Share',
displayName: '',

View File

@ -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) {