summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-07 11:27:15 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-07 14:58:45 +0100
commitb39a17e49969a626ba561917dc24cfb76b9fcdbc (patch)
tree54488d02683b479ef41fed20aac20a6daa7e7b67 /apps
parent8de4d4f76e524893409ada59ca01dfde1f371241 (diff)
downloadnextcloud-server-b39a17e49969a626ba561917dc24cfb76b9fcdbc.tar.gz
nextcloud-server-b39a17e49969a626ba561917dc24cfb76b9fcdbc.zip
Actually update the state
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/sharebreadcrumbview.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/apps/files_sharing/js/sharebreadcrumbview.js b/apps/files_sharing/js/sharebreadcrumbview.js
index dde044be35a..6f1e0f5ee1b 100644
--- a/apps/files_sharing/js/sharebreadcrumbview.js
+++ b/apps/files_sharing/js/sharebreadcrumbview.js
@@ -77,7 +77,25 @@
});
});
this._shareTab.on('sharesChanged', function(shareModel) {
- alert('aaoobb');
+ var shareTypes = [];
+ var shares = shareModel.getSharesWithCurrentItem();
+
+ for(var i = 0; i < shares.length; i++) {
+ if (shareTypes.indexOf(shares[i].share_type) === -1) {
+ shareTypes.push(shares[i].share_type);
+ }
+ }
+
+ if (shareModel.hasLinkShare()) {
+ shareTypes.push(OC.Share.SHARE_TYPE_LINK);
+ }
+
+ // Since the dirInfo isn't updated we need to do this dark hackery
+ self._dirInfo.shareTypes = shareTypes;
+
+ self.render({
+ dirInfo: self._dirInfo
+ });
});
OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
}