Reload list of shares on directory change
This commit is contained in:
parent
f5be48d81d
commit
a823485638
|
@ -122,6 +122,10 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fileList.$el.on('changeDirectory', function() {
|
||||||
|
OCA.Sharing.sharesLoaded = false;
|
||||||
|
});
|
||||||
|
|
||||||
fileActions.registerAction({
|
fileActions.registerAction({
|
||||||
name: 'Share',
|
name: 'Share',
|
||||||
displayName: '',
|
displayName: '',
|
||||||
|
|
|
@ -50,12 +50,18 @@ OC.Share = _.extend(OC.Share || {}, {
|
||||||
* @param callback function to call after the shares were loaded
|
* @param callback function to call after the shares were loaded
|
||||||
*/
|
*/
|
||||||
loadIcons:function(itemType, fileList, callback) {
|
loadIcons:function(itemType, fileList, callback) {
|
||||||
|
var path = fileList.dirInfo.path;
|
||||||
|
if (path === '/') {
|
||||||
|
path = '';
|
||||||
|
}
|
||||||
|
path += '/' + fileList.dirInfo.name;
|
||||||
|
|
||||||
// Load all share icons
|
// Load all share icons
|
||||||
$.get(
|
$.get(
|
||||||
OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',
|
OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',
|
||||||
{
|
{
|
||||||
subfiles: 'true',
|
subfiles: 'true',
|
||||||
path: fileList.dirInfo.path,
|
path: path,
|
||||||
format: 'json'
|
format: 'json'
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
if (result && result.ocs.meta.statuscode === 200) {
|
if (result && result.ocs.meta.statuscode === 200) {
|
||||||
|
|
Loading…
Reference in New Issue