diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-16 13:00:35 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-16 13:00:35 +0200 |
commit | 1fb0d5412c7a4a3b888098e492342699d05fe55e (patch) | |
tree | 436bab2e329cf0e3ff2080a4227338c131f85b57 /apps/files/js/breadcrumb.js | |
parent | 43d6650d194105dac30b11fb2ba4a3b3c7805650 (diff) | |
parent | 6fd084243b65a556d4775209ba3916145ef5912a (diff) | |
download | nextcloud-server-1fb0d5412c7a4a3b888098e492342699d05fe55e.tar.gz nextcloud-server-1fb0d5412c7a4a3b888098e492342699d05fe55e.zip |
Merge pull request #6260 from owncloud/jan-navigation-filesidebar
Files app navigation sidebar
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index 5bc2fac1369..c017d710d6d 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -159,7 +159,11 @@ this.totalWidth = 64; // FIXME: this class should not know about global elements if ( $('#navigation').length ) { - this.totalWidth += $('#navigation').get(0).offsetWidth; + this.totalWidth += $('#navigation').outerWidth(); + } + + if ( $('#app-navigation').length && !$('#app-navigation').hasClass('hidden')) { + this.totalWidth += $('#app-navigation').outerWidth(); } this.hiddenBreadcrumbs = 0; @@ -167,8 +171,8 @@ this.totalWidth += $(this.breadcrumbs[i]).get(0).offsetWidth; } - $.each($('#controls .actions>div'), function(index, action) { - self.totalWidth += $(action).get(0).offsetWidth; + $.each($('#controls .actions'), function(index, action) { + self.totalWidth += $(action).outerWidth(); }); }, @@ -236,6 +240,6 @@ } }; - window.BreadCrumb = BreadCrumb; + OCA.Files.BreadCrumb = BreadCrumb; })(); |