diff --git a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js index 6f3f0bff52..30a7e2ac7d 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js @@ -13,7 +13,7 @@ function MainController($scope, $location, appState, treeService, notificationsS //the null is important because we do an explicit bool check on this in the view $scope.authenticated = null; $scope.touchDevice = appState.getGlobalState("touchDevice"); - $scope.editors = []; + $scope.infiniteMode = false; $scope.overlay = {}; $scope.drawer = {}; $scope.search = {}; @@ -160,12 +160,12 @@ function MainController($scope, $location, appState, treeService, notificationsS })); // event for infinite editors - evts.push(eventsService.on("appState.editors.add", function (name, args) { - $scope.editors = args.editors; + evts.push(eventsService.on("appState.editors.open", function (name, args) { + $scope.infiniteMode = args && args.editors.length > 0 ? true : false; })); - evts.push(eventsService.on("appState.editors.remove", function (name, args) { - $scope.editors = args.editors; + evts.push(eventsService.on("appState.editors.close", function (name, args) { + $scope.infiniteMode = args && args.editors.length > 0 ? true : false; })); //ensure to unregister from all events! diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index 8c521ca35e..06b82d6eab 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -241,6 +241,15 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar init(); })); + // event for infinite editors + evts.push(eventsService.on("appState.editors.open", function (name, args) { + $scope.infiniteMode = args && args.editors.length > 0 ? true : false; + })); + + evts.push(eventsService.on("appState.editors.close", function (name, args) { + $scope.infiniteMode = args && args.editors.length > 0 ? true : false; + })); + /** * Based on the current state of the application, this configures the scope variables that control the main tree and language drop down */ diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html index 9d1da590ab..c5b4f69cef 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-navigation.html @@ -19,7 +19,7 @@