diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditornavigation.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditornavigation.directive.js index 9f4e26f65f..aedb754f3d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditornavigation.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditornavigation.directive.js @@ -22,13 +22,17 @@ angular.module("umbraco.directives") function setItemToActive(selectedItem) { // set all other views to inactive - for (var index = 0; index < scope.navigation.length; index++) { - var item = scope.navigation[index]; - item.active = false; - } + if(selectedItem.view) { - // set view to active - selectedItem.active = true; + for (var index = 0; index < scope.navigation.length; index++) { + var item = scope.navigation[index]; + item.active = false; + } + + // set view to active + selectedItem.active = true; + + } } } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js index edf6b0624b..1ddb089632 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorsubviews.directive.js @@ -7,6 +7,7 @@ angular.module("umbraco.directives") link: function (scope, element, attrs, ctrl) { scope.tools = []; + scope.activeView = {}; // set toolbar from selected navigation item function setToolBar(items) { @@ -15,9 +16,14 @@ angular.module("umbraco.directives") for (var index = 0; index < items.length; index++) { var item = items[index]; + if(item.active && item.tools) { scope.tools = item.tools; } + + if(item.active && item.view) { + scope.activeView = item; + } } } diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-sub-views.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-sub-views.html index fccf113d91..a25918474b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-sub-views.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-sub-views.html @@ -6,10 +6,8 @@ -