let users share the curren folder

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2016-10-04 19:08:08 +02:00 committed by Roeland Jago Douma
parent c5597baf88
commit bc1cb8a6d0
No known key found for this signature in database
GPG key ID: 1E152838F164D13B
2 changed files with 19 additions and 4 deletions

View file

@ -518,13 +518,16 @@
OC.Apps.showAppSidebar(this._detailsView.$el);
}
var $tr = this.findFileEl(fileName);
var model = this.getModelForFile($tr);
if (_.isObject(fileName)) {
var model = new OCA.Files.FileInfoModel(fileName);
} else {
var $tr = this.findFileEl(fileName);
var model = this.getModelForFile($tr);
$tr.addClass('highlighted');
}
this._currentFileModel = model;
$tr.addClass('highlighted');
this._detailsView.setFileInfo(model);
this._detailsView.$el.scrollTop(0);
},

View file

@ -33,6 +33,10 @@
var BreadCrumbView = OC.Backbone.View.extend({
tagName: 'span',
events: {
click: '_onClick'
},
_dirInfo: undefined,
_template: undefined,
template: function(data) {
if (!this._template) {
@ -41,13 +45,21 @@
return this._template(data);
},
render: function(data) {
this._dirInfo = data.dirInfo;
var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0;
this.$el.html(this.template({
isShared: isShared
}));
this.delegateEvents();
return this;
},
_onClick: function(e) {
e.preventDefault();
OCA.Files.App.fileList.showDetailsView(this._dirInfo, 'shareTabView');
}
});