Merge "Fix issue the deleted item is selected again with batch delete"
This commit is contained in:
commit
13e0a59863
@ -125,8 +125,11 @@
|
||||
deleteModalResult.fail.forEach(function markFailed(item) {
|
||||
result.failed(resourceType, getEntity(item).id);
|
||||
});
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0) {
|
||||
$location.path('/project/container/containers');
|
||||
var indexPath = '/project/container/containers';
|
||||
var currentPath = $location.path();
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0 &&
|
||||
currentPath !== indexPath) {
|
||||
$location.path(indexPath);
|
||||
} else {
|
||||
return result.result;
|
||||
}
|
||||
|
@ -125,8 +125,11 @@
|
||||
deleteModalResult.fail.forEach(function markFailed(item) {
|
||||
result.failed(resourceType, getEntity(item).id);
|
||||
});
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0) {
|
||||
$location.path('/project/container/containers');
|
||||
var indexPath = '/project/container/containers';
|
||||
var currentPath = $location.path();
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0 &&
|
||||
currentPath !== indexPath) {
|
||||
$location.path(indexPath);
|
||||
} else {
|
||||
return result.result;
|
||||
}
|
||||
|
@ -131,8 +131,11 @@
|
||||
deleteModalResult.fail.forEach(function markFailed(item) {
|
||||
result.failed(resourceType, getEntity(item).id);
|
||||
});
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0) {
|
||||
$location.path('/project/container/containers');
|
||||
var indexPath = '/project/container/containers';
|
||||
var currentPath = $location.path();
|
||||
if (result.result.failed.length === 0 && result.result.deleted.length > 0 &&
|
||||
currentPath !== indexPath) {
|
||||
$location.path(indexPath);
|
||||
} else {
|
||||
return result.result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user