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:
@@ -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');
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user