the root folder must not be shared

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2016-10-10 11:57:16 +02:00 committed by Roeland Jago Douma
parent 5bf7e5533d
commit 36cf779140
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 11 additions and 6 deletions

View File

@ -43,12 +43,17 @@
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();
if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) {
var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0;
this.$el.html(this.template({
isShared: isShared
}));
this.$el.show();
this.delegateEvents();
} else {
this.$el.empty();
this.$el.hide();
}
return this;
},