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:35:22 -0400 |
commit | 7c0a5d4a5933c5c9fa91956452a15d57c505284d (patch) | |
tree | 49f2b76ba1f60ef020dbb9a62e8d2a88ea709df8 /apps/files/js | |
parent | a96a75c263f541064dcde57af4e01db0b40c0c80 (diff) | |
download | nextcloud-server-7c0a5d4a5933c5c9fa91956452a15d57c505284d.tar.gz nextcloud-server-7c0a5d4a5933c5c9fa91956452a15d57c505284d.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 c980ba003d0..049afea4f61 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -545,7 +545,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) { @@ -553,6 +553,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) { |