diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js index bfe5b43521..ccd69be1e0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js @@ -243,6 +243,22 @@ block.showSettings = block.config.settingsElementTypeKey != null; block.showCopy = vm.supportCopy && block.config.contentElementTypeKey != null;// if we have content, otherwise it doesn't make sense to copy. + block.setParentForm = function (parentForm) { + this._parentForm = parentForm; + } + block.activate = activateBlock.bind(null, block); + block.edit = function () { + var blockIndex = vm.layout.indexOf(this.layout); + editBlock(this, false, blockIndex, this._parentForm); + } + block.editSettings = function () { + var blockIndex = vm.layout.indexOf(this.layout); + editBlock(this, true, blockIndex, this._parentForm); + } + block.requestDelete = requestDeleteBlock.bind(null, block); + block.delete = deleteBlock.bind(null, block); + block.copy = copyBlock.bind(null, block); + return block; } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js index 206fb0bb3a..4531612cba 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js @@ -41,6 +41,9 @@ // Guess we'll leave it for now but means all things need to be copied to the $scope and then all // primitives need to be watched. + // let the Block know about its form + model.block.setParentForm(model.parentForm); + $scope.block = model.block; $scope.api = model.api; $scope.index = model.index;