Merge pull request #964 from umbraco/temp-U4-6890

U4-6890 New content type editor: Missing sorting of properties from s…
This commit is contained in:
Shannon Deminick
2015-12-22 15:04:47 +01:00
4 changed files with 1 additions and 16 deletions

View File

@@ -231,11 +231,6 @@
});
}
// sort properties after sort order
angular.forEach(contentType.groups, function (group) {
group.properties = $filter('orderBy')(group.properties, 'sortOrder');
});
// insert template on new doc types
if (!$routeParams.notemplate && contentType.id === 0) {
contentType.defaultTemplate = contentTypeHelper.insertDefaultTemplatePlaceholder(contentType.defaultTemplate);

View File

@@ -181,11 +181,6 @@
});
}
// sort properties after sort order
angular.forEach(contentType.groups, function (group) {
group.properties = $filter('orderBy')(group.properties, 'sortOrder');
});
// convert icons for content type
convertLegacyIcons(contentType);

View File

@@ -136,11 +136,6 @@
// convert legacy icons
convertLegacyIcons(contentType);
// sort properties after sort order
angular.forEach(contentType.groups, function (group) {
group.properties = $filter('orderBy')(group.properties, 'sortOrder');
});
//set a shared state
editorState.set(contentType);

View File

@@ -155,7 +155,7 @@ namespace Umbraco.Web.Models.Mapping
{
var mappedProperties = new List<PropertyTypeDisplay>();
foreach (var p in properties.Where(x => x.DataTypeDefinitionId != 0) )
foreach (var p in properties.Where(x => x.DataTypeDefinitionId != 0).OrderBy(x => x.SortOrder))
{
var propertyEditor = _propertyEditorResolver.Value.GetByAlias(p.PropertyEditorAlias);
var preValues = _applicationContext.Services.DataTypeService.GetPreValuesCollectionByDataTypeId(p.DataTypeDefinitionId);