Redirect to recycle bin after deletion
This commit is contained in:
committed by
Sebastiaan Janssen
parent
7c8ab96b51
commit
9f9286ae45
@@ -42,7 +42,9 @@ function ContentDeleteController($scope, contentResource, treeService, navigatio
|
||||
|
||||
//If the deleted item lived at the root then just redirect back to the root, otherwise redirect to the item's parent
|
||||
var location = "/content";
|
||||
if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
if ($scope.currentNode.parentId.toString() === "-20")
|
||||
location = "/content/content/recyclebin";
|
||||
else if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
location = "/content/content/edit/" + $scope.currentNode.parentId;
|
||||
|
||||
$location.path(location);
|
||||
|
||||
@@ -41,8 +41,10 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
if (editorState.current && editorState.current.id == $scope.currentNode.id) {
|
||||
|
||||
//If the deleted item lived at the root then just redirect back to the root, otherwise redirect to the item's parent
|
||||
var location = "/media";
|
||||
if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
var location = "/media";
|
||||
if ($scope.currentNode.parentId.toString() === "-21")
|
||||
location = "/media/media/recyclebin";
|
||||
else if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
location = "/media/media/edit/" + $scope.currentNode.parentId;
|
||||
|
||||
$location.path(location);
|
||||
|
||||
Reference in New Issue
Block a user