From bce419fd34461d8ff17980bb2ffb2c51d4666bc1 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Tue, 14 Aug 2018 19:35:59 +0100 Subject: [PATCH] Preserves the ContentType order, as definied in the PreValue Fixes #36 --- .../Web/Controllers/InnerContentApiController.cs | 2 +- .../UI/App_Plugins/InnerContent/views/innercontent.create.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Our.Umbraco.InnerContent/Web/Controllers/InnerContentApiController.cs b/src/Our.Umbraco.InnerContent/Web/Controllers/InnerContentApiController.cs index af6ff1d..1fbc1fc 100644 --- a/src/Our.Umbraco.InnerContent/Web/Controllers/InnerContentApiController.cs +++ b/src/Our.Umbraco.InnerContent/Web/Controllers/InnerContentApiController.cs @@ -35,7 +35,7 @@ public IEnumerable GetAllContentTypes() [HttpGet] public IEnumerable GetContentTypesByGuid([ModelBinder] Guid[] guids) { - var contentTypes = Services.ContentTypeService.GetAllContentTypes(guids).OrderBy(x => x.SortOrder).ToList(); + var contentTypes = Services.ContentTypeService.GetAllContentTypes(guids).OrderBy(x => Array.IndexOf(guids, x.Key)).ToList(); var blueprints = Services.ContentService.GetBlueprintsForContentTypes(contentTypes.Select(x => x.Id).ToArray()).ToArray(); // NOTE: Using an anonymous class, as the `ContentTypeBasic` type is heavier than what we need (for our requirements) diff --git a/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/views/innercontent.create.html b/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/views/innercontent.create.html index b8d815e..ff48ec5 100644 --- a/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/views/innercontent.create.html +++ b/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/views/innercontent.create.html @@ -9,7 +9,7 @@
Select
    -
  • +