Fixes setting the 'section' on a tree node, fixes the editors syncTree call to not force reload when routing to the editor - this will still load in the data for the tree if it is missing, just won't force reload the individual tree node loading.
This commit is contained in:
@@ -43,12 +43,13 @@ function treeService($q, treeResource, iconHelper, notificationsService, $rootSc
|
||||
|
||||
treeNodes[i].level = childLevel;
|
||||
treeNodes[i].parent = parentNode;
|
||||
|
||||
|
||||
//set the section for each tree node - this allows us to reference this easily when accessing tree nodes
|
||||
treeNodes[i].section = section;
|
||||
|
||||
//if there is not route path specified, then set it automatically,
|
||||
//if this is a tree root node then we want to route to the section's dashboard
|
||||
if (!treeNodes[i].routePath) {
|
||||
//set the section for each tree node - this allows us to reference this easily when accessing tree nodes
|
||||
treeNodes[i].section = section;
|
||||
|
||||
if (treeNodes[i].metaData && treeNodes[i].metaData["treeAlias"]) {
|
||||
//this is a root node
|
||||
|
||||
@@ -162,7 +162,7 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, cont
|
||||
// if there are any and then clear them so the collection no longer persists them.
|
||||
serverValidationManager.executeAndClearAllSubscriptions();
|
||||
|
||||
navigationService.syncTree({ tree: "content", path: data.path.split(","), forceReload: true });
|
||||
navigationService.syncTree({ tree: "content", path: data.path.split(",") });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ function DataTypeEditController($scope, $routeParams, $location, navigationServi
|
||||
// if there are any and then clear them so the collection no longer persists them.
|
||||
serverValidationManager.executeAndClearAllSubscriptions();
|
||||
|
||||
navigationService.syncTree({ tree: "datatype", path: [String(data.id)], forceReload: true });
|
||||
navigationService.syncTree({ tree: "datatype", path: [String(data.id)] });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ function mediaEditController($scope, $routeParams, mediaResource, navigationServ
|
||||
// if there are any and then clear them so the collection no longer persists them.
|
||||
serverValidationManager.executeAndClearAllSubscriptions();
|
||||
|
||||
navigationService.syncTree({ tree: "media", path: data.path, forceReload: true });
|
||||
navigationService.syncTree({ tree: "media", path: data.path });
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, memb
|
||||
var path = data.name[0]+"," + data.key;
|
||||
path = path.replace(/-/g,'');
|
||||
|
||||
navigationService.syncTree({ tree: "member", path: path.split(","), forceReload: true });
|
||||
navigationService.syncTree({ tree: "member", path: path.split(",") });
|
||||
|
||||
//in one particular special case, after we've created a new item we redirect back to the edit
|
||||
// route but there might be server validation errors in the collection which we need to display
|
||||
|
||||
Reference in New Issue
Block a user