aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-10-10 17:35:11 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-07 14:58:45 +0100
commitc55718ae5e6eb3ebde519e3a4954e8b339734067 (patch)
tree641fc693d2dcc620d772cc87d6cdc375fee3b927 /apps/files_sharing
parent36cf77914069cd63b4d70d2ca0658f9000cddf78 (diff)
downloadnextcloud-server-c55718ae5e6eb3ebde519e3a4954e8b339734067.tar.gz
nextcloud-server-c55718ae5e6eb3ebde519e3a4954e8b339734067.zip
update breadcrumb view whenever the share information on the directory info model changes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/sharebreadcrumbview.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_sharing/js/sharebreadcrumbview.js b/apps/files_sharing/js/sharebreadcrumbview.js
index c6bf365ba07..d29ba9d05dc 100644
--- a/apps/files_sharing/js/sharebreadcrumbview.js
+++ b/apps/files_sharing/js/sharebreadcrumbview.js
@@ -41,7 +41,7 @@
return this._template(data);
},
render: function(data) {
- this._dirInfo = data.dirInfo;
+ this._dirInfo = data.dirInfo || null;
if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) {
var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0;
@@ -60,7 +60,15 @@
_onClick: function(e) {
e.preventDefault();
- OCA.Files.App.fileList.showDetailsView(this._dirInfo, 'shareTabView');
+ var fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo);
+ var self = this;
+ fileInfoModel.on('change', function() {
+ console.log('CHANGE');
+ self.render({
+ dirInfo: self._dirInfo
+ });
+ });
+ OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
}
});