diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-16 12:28:19 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-08-07 01:22:43 +0200 |
commit | b6192db61076b04005388b889d6ec666f3e87687 (patch) | |
tree | c04c68966aa1c820eaf18afb6ee7ffe27266c660 /apps/files/js/filelist.js | |
parent | deb9d4d7788948db627c4b18cd646e39e7190827 (diff) | |
download | nextcloud-server-b6192db61076b04005388b889d6ec666f3e87687.tar.gz nextcloud-server-b6192db61076b04005388b889d6ec666f3e87687.zip |
Disable right sidebar in public file list page
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 796b14199d8..e228b8e852b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -23,6 +23,7 @@ * @param [options.scrollContainer] scrollable container, defaults to $(window) * @param [options.dragOptions] drag options, disabled by default * @param [options.folderDropOptions] folder drop options, disabled by default + * @param [options.detailsViewEnabled=true] whether to enable details view */ var FileList = function($el, options) { this.initialize($el, options); @@ -210,10 +211,12 @@ } this.breadcrumb = new OCA.Files.BreadCrumb(breadcrumbOptions); - this._detailsView = new OCA.Files.DetailsView(); - this._detailsView.addDetailView(new OCA.Files.MainFileInfoDetailView()); - this.$el.append(this._detailsView.$el); - this._detailsView.$el.addClass('disappear'); + if (_.isUndefined(options.detailsViewEnabled) || options.detailsViewEnabled) { + this._detailsView = new OCA.Files.DetailsView(); + this._detailsView.addDetailView(new OCA.Files.MainFileInfoDetailView()); + this.$el.append(this._detailsView.$el); + this._detailsView.$el.addClass('disappear'); + } this.$el.find('#controls').prepend(this.breadcrumb.$el); @@ -285,6 +288,10 @@ * @param {OCA.Files.FileInfo} fileInfo file info to display */ _updateDetailsView: function(fileInfo) { + if (!this._detailsView) { + return; + } + var self = this; var oldFileInfo = this._detailsView.getFileInfo(); if (oldFileInfo) { @@ -403,7 +410,7 @@ this.updateSelectionSummary(); } else { // clicked directly on the name - if ($(event.target).is('.nametext') || $(event.target).closest('.nametext').length) { + if (!this._detailsView || $(event.target).is('.nametext') || $(event.target).closest('.nametext').length) { var filename = $tr.attr('data-file'); var renaming = $tr.data('renaming'); if (!renaming) { |