From e6e6d94b7835680dc66f382d4d803f718760cac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 17 Jun 2020 15:31:46 +0200 Subject: [PATCH] Dont copy unsupported blocks --- .../views/propertyeditors/blocklist/blocklist.component.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.js index 4d170009d5..ab97382571 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.js @@ -134,7 +134,6 @@ // Append the blockObjects to our layout. vm.layout.forEach(entry => { if (entry.$block === undefined || entry.$block === null) { - console.log("We are creating a BlockObject for", entry.udi); var block = getBlockObject(entry); // If this entry was not supported by our property-editor it would return 'null'. @@ -369,9 +368,11 @@ } var requestCopyAllBlocks = function() { + + var elementTypesToCopy = vm.layout.filter(entry => entry.$block.config.unsupported !== true).map(entry => entry.$block.content); // list aliases - var aliases = vm.layout.map(entry => entry.$block.content.contentTypeAlias); + var aliases = elementTypesToCopy.map(content => content.contentTypeAlias); // remove dublicates aliases = aliases.filter((item, index) => aliases.indexOf(item) === index); @@ -382,8 +383,6 @@ } // TODO: check if we are in an overlay and then lets get the Label of this block. - var elementTypesToCopy = vm.layout.map(entry => entry.$block.content); - localizationService.localize("clipboard_labelForArrayOfItemsFrom", [vm.model.label, contentNodeName]).then(function(localizedLabel) { clipboardService.copyArray("elementTypeArray", aliases, elementTypesToCopy, localizedLabel, "icon-thumbnail-list", vm.model.id); });