From ef1d4cdb7daf05b182f90438d6581f74265992c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 19 Jun 2020 15:08:18 +0200 Subject: [PATCH] bringing the runtime block key back --- .../src/common/services/blockeditormodelobject.service.js | 5 ++--- .../views/propertyeditors/blocklist/blocklist.component.html | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js index e623c93efd..0a02398de1 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js @@ -403,8 +403,6 @@ this.scaffolds = []; - this.watchers = []; - this.isolatedScope = propertyScope.$new(true); this.isolatedScope.blockObjects = {}; @@ -527,6 +525,7 @@ * The Block Object setups live syncronization of content and settings models back to the data of your Property Editor model. * The returned object, named ´BlockObject´, contains several usefull models to make editing of this block happen. * The ´BlockObject´ contains the following properties: + * - key {string}: runtime generated key, usefull for tracking of this object * - content {Object}: Content model, the content data in a ElementType model. * - settings {Object}: Settings model, the settings data in a ElementType model. * - config {Object}: A local deep copy of the block configuration model. @@ -576,6 +575,7 @@ blockObject.cloneNode = function() { return null;// angularJS accept this as a cloned value as long as the } + blockObject.key = String.CreateGuid().replace(/-/g, ""); blockObject.config = Utilities.copy(blockConfiguration); if (blockObject.config.label && blockObject.config.label !== "") { blockObject.labelInterpolator = $interpolate(blockObject.config.label); @@ -763,7 +763,6 @@ delete this.propertyEditorAlias; delete this.blockConfigurations; delete this.scaffolds; - delete this.watchers; this.isolatedScope.$destroy(); delete this.isolatedScope; } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.html index 5c6ab259ac..ea3537b52a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklist.component.html @@ -6,7 +6,7 @@
-
+