From e704899e2229428c7da1a247409794f7462ec34d Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 3 Oct 2018 18:09:48 +0200 Subject: [PATCH] Show view toggle in controls bar Signed-off-by: Jan-Christoph Borchardt --- apps/files/css/files.scss | 19 +++++++++++++++++++ apps/files/js/filelist.js | 2 +- apps/files/templates/list.php | 3 ++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index 6a2aa604c6..82c244cff0 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -866,3 +866,22 @@ table.dragshadow td.size { } } } + +/* Grid view toggle */ +.view-toggle { + background-color: transparent; + border: none; + margin: 0; + padding: 22px; + opacity: .5; + + &:hover, + &:focus { + opacity: 1; + } +} + +/* Hide legacy Gallery toggle */ +#gallery-button { + display: none; +} diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2f61fe71db..441b8f0a12 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -328,7 +328,7 @@ this.$el.find('thead th .columntitle').click(_.bind(this._onClickHeader, this)); // Toggle for grid view - $('#view-button').on('click', this._onGridToggle); + $('#view-toggle').on('click', this._onGridToggle); this._onResize = _.debounce(_.bind(this._onResize, this), 250); $('#app-content').on('appresized', this._onResize); diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 8238ec82f5..c77cbb4d7c 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -24,6 +24,7 @@ + - +