Merge pull request #203 from nextcloud/breadcrumb-fixes

Breadcrumb fixes
This commit is contained in:
Olivier Paroz 2017-03-12 00:10:56 +01:00 committed by GitHub
commit ed760ecf5c
2 changed files with 11 additions and 7 deletions

View File

@ -351,7 +351,3 @@ http://www.bypeople.com/author/comatosed/*/
.mask.transparent {
opacity: 0;
}
.icon-loading-dark.small {
background-size: 16px;
}

View File

@ -112,7 +112,7 @@
* Shows the dark spinner on the crumb
*/
showLoader: function () {
$(this).children('a').addClass("icon-loading-dark small");
$(this).addClass("icon-loading-small-dark");
},
/**
@ -243,11 +243,17 @@
// We go through the array in reverse order
var crumbsElement = crumbs.get().reverse();
$(crumbsElement).each(function () {
$(this).click(self.showLoader);
if ($(this).hasClass('home')) {
$(this).show();
if (self.breadcrumbs.length > 2) {
$(this).click(self.showLoader);
}
return;
}
// 1st sub-album has no-parent and the breadcrumbs contain home, ellipsis and last
if (self.breadcrumbs.length > 3) {
$(this).click(self.showLoader);
}
if ($(this).hasClass('ellipsis')) {
self.ellipsis = $(this);
return;
@ -260,7 +266,9 @@
if (self.breadcrumbsElement.width() > availableWidth) {
shorten = true;
$(this).hide();
ellipsisPath = $(this).data('dir');
if (!ellipsisPath) {
ellipsisPath = $(this).data('dir');
}
}
});