diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js index 93b9685155..703d1b8717 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js @@ -243,7 +243,7 @@ // load audit trail when on the info tab evts.push(eventsService.on("app.tabChange", function (event, args) { $timeout(function(){ - if (args.id === -1) { + if (args.alias === "info") { isInfoTab = true; loadAuditTrail(); } else { 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 cceb3ac86f..6a8896b609 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 @@ -1,64 +1,64 @@ -(function() { - 'use strict'; +(function () { + 'use strict'; - function EditorNavigationDirective() { + function EditorNavigationDirective(eventsService) { - function link(scope, el, attr, ctrl) { + function link(scope, el, attr, ctrl) { - scope.showNavigation = true; + scope.showNavigation = true; - scope.clickNavigationItem = function(selectedItem) { - setItemToActive(selectedItem); - runItemAction(selectedItem); - }; + scope.clickNavigationItem = function (selectedItem) { + setItemToActive(selectedItem); + runItemAction(selectedItem); + eventsService.emit("app.tabChange", selectedItem); + }; - function runItemAction(selectedItem) { - if (selectedItem.action) { - selectedItem.action(selectedItem); - } - } - - function setItemToActive(selectedItem) { - // set all other views to inactive - if (selectedItem.view) { - - for (var index = 0; index < scope.navigation.length; index++) { - var item = scope.navigation[index]; - item.active = false; - } - - // set view to active - selectedItem.active = true; - - } - } - - function activate() { - - // hide navigation if there is only 1 item - if (scope.navigation.length <= 1) { - scope.showNavigation = false; + function runItemAction(selectedItem) { + if (selectedItem.action) { + selectedItem.action(selectedItem); + } } - } + function setItemToActive(selectedItem) { + // set all other views to inactive + if (selectedItem.view) { - activate(); + for (var index = 0; index < scope.navigation.length; index++) { + var item = scope.navigation[index]; + item.active = false; + } - } + // set view to active + selectedItem.active = true; + } + } - var directive = { - restrict: 'E', - replace: true, - templateUrl: 'views/components/editor/umb-editor-navigation.html', - scope: { - navigation: "=" - }, - link: link - }; + function activate() { - return directive; - } + // hide navigation if there is only 1 item + if (scope.navigation.length <= 1) { + scope.showNavigation = false; + } - angular.module('umbraco.directives.html').directive('umbEditorNavigation', EditorNavigationDirective); + } + + activate(); + + } + + var directive = { + restrict: 'E', + replace: true, + templateUrl: 'views/components/editor/umb-editor-navigation.html', + scope: { + navigation: "=" + }, + link: link + }; + + return directive; + } + + angular.module('umbraco.directives.html').directive('umbEditorNavigation', EditorNavigationDirective); })();