From fcbac0138a4f6698fd75d8549e7d0d2c82d38aa3 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 16 Dec 2015 17:23:50 +0100 Subject: [PATCH] U4-7549 For new installs make the Image use the image cropper instead of upload Also fixes issue with media type editor which was a bug resulting fromn(U4-6837) --- .../Migrations/Initial/BaseDataCreation.cs | 2 +- .../src/views/documenttypes/edit.controller.js | 1 - .../src/views/mediatypes/edit.controller.js | 12 ++++++++---- src/Umbraco.Web.UI/web.Template.config | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs index 2a688811d7..5e07a617d4 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs @@ -187,7 +187,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial private void CreateCmsPropertyTypeData() { - _database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = -90, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null }); + _database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null }); _database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null }); _database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null }); _database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null }); diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js index 1307b854f9..e580a76672 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js @@ -236,7 +236,6 @@ }); } - // sort properties after sort order diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js index 14bfbbc580..eb9c0e8998 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js @@ -170,6 +170,13 @@ function init(contentType) { + //get available composite types + mediaTypeResource.getAvailableCompositeContentTypes(contentType.id).then(function (result) { + contentType.availableCompositeContentTypes = result; + // convert legacy icons + convertLegacyIcons(contentType); + }); + // set all tab to inactive if (contentType.groups.length !== 0) { angular.forEach(contentType.groups, function (group) { @@ -181,10 +188,7 @@ }); } - - // convert legacy icons - convertLegacyIcons(contentType); - + // sort properties after sort order angular.forEach(contentType.groups, function (group) { group.properties = $filter('orderBy')(group.properties, 'sortOrder'); diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index a8bb6da508..3595ff54d1 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -140,8 +140,8 @@ - - + +