Skip move logic if the parent is staying the same (#12937)

* v10/feature/skip-move-logic: add logic to skip move logic when parentId would be the same as before

* v10/feature/skip-move-logic: remove unnecessary checks

* remove check for mediaservice as there is already one in place

* remove unnecessary using

* added parent checks for dictionary items

* changing behaviour for contenttypes, datatypes and mediatypes to show errors on move
This commit is contained in:
CyberReiter
2022-09-09 03:06:50 +02:00
committed by GitHub
parent 1bd0a1f86d
commit 4df012e8e9
8 changed files with 28 additions and 8 deletions

View File

@@ -432,15 +432,13 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter, loca
throw "args.id cannot be null";
}
var promise = localizationService.localize("contentType_moveFailed");
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("contentTypeApiBaseUrl", "PostMove"),
{
parentId: args.parentId,
id: args.id
}, { responseType: 'text' }),
promise);
'Failed to move content type');
},
/**

View File

@@ -208,15 +208,13 @@ function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter, locali
throw "args.id cannot be null";
}
var promise = localizationService.localize("mediaType_moveFailed");
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostMove"),
{
parentId: args.parentId,
id: args.id
}, { responseType: 'text' }),
promise);
'Failed to move media type');
},
copy: function (args) {