Fixes: U4-7553 Importing Document Type doesn't respect property sort order

Handling sortOrder property in both import/export.
This commit is contained in:
Claus
2016-01-06 14:48:37 +01:00
parent 701dea5de7
commit 378479b4c1
2 changed files with 2 additions and 0 deletions

View File

@@ -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);

View File

@@ -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;