diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
index 2be20946b8b6..08306deeba85 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
@@ -22,6 +22,7 @@
background-color: white;
.caret {
+ vertical-align: middle;
transform: rotate(-90deg);
transition: transform 80ms ease-out;
}
@@ -32,7 +33,8 @@
vertical-align: middle;
}
- span {
+ span.name {
+ position: relative;
display: inline-block;
vertical-align: middle;
}
@@ -54,10 +56,55 @@
}
}
- &.--error {
- border-color: @formErrorBorder !important;
+
+ ng-form.ng-invalid-val-server-match-content > .umb-block-list__block > .umb-block-list__block--content > div > & {
+ > button {
+ color: @formErrorText;
+ span.caret {
+ border-top-color: @formErrorText;
+ }
+ }
+ }
+ ng-form.ng-invalid-val-server-match-content > .umb-block-list__block:not(.--active) > .umb-block-list__block--content > div > & {
+ > button {
+ span.name {
+ &::after {
+ content: "!";
+ text-align: center;
+ position: absolute;
+ top: -6px;
+ right: -15px;
+ min-width: 10px;
+ color: @white;
+ background-color: @ui-active-type;
+ border: 2px solid @white;
+ border-radius: 50%;
+ font-size: 10px;
+ font-weight: bold;
+ padding: 2px;
+ line-height: 10px;
+ background-color: @formErrorText;
+ font-weight: 900;
+
+ animation-duration: 1.4s;
+ animation-iteration-count: infinite;
+ animation-name: blockelement-inlineblock-editor--badge-bounce;
+ animation-timing-function: ease;
+ @keyframes blockelement-inlineblock-editor--badge-bounce {
+ 0% { transform: translateY(0); }
+ 20% { transform: translateY(-4px); }
+ 40% { transform: translateY(0); }
+ 55% { transform: translateY(-2px); }
+ 70% { transform: translateY(0); }
+ 100% { transform: translateY(0); }
+ }
+ }
+ }
+ }
}
}
+
+
.blockelement-inlineblock-editor__inner {
border-top: 1px solid @gray-8;
background-color: @gray-12;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.html
index 4aacc32c6245..5e81efec8bb6 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.html
@@ -3,6 +3,6 @@
ng-focus="block.focus"
ng-class="{ '--active': block.active, '--error': parentForm.$invalid && valFormManager.isShowingValidation() }"
val-server-property-class="">
-
+
{{block.label}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
index 51fb7242ef1a..f589249f97fa 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
@@ -24,6 +24,7 @@
}
span {
+ position: relative;
display: inline-block;
vertical-align: middle;
}
@@ -39,7 +40,42 @@
background-color: @ui-active;
}
- &.--error {
- border-color: @formErrorBorder !important;
+ ng-form.ng-invalid-val-server-match-content > .umb-block-list__block > .umb-block-list__block--content > div > & {
+ color: @formErrorText;
+ }
+ ng-form.ng-invalid-val-server-match-content > .umb-block-list__block:not(.--active) > .umb-block-list__block--content > div > & {
+ span {
+ &::after {
+ content: "!";
+ text-align: center;
+ position: absolute;
+ top: -6px;
+ right: -15px;
+ min-width: 10px;
+ color: @white;
+ background-color: @ui-active-type;
+ border: 2px solid @white;
+ border-radius: 50%;
+ font-size: 10px;
+ font-weight: bold;
+ padding: 2px;
+ line-height: 10px;
+ background-color: @formErrorText;
+ font-weight: 900;
+
+ animation-duration: 1.4s;
+ animation-iteration-count: infinite;
+ animation-name: blockelement-inlineblock-editor--badge-bounce;
+ animation-timing-function: ease;
+ @keyframes blockelement-inlineblock-editor--badge-bounce {
+ 0% { transform: translateY(0); }
+ 20% { transform: translateY(-4px); }
+ 40% { transform: translateY(0); }
+ 55% { transform: translateY(-2px); }
+ 70% { transform: translateY(0); }
+ 100% { transform: translateY(0); }
+ }
+ }
+ }
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/unsupportedblock/unsupportedblock.editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/unsupportedblock/unsupportedblock.editor.html
index 84d5dd17b7fb..d860b44b60bf 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/unsupportedblock/unsupportedblock.editor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/unsupportedblock/unsupportedblock.editor.html
@@ -1,12 +1,12 @@
This Block is no longer supported in this context.
You might want to remove this block, or contact your developer to take actions for making this block available again.
-
Learn about this circumstance
+
Learn about this circumstance
Block data:
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.controller.js
index dd9fc7f83db0..ba0d4415f54e 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.controller.js
@@ -51,7 +51,7 @@
vm.requestRemoveBlockByIndex = function (index) {
localizationService.localizeMany(["general_delete", "blockEditor_confirmDeleteBlockMessage", "blockEditor_confirmDeleteBlockNotice"]).then(function (data) {
- var contentElementType = vm.getElementTypeByKey($scope.model.value[index].contentTypeKey);
+ var contentElementType = vm.getElementTypeByKey($scope.model.value[index].contentElementTypeKey);
overlayService.confirmDelete({
title: data[0],
content: localizationService.tokenReplace(data[1], [contentElementType.name]),
@@ -70,19 +70,19 @@
vm.removeBlockByIndex = function (index) {
$scope.model.value.splice(index, 1);
};
-
+
vm.sortableOptions = {
"ui-floating": true,
items: "umb-block-card",
cursor: "grabbing",
placeholder: 'umb-block-card --sortable-placeholder'
};
-
+
vm.getAvailableElementTypes = function () {
return vm.elementTypes.filter(function (type) {
return !$scope.model.value.find(function (entry) {
- return type.key === entry.contentTypeKey;
+ return type.key === entry.contentElementTypeKey;
});
});
};
@@ -99,14 +99,14 @@
//we have to add the 'alias' property to the objects, to meet the data requirements of itempicker.
var selectedItems = Utilities.copy($scope.model.value).forEach((obj) => {
- obj.alias = vm.getElementTypeByKey(obj.contentTypeKey).alias;
+ obj.alias = vm.getElementTypeByKey(obj.contentElementTypeKey).alias;
return obj;
});
var availableItems = vm.getAvailableElementTypes()
localizationService.localizeMany(["blockEditor_headlineCreateBlock", "blockEditor_labelcreateNewElementType"]).then(function(localized) {
-
+
var elemTypeSelectorOverlay = {
view: "itempicker",
title: localized[0],
@@ -133,7 +133,7 @@
};
overlayService.open(elemTypeSelectorOverlay);
-
+
});
};
@@ -158,7 +158,7 @@
vm.addBlockFromElementTypeKey = function(key) {
var entry = {
- "contentTypeKey": key,
+ "contentElementTypeKey": key,
"settingsElementTypeKey": null,
"labelTemplate": "",
"view": null,
@@ -178,7 +178,7 @@
vm.openBlockOverlay = function (block) {
- localizationService.localize("blockEditor_blockConfigurationOverlayTitle", [vm.getElementTypeByKey(block.contentTypeKey).name]).then(function (data) {
+ localizationService.localize("blockEditor_blockConfigurationOverlayTitle", [vm.getElementTypeByKey(block.contentElementTypeKey).name]).then(function (data) {
var clonedBlockData = Utilities.copy(block);
vm.openBlock = block;
@@ -209,7 +209,7 @@
$scope.$on('$destroy', function () {
unsubscribe.forEach(u => { u(); });
});
-
+
onInit();
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.html
index 41dea86131ea..2bd4be15054a 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.html
@@ -11,7 +11,7 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.less
index f4d9caa73b38..878f6a8ef8c7 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.less
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.less
@@ -4,7 +4,7 @@
position: relative;
display: inline-flex;
width: 100%;
- height: auto;
+ height: 100%;
margin-right: 20px;
margin-bottom: 20px;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js
index 0f58b84ee9b1..bb0fefb55808 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js
@@ -20,10 +20,10 @@
loadElementTypes();
function loadElementTypes() {
- return elementTypeResource.getAll().then(function (elementTypes) {
+ return elementTypeResource.getAll().then(function(elementTypes) {
vm.elementTypes = elementTypes;
- vm.contentPreview = vm.getElementTypeByKey(vm.block.contentTypeKey);
+ vm.contentPreview = vm.getElementTypeByKey(vm.block.contentElementTypeKey);
vm.settingsPreview = vm.getElementTypeByKey(vm.block.settingsElementTypeKey);
});
}
@@ -46,7 +46,7 @@
}
};
editorService.documentTypeEditor(editor);
- }
+ };
vm.createElementTypeAndCallback = function(callback) {
const editor = {
@@ -62,9 +62,9 @@
}
};
editorService.documentTypeEditor(editor);
- }
+ };
- vm.addSettingsForBlock = function ($event, block) {
+ vm.addSettingsForBlock = function($event, block) {
localizationService.localizeMany(["blockEditor_headlineAddSettingsElementType", "blockEditor_labelcreateNewElementType"]).then(function(localized) {
@@ -95,11 +95,12 @@
};
overlayService.open(elemTypeSelectorOverlay);
-
});
};
+
vm.applySettingsToBlock = function(block, key) {
block.settingsElementTypeKey = key;
+ vm.settingsPreview = vm.getElementTypeByKey(vm.block.settingsElementTypeKey);
};
vm.requestRemoveSettingsForBlock = function(block) {
@@ -120,11 +121,11 @@
});
});
};
+
vm.removeSettingsForBlock = function(block) {
block.settingsElementTypeKey = null;
};
-
function updateUsedElementTypes(event, args) {
var key = args.documentType.key;
for (var i = 0; i { u(); });
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html
index 9675677c11e5..2b6fdc3983f7 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html
@@ -106,10 +106,10 @@