diff options
author | Simon L <szaimen@e.mail.de> | 2022-05-04 11:16:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 11:16:23 +0300 |
commit | 602f44954fc53324808067a68085b4e7c90ce313 (patch) | |
tree | a8d120889f354792b5bcdb3a9069eb51aad664c0 /apps/files/js/breadcrumb.js | |
parent | de4cb6fa5eb4a85a17ff6df2d968924c93bd3307 (diff) | |
parent | e8f1ad060e399e29559ac700a04eaa116ae5c51c (diff) |
Merge pull request #32219 from nextcloud/backport/32218/stable24
[stable24] Revert "Show the child folders in the breadcrumb menu when on a parent entry."
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index 8a5d42bd975..383d3debd09 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -58,9 +58,7 @@ BreadCrumb.prototype = { $el: null, dir: null, - maxDepthDir: null, dirInfo: null, - activeItemIndex: 0, /** * Total width of all breadcrumbs @@ -83,9 +81,6 @@ dir = dir.replace(/\\/g, '/'); dir = dir || '/'; if (dir !== this.dir) { - if ((this.maxDepthDir || "").search(dir) !== 0) { - this.maxDepthDir = dir; - } this.dir = dir; this.render(); } @@ -123,7 +118,7 @@ // Menu is destroyed on every change, we need to init it OC.unregisterMenu($('.crumbmenu > .icon-more'), $('.crumbmenu > .popovermenu')); - var parts = this._makeCrumbs(this.maxDepthDir || '/'); + var parts = this._makeCrumbs(this.dir || '/'); var $crumb; var $menuItem; this.$el.empty(); @@ -168,7 +163,7 @@ if(menuPart.dir) { $menuItem = $('<li class="crumblist"><a><span class="icon-folder"></span><span></span></a></li>'); $menuItem.data('dir', menuPart.dir); - $menuItem.find('a').attr('href', this.getCrumbUrl(menuPart, j)); + $menuItem.find('a').attr('href', this.getCrumbUrl(part, j)); $menuItem.find('span:eq(1)').text(menuPart.name); this.$menu.children('ul').append($menuItem); if (this.onClick) { @@ -176,16 +171,11 @@ } } } - _.each(this._detailViews, function(view) { view.render({ dirInfo: this.dirInfo }); - - if (this.breadcrumbs.length > 2) { - this.breadcrumbs[this.activeItemIndex + 2].append(view.$el); - } - + $crumb.append(view.$el); $menuItem.append(view.$el.clone(true)); }, this); @@ -238,15 +228,8 @@ for (var i = 0; i < parts.length; i++) { var part = parts[i]; pathToHere = pathToHere + '/' + part; - - let classes = ""; - if (pathToHere === this.dir) { - this.activeItemIndex = i; - classes = "active"; - } crumbs.push({ dir: pathToHere, - class: classes, name: part }); } |