Listen to sharetab changes

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-10-14 11:21:40 +02:00
parent c55718ae5e
commit 1190ce1dd5
No known key found for this signature in database
GPG key ID: 1E152838F164D13B
2 changed files with 12 additions and 1 deletions

View file

@ -174,7 +174,7 @@
});
fileList.registerTabView(shareTab);
var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView();
var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({shareTab: shareTab});
fileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView);
},

View file

@ -34,6 +34,14 @@
},
_dirInfo: undefined,
_template: undefined,
/** @type OCA.Sharing.ShareTabView */
_shareTab: undefined,
initialize: function(options) {
this._shareTab = options.shareTab;
},
template: function(data) {
if (!this._template) {
this._template = Handlebars.compile(TEMPLATE);
@ -68,6 +76,9 @@
dirInfo: self._dirInfo
});
});
this._shareTab.on('sharesChanged', function(shareModel) {
alert('aaoobb');
});
OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
}
});