Reload the recycle bin when deleting an item (#3820)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
7149ebcb68
commit
87478163ed
@@ -30,9 +30,13 @@ function ContentDeleteController($scope, contentResource, treeService, navigatio
|
||||
var recycleBin = treeService.getDescendantNode(rootNode, -20);
|
||||
if (recycleBin) {
|
||||
recycleBin.hasChildren = true;
|
||||
//reload the recycle bin if it's already expanded so the deleted item is shown
|
||||
if (recycleBin.expanded) {
|
||||
treeService.loadNodeChildren({ node: recycleBin, section: "content" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if the current edited item is the same one as we're deleting, we need to navigate elsewhere
|
||||
if (editorState.current && editorState.current.id == $scope.currentNode.id) {
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
var recycleBin = treeService.getDescendantNode(rootNode, -21);
|
||||
if (recycleBin) {
|
||||
recycleBin.hasChildren = true;
|
||||
//reload the recycle bin if it's already expanded so the deleted item is shown
|
||||
if (recycleBin.expanded) {
|
||||
treeService.loadNodeChildren({ node: recycleBin, section: "media" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user