summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/breadcrumb.js6
-rw-r--r--apps/files/js/filelist.js4
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) {