Fixes: U4-3440 Tempates (MVC Views) tree sync doesn't work correctly

This commit is contained in:
Shannon
2013-11-19 17:17:39 +11:00
parent d3b8ac31c7
commit 5fc82fef18
3 changed files with 15 additions and 8 deletions

View File

@@ -23,6 +23,9 @@ angular.module("umbraco.directives")
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {

View File

@@ -194,6 +194,9 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
if (args.activate === undefined || args.activate === true) {
//set the current selected node
appState.setTreeState("selectedNode", args.node);
//when a node is activated, this is the same as clicking it and we need to set the
//current menu item to be this node as well.
appState.setMenuState("currentNode", args.node);
}
});
@@ -254,6 +257,8 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
//put this node into the tree state
appState.setTreeState("selectedNode", args.node);
//when a node is clicked we also need to set the active menu node to this node
appState.setMenuState("currentNode", args.node);
//not legacy, lets just set the route value and clear the query string if there is one.
$location.path(n.routePath).search("");