diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js index 93e67ce874..0b7df15d55 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js @@ -145,8 +145,9 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { * }); * * @param {Object} args arguments object - * @param {Int} args.idd the ID of the node to copy + * @param {Int} args.id the ID of the node to copy * @param {Int} args.parentId the ID of the parent node to copy to + * @param {Boolean} args.relateToOriginal if true, relates the copy to the original through the relation api * @returns {Promise} resourcePromise object. * */ @@ -163,10 +164,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.post(umbRequestHelper.getApiUrl("contentApiBaseUrl", "PostCopy"), - { - parentId: args.parentId, - id: args.id - }), + args), 'Failed to copy content'); }, diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js index a6b43b8169..c915c978e8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js @@ -26,7 +26,7 @@ angular.module("umbraco") }); $scope.copy = function(){ - contentResource.copy({parentId: $scope.target.id, id: node.id}) + contentResource.copy({parentId: $scope.target.id, id: node.id, relateToOriginal: $scope.relate}) .then(function(){ $scope.error = false; $scope.success = true; diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index b0ed707a5c..4a6aee1daa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -1,5 +1,5 @@
@@ -26,6 +26,13 @@
showoptions="false"
eventhandler="dialogTreeEventHandler">
+
+
+