Fixes: U4-7553 Importing Document Type doesn't respect property sort order
Handling sortOrder property in both import/export.
This commit is contained in:
@@ -379,6 +379,7 @@ namespace Umbraco.Core.Services
|
||||
new XElement("Type", propertyType.PropertyEditorAlias),
|
||||
new XElement("Definition", definition.Key),
|
||||
new XElement("Tab", propertyGroup == null ? "" : propertyGroup.Name),
|
||||
new XElement("SortOrder", propertyType.SortOrder),
|
||||
new XElement("Mandatory", propertyType.Mandatory.ToString()),
|
||||
propertyType.ValidationRegExp != null ? new XElement("Validation", propertyType.ValidationRegExp) : null,
|
||||
propertyType.Description != null ? new XElement("Description", new XCData(propertyType.Description)) : null);
|
||||
|
||||
@@ -658,6 +658,7 @@ namespace Umbraco.Core.Services
|
||||
Description = property.Element("Description") != null ? property.Element("Description").Value : null,
|
||||
Mandatory = property.Element("Mandatory") != null ? property.Element("Mandatory").Value.ToLowerInvariant().Equals("true") : false,
|
||||
ValidationRegExp = property.Element("Validation") != null ? property.Element("Validation").Value : null,
|
||||
SortOrder = property.Element("SortOrder") != null ? int.Parse(property.Element("SortOrder").Value) : 0
|
||||
};
|
||||
|
||||
var tab = property.Element("Tab").Value;
|
||||
|
||||
Reference in New Issue
Block a user