diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index de2481f090..7b5b728e7d 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -25,10 +25,12 @@ using Umbraco.Core.Persistence.Querying; using Umbraco.Web.PublishedCache; using Umbraco.Core.Events; using Umbraco.Core.Models.Validation; +using Umbraco.Web.Models; +using Umbraco.Web.WebServices; using Umbraco.Web._Legacy.Actions; using Constants = Umbraco.Core.Constants; +using ContentVariation = Umbraco.Core.Models.ContentVariation; using Language = Umbraco.Web.Models.ContentEditing.Language; -using SortNode = Umbraco.Web.Models.ContentEditing.SortNode; namespace Umbraco.Web.Editors { @@ -955,35 +957,6 @@ namespace Umbraco.Web.Editors return Request.CreateNotificationSuccessResponse(Services.TextService.Localize("defaultdialogs/recycleBinIsEmpty")); } - /// - /// Gets child nodes of the current node (parentId) to be sorted - /// - /// The current node in which to sort its children - /// - [HttpGet] - public SortNode GetContentSortOrder(int parentId) - { - var nodes = new List(); - var parent = new SortNode { Id = parentId }; - - var entityService = Services.EntityService; - - // Root node - if (parentId == -1) - { - var rootContent = entityService.GetRootEntities(UmbracoObjectTypes.Document); - nodes.AddRange(rootContent.Select(content => new SortNode(content.Id, content.SortOrder, content.Name, content.CreateDate))); - } - else - { - var children = entityService.GetChildren(parentId); - nodes.AddRange(children.Select(child => new SortNode(child.Id, child.SortOrder, child.Name, child.CreateDate))); - } - - parent.SortNodes = nodes.ToArray(); - return parent; - } - /// /// Change the sort order for content /// diff --git a/src/Umbraco.Web/Models/ContentEditing/SortNode.cs b/src/Umbraco.Web/Models/ContentEditing/SortNode.cs deleted file mode 100644 index 8b53d38808..0000000000 --- a/src/Umbraco.Web/Models/ContentEditing/SortNode.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace Umbraco.Web.Models.ContentEditing -{ - [Serializable] - public class SortNode - { - public int Id { get; set; } - public int SortOrder { get; set; } - public string Name { get; set; } - public DateTime CreateDate { get; set; } - public SortNode[] SortNodes { get; set; } - - public SortNode() - { - } - - public SortNode(int id, int sortOrder, string name, DateTime createDate) - { - Id = Id; - SortOrder = sortOrder; - Name = name; - CreateDate = createDate; - } - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 20dca7ee54..427c7fdd66 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -226,7 +226,6 @@ -