diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-06 17:33:50 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-06 17:37:10 -0400 |
commit | de7f48b0509a60835643c9776bfd9e0626a76440 (patch) | |
tree | f889830b2a257a5afeca4b536e1ee10b198e7463 /apps/files/js | |
parent | fe6450002d6059260c743f48b6f40378454fa1dc (diff) | |
download | nextcloud-server-de7f48b0509a60835643c9776bfd9e0626a76440.tar.gz nextcloud-server-de7f48b0509a60835643c9776bfd9e0626a76440.zip |
Check if New and Upload buttons exist before adding their width to the total breadcrumbs width
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/files.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 1b51b0e5df9..935101e86e2 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -536,7 +536,7 @@ $(document).ready(function() { var lastWidth = 0; var breadcrumbs = []; - var breadcrumbsWidth = $('#navigation').get(0).offsetWidth + $('#controls .actions').get(0).offsetWidth; + var breadcrumbsWidth = $('#navigation').get(0).offsetWidth; var hiddenBreadcrumbs = 0; $.each($('.crumb'), function(index, breadcrumb) { @@ -544,6 +544,10 @@ $(document).ready(function() { breadcrumbsWidth += $(breadcrumb).get(0).offsetWidth; }); + if ($('#controls .actions').length > 0) { + breadcrumbsWidth += $('#controls .actions').get(0).offsetWidth; + } + function resizeBreadcrumbs(firstRun) { var width = $(this).width(); if (width != lastWidth) { |