diff --git a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
index 800f150ee8..580bbe79c9 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
@@ -102,6 +102,26 @@
open(editor);
}
+ /**
+ * @ngdoc method
+ * @name umbraco.services.editorService#copy
+ * @methodOf umbraco.services.editorService
+ *
+ * @description
+ * Opens a copy editor in infinite editing, the submit callback returns an array of selected items
+ * @param {String} editor.section The node entity type
+ * @param {String} editor.currentNode The current node id
+ * @param {Callback} editor.submit Saves, submits, and closes the editor
+ * @param {Callback} editor.close Closes the editor
+ * @returns {Object} editor object
+ */
+
+ function copy(editor) {
+ editor.view = "views/common/infiniteeditors/copy/copy.html";
+ editor.size = "small";
+ open(editor);
+ }
+
/**
* @ngdoc method
* @name umbraco.services.editorService#mediaEditor
@@ -363,6 +383,7 @@
mediaEditor: mediaEditor,
contentEditor: contentEditor,
contentPicker: contentPicker,
+ copy: copy,
mediaPicker: mediaPicker,
iconPicker: iconPicker,
documentTypeEditor: documentTypeEditor,
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
index e2d8443548..e21581abd1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
@@ -1,4 +1,4 @@
-function listViewController($rootScope, $scope, $routeParams, $injector, currentUserResource, notificationsService, iconHelper, dialogService, editorState, localizationService, $location, appState, $timeout, $q, mediaResource, listViewHelper, userService, navigationService, treeService) {
+function listViewController($scope, $routeParams, $injector, currentUserResource, notificationsService, iconHelper, editorState, localizationService, appState, $timeout, mediaResource, listViewHelper, navigationService, editorService) {
//this is a quick check to see if we're in create mode, if so just exit - we cannot show children for content
// that isn't created yet, if we continue this will use the parent id in the route params which isn't what
@@ -498,28 +498,22 @@ function listViewController($rootScope, $scope, $routeParams, $injector, current
});
}
- $scope.copy = function () {
- $scope.copyDialog = {};
- $scope.copyDialog.section = $scope.entityType;
- $scope.copyDialog.currentNode = $scope.contentId;
- $scope.copyDialog.view = "copy";
- $scope.copyDialog.show = true;
-
- $scope.copyDialog.submit = function (model) {
- if (model.target) {
- performCopy(model.target, model.relateToOriginal);
- }
-
- $scope.copyDialog.show = false;
- $scope.copyDialog = null;
- };
-
- $scope.copyDialog.close = function (oldModel) {
- $scope.copyDialog.show = false;
- $scope.copyDialog = null;
- };
-
- };
+ $scope.copy = function () {
+ var copyEditor = {
+ section: $scope.entityType,
+ currentNode: $scope.contentId,
+ submit: function(model) {
+ if (model.target) {
+ performCopy(model.target, model.relateToOriginal);
+ }
+ editorService.close();
+ },
+ close: function() {
+ editorService.close();
+ }
+ };
+ editorService.copy(copyEditor);
+ };
function performCopy(target, relateToOriginal) {
applySelected(
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html
index 3df37f6306..4358ca6fdb 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html
@@ -181,13 +181,6 @@
view="moveDialog.view">
-
-
-