summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-11 11:06:26 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-11 11:06:26 +0100
commita823485638256f30e52c46e92b35b53331a7c321 (patch)
tree6555d4a991f6dc66c0b6c5fb6031c98afc709fb3
parentf5be48d81dc4cb2d9e7b1ef340deec2ded042982 (diff)
downloadnextcloud-server-a823485638256f30e52c46e92b35b53331a7c321.tar.gz
nextcloud-server-a823485638256f30e52c46e92b35b53331a7c321.zip
Reload list of shares on directory change
-rw-r--r--apps/files_sharing/js/share.js4
-rw-r--r--core/js/share.js8
2 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index f8d89828f4d..0a01c5af0ad 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -122,6 +122,10 @@
}
});
+ fileList.$el.on('changeDirectory', function() {
+ OCA.Sharing.sharesLoaded = false;
+ });
+
fileActions.registerAction({
name: 'Share',
displayName: '',
diff --git a/core/js/share.js b/core/js/share.js
index b2c1bd5de10..9539e92e09b 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -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) {