From ecb10db0391c98ffe7c4c0abfaeda93d066cfc02 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 13 Oct 2015 11:36:24 +0200 Subject: [PATCH] Remove controls for file lists that don't need it Remove controls from sharing overview and favorite file lists which don't display paths. --- apps/files/css/files.css | 6 ++++-- apps/files/js/filelist.js | 6 +++++- apps/files/templates/simplelist.php | 3 --- apps/files_sharing/templates/list.php | 3 --- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index d0a2cce1a8..4afd7193d5 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -35,13 +35,15 @@ } /* FILE TABLE */ - #filestable { position: relative; - top: 44px; width: 100%; } +#filestable.has-controls { + top: 44px; +} + /* make sure there's enough room for the file actions */ #body-user #filestable { min-width: 688px; /* 768 (mobile break) - 80 (nav width) */ diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 6cf82391ba..246c5bd629 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -226,7 +226,11 @@ } this.breadcrumb = new OCA.Files.BreadCrumb(breadcrumbOptions); - this.$el.find('#controls').prepend(this.breadcrumb.$el); + var $controls = this.$el.find('#controls'); + if ($controls.length > 0) { + $controls.prepend(this.breadcrumb.$el); + this.$table.addClass('has-controls'); + } this._renderNewButton(); diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php index 6b6c018024..ca26d9b5d5 100644 --- a/apps/files/templates/simplelist.php +++ b/apps/files/templates/simplelist.php @@ -1,6 +1,3 @@ -
-
-