Skip to content

Commit

Permalink
Listen to sharetab changes
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Oct 14, 2016
1 parent 3903f63 commit 3f1e935
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/js/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
});
fileList.registerTabView(shareTab);

var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView();
var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({shareTab: shareTab});
fileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView);
},

Expand Down
11 changes: 11 additions & 0 deletions apps/files_sharing/js/sharebreadcrumbview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -68,6 +76,9 @@
dirInfo: self._dirInfo
});
});
this._shareTab.on('sharesChanged', function(shareModel) {
alert('aaoobb');
});
OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
}
});
Expand Down

0 comments on commit 3f1e935

Please sign in to comment.