Check if New and Upload buttons exist before adding their width to the total breadcrumbs width
This commit is contained in:
parent
fe6450002d
commit
de7f48b050
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue