Keep right sidebar open, add Details action
This commit is contained in:
parent
fb9e75edb6
commit
8a6574e81a
|
@ -219,6 +219,17 @@
|
||||||
this._detailsView.addDetailView(new OCA.Files.MainFileInfoDetailView({fileList: this, fileActions: this.fileActions}));
|
this._detailsView.addDetailView(new OCA.Files.MainFileInfoDetailView({fileList: this, fileActions: this.fileActions}));
|
||||||
this._detailsView.$el.insertBefore(this.$el);
|
this._detailsView.$el.insertBefore(this.$el);
|
||||||
this._detailsView.$el.addClass('disappear');
|
this._detailsView.$el.addClass('disappear');
|
||||||
|
|
||||||
|
this.fileActions.registerAction({
|
||||||
|
name: 'Details',
|
||||||
|
mime: 'all',
|
||||||
|
permissions: OC.PERMISSION_READ,
|
||||||
|
actionHandler: function(fileName, context) {
|
||||||
|
var fileInfo = self.elementToFile(context.$file);
|
||||||
|
self._updateDetailsView(fileInfo);
|
||||||
|
OC.Apps.showAppSidebar();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.find('#controls').prepend(this.breadcrumb.$el);
|
this.$el.find('#controls').prepend(this.breadcrumb.$el);
|
||||||
|
@ -366,7 +377,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fileName) {
|
if (!fileName) {
|
||||||
OC.Apps.hideAppSidebar(this._detailsView.$el);
|
|
||||||
this._detailsView.setFileInfo(null);
|
this._detailsView.setFileInfo(null);
|
||||||
if (this._currentFileModel) {
|
if (this._currentFileModel) {
|
||||||
this._currentFileModel.off();
|
this._currentFileModel.off();
|
||||||
|
@ -384,7 +394,6 @@
|
||||||
|
|
||||||
this._detailsView.setFileInfo(model);
|
this._detailsView.setFileInfo(model);
|
||||||
this._detailsView.$el.scrollTop(0);
|
this._detailsView.$el.scrollTop(0);
|
||||||
_.defer(OC.Apps.showAppSidebar, this._detailsView.$el);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue