diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-07 05:53:17 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 13:04:39 +0100 |
commit | 396154d7e420d17f103962dff45c4f8cebd59f45 (patch) | |
tree | e75fd062c92f48635ded7749ea0ed700eada6e29 /apps | |
parent | 9d3af829f2cdee369aee93250f330b50e57f2505 (diff) | |
download | nextcloud-server-396154d7e420d17f103962dff45c4f8cebd59f45.tar.gz nextcloud-server-396154d7e420d17f103962dff45c4f8cebd59f45.zip |
Fixed click in menu
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/breadcrumb.js | 6 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index f087a76a046..6fbb5c07289 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -113,6 +113,9 @@ * Renders the breadcrumb elements */ render: function() { + // Hide menu on render + OC.hideMenus(); + var parts = this._makeCrumbs(this.dir || '/'); var $crumb; var $menuItem; @@ -156,7 +159,8 @@ for (var i = 0; i < parts.length; i++) { var part = parts[i]; if(part.dir) { - $menuItem = $('<li><a><span></span></a></li>'); + $menuItem = $('<li class="crumblist"><a><span></span></a></li>'); + $menuItem.data('dir', part.dir); $menuItem.find('a').attr('href', this.getCrumbUrl(part, i)); $menuItem.find('span').text(part.name); this.$menu.children('ul').append($menuItem); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e69fec9b0c8..6c71260f176 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -836,8 +836,8 @@ * Event handler when clicking on a bread crumb */ _onClickBreadCrumb: function(e) { - console.log('Clicked breadcrumb ', e); - var $el = $(e.target).closest('.crumb'), + // Select a crumb or a crumb in the menu + var $el = $(e.target).closest('.crumb, .crumblist'), $targetDir = $el.data('dir'); if ($targetDir !== undefined && e.which === 1) { |