From 8d0c5cc66a50e9a77d471b9177ecb26db1b323a5 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 17 Nov 2022 14:02:51 +0100 Subject: Limit toggle grid view button scope Limit the button action scope to the file picker dialog so that it doesn't touch the file list present in the page. Signed-off-by: Vincent Petry Signed-off-by: nextcloud-command --- core/src/OC/dialogs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js index c29d59aaad8..3e4344ac677 100644 --- a/core/src/OC/dialogs.js +++ b/core/src/OC/dialogs.js @@ -1065,7 +1065,7 @@ const Dialogs = { 'aria-label', isGridView ? t('files', 'Show grid view') : t('files', 'Show list view'), ) - $('.list-container').toggleClass('view-grid', !isGridView) + this.$filePicker.find('.list-container').toggleClass('view-grid', !isGridView) }, _getFilePickerTemplate: function() { var defer = $.Deferred() @@ -1169,7 +1169,7 @@ const Dialogs = { var files = await getFolderContents('/') this.$filePicker.data('path', '/') } - + self.filelist = files if (filter && filter.length > 0 && filter.indexOf('*') === -1) { files = files.filter(function(file) { -- cgit v1.2.3