From 74cbff5ee55bc699ad4759456b11246382d3ff3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 6 May 2019 14:27:15 +0200 Subject: [PATCH] minor rename --- .../src/common/services/copy.service.js | 22 ++++++++++++++++--- .../nestedcontent/nestedcontent.controller.js | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/copy.service.js b/src/Umbraco.Web.UI.Client/src/common/services/copy.service.js index 8bf02e2e97..44bd2430c9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/copy.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/copy.service.js @@ -78,8 +78,7 @@ function clipboardService(notificationsService, eventsService) { * @methodOf umbraco.services.clipboardService * * @description - * Saves a JS-object to the LocalStage of copied entries. - * + * Saves a single JS-object with a type and alias to the clipboard. */ service.copy = function(type, alias, data) { @@ -109,8 +108,25 @@ function clipboardService(notificationsService, eventsService) { }; - service.supportsCopy = supportsLocalStorage; + /** + * @ngdoc method + * @name umbraco.services.supportsCopy#supported + * @methodOf umbraco.services.clipboardService + * + * @description + * Determins wether the current browser is able to performe its actions. + */ + service.isSupported = supportsLocalStorage; + + /** + * @ngdoc method + * @name umbraco.services.supportsCopy#copy + * @methodOf umbraco.services.clipboardService + * + * @description + * Determins wether the current browser is able to performe a copy-action. + */ service.hasEntriesOfType = function(type, aliases) { if(service.retriveEntriesOfType(type, aliases).length > 0) { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js index 6532342074..7a67e07e0c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js @@ -334,7 +334,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop }); } - $scope.showCopy = clipboardService.supportsCopy(); + $scope.showCopy = clipboardService.isSupported(); $scope.showPaste = false;