From 3a7853dcbedad3f03421d9614a5ab8af39075301 Mon Sep 17 00:00:00 2001 From: Shannon Date: Sun, 2 Aug 2015 11:32:43 +0200 Subject: [PATCH] makes sure the bottom bar buttons are moved when resizing the left pane and that their position stays relative during tab changing. --- .../src/common/directives/navresize.directive.js | 3 +++ .../src/common/directives/util/detectfold.directive.js | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/navresize.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/navresize.directive.js index 139a75ca54..e41bad3588 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/navresize.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/navresize.directive.js @@ -31,10 +31,13 @@ angular.module("umbraco.directives") var wrapper = $("#mainwrapper"); var contentPanel = $("#leftcolumn").next(); var apps = $("#applications"); + var bottomBar = contentPanel.find(".umb-bottom-bar"); var navOffeset = ui.element.next(); var leftPanelWidth = ui.element.width() + apps.width(); contentPanel.css({ left: leftPanelWidth }); + bottomBar.css({ left: leftPanelWidth }); + navOffeset.css({ "margin-left": ui.element.outerWidth() }); }, stop: function(e, ui) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/util/detectfold.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/util/detectfold.directive.js index 72ca74a26c..f890ee4989 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/util/detectfold.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/util/detectfold.directive.js @@ -29,6 +29,16 @@ angular.module("umbraco.directives.html") //var belowFold = (el.offset().top + el.height()) > winHeight; if (hasOverflow) { el.addClass("umb-bottom-bar"); + + //I wish we didn't have to put this logic here but unfortunately we + // do. This needs to calculate the left offest to place the bottom bar + // depending on if the left column splitter has been moved by the user + // (based on the nav-resize directive) + var wrapper = $("#mainwrapper"); + var contentPanel = $("#leftcolumn").next(); + var contentPanelLeftPx = contentPanel.css("left"); + + el.css({ left: contentPanelLeftPx }); } } return firstRun;