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:
Shannon
2013-11-11 17:54:42 +11:00
parent 3111a2d22f
commit 57e98fda97
5 changed files with 8 additions and 7 deletions

View File

@@ -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

View File

@@ -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(",") });
});
}

View File

@@ -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)] });
});
}

View File

@@ -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 });
});
}

View File

@@ -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