V8: Support mixed element variance in Nested Content (#5952)

(cherry picked from commit e7a9ee8142)
This commit is contained in:
Kenn Jacobsen
2019-08-15 13:10:17 +02:00
committed by Sebastiaan Janssen
parent 9d77114d50
commit 7e8364eae4

View File

@@ -489,32 +489,30 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
node.key = fromNcEntry && fromNcEntry.key ? fromNcEntry.key : String.CreateGuid();
for (var v = 0; v < node.variants.length; v++) {
var variant = node.variants[v];
for (var t = 0; t < variant.tabs.length; t++) {
var tab = variant.tabs[t];
var variant = node.variants[0];
for (var t = 0; t < variant.tabs.length; t++) {
var tab = variant.tabs[t];
for (var p = 0; p < tab.properties.length; p++) {
var prop = tab.properties[p];
for (var p = 0; p < tab.properties.length; p++) {
var prop = tab.properties[p];
prop.propertyAlias = prop.alias;
prop.alias = $scope.model.alias + "___" + prop.alias;
// Force validation to occur server side as this is the
// only way we can have consistency between mandatory and
// regex validation messages. Not ideal, but it works.
prop.validation = {
mandatory: false,
pattern: ""
};
prop.propertyAlias = prop.alias;
prop.alias = $scope.model.alias + "___" + prop.alias;
// Force validation to occur server side as this is the
// only way we can have consistency between mandatory and
// regex validation messages. Not ideal, but it works.
prop.validation = {
mandatory: false,
pattern: ""
};
if (fromNcEntry && fromNcEntry[prop.propertyAlias]) {
prop.value = fromNcEntry[prop.propertyAlias];
}
if (fromNcEntry && fromNcEntry[prop.propertyAlias]) {
prop.value = fromNcEntry[prop.propertyAlias];
}
}
}
$scope.nodes.push(node);
return node;