From 837622cb87aedaf0a6b753d92b00a2fe3475ea2c Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 5 Apr 2023 11:40:40 +0200 Subject: fix: Adjust filepicker breadcrumb structure to recent a11y changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/src/OC/dialogs.js | 12 ++++++++---- core/templates/filepicker.html | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js index 45e9e99049d..54d81171679 100644 --- a/core/src/OC/dialogs.js +++ b/core/src/OC/dialogs.js @@ -1290,11 +1290,13 @@ const Dialogs = { this.$dirTree.empty() var self = this + self.$dirTree.append('') self.$dirTree.append(addButton) var dir var path = this.$filePicker.data('path') - var $template = $('
{name}
').addClass('crumb') + var $template = $('
  • {name}
  • ').addClass('crumb') + var $breadcrumbs = $('') if (path) { var paths = path.split('/') $.each(paths, function(index, dir) { @@ -1302,18 +1304,20 @@ const Dialogs = { if (dir === '') { return false } - self.$dirTree.prepend($template.octemplate({ + $breadcrumbs.append($template.octemplate({ dir: paths.join('/') + '/' + dir, name: dir })) }) } - $template.octemplate({ dir: '', name: t('core', 'Home'), - }, { escapeFunction: null }).prependTo(this.$dirTree) + classList: 'icon-home' + }, { escapeFunction: null }).addClass('crumb svg crumbhome').prependTo($breadcrumbs) + + this.$dirTree.find('nav').prepend($breadcrumbs) }, /** * handle selection made in the tree list diff --git a/core/templates/filepicker.html b/core/templates/filepicker.html index 484a6e12d2b..21ac2856d34 100644 --- a/core/templates/filepicker.html +++ b/core/templates/filepicker.html @@ -1,5 +1,6 @@
    - + +