diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs
index 0efa678d4e..9a910e131a 100644
--- a/src/Umbraco.Core/Constants-Applications.cs
+++ b/src/Umbraco.Core/Constants-Applications.cs
@@ -58,6 +58,11 @@
///
public const string Media = "media";
+ ///
+ /// alias for the datatype tree.
+ ///
+ public const string DataTypes = "datatype";
+
//TODO: Fill in the rest!
}
diff --git a/src/Umbraco.Core/DataTypesResolver.cs b/src/Umbraco.Core/DataTypesResolver.cs
index 325afe8690..76061b252d 100644
--- a/src/Umbraco.Core/DataTypesResolver.cs
+++ b/src/Umbraco.Core/DataTypesResolver.cs
@@ -8,6 +8,7 @@ namespace Umbraco.Core
///
/// A resolver to return all IDataType objects
///
+ [Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
internal sealed class DataTypesResolver : LegacyTransientObjectsResolver
{
///
diff --git a/src/Umbraco.Core/Services/DataTypeService.cs b/src/Umbraco.Core/Services/DataTypeService.cs
index cb5d5f0cc0..68c0f308bd 100644
--- a/src/Umbraco.Core/Services/DataTypeService.cs
+++ b/src/Umbraco.Core/Services/DataTypeService.cs
@@ -290,6 +290,7 @@ namespace Umbraco.Core.Services
///
/// Id of the DataType, which corresponds to the Guid Id of the control
/// object
+ [Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
public IDataType GetDataTypeById(Guid id)
{
return DataTypesResolver.Current.GetById(id);
@@ -299,6 +300,7 @@ namespace Umbraco.Core.Services
/// Gets a complete list of all registered 's
///
/// An enumerable list of objects
+ [Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
public IEnumerable GetAllDataTypes()
{
return DataTypesResolver.Current.DataTypes;
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
index abd1a436a3..452a442a11 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
@@ -386,12 +386,14 @@ function iconHelper() {
{ oldIcon: ".sprTreePackage", newIcon: "icon-dropbox" },
{ oldIcon: ".sprTreeRepository", newIcon: "icon-github" },
+ { oldIcon: ".sprTreeSettingDataType", newIcon: "icon-tasks" },
+
//TODO:
/*
{ oldIcon: ".sprTreeSettingAgent", newIcon: "" },
{ oldIcon: ".sprTreeSettingCss", newIcon: "" },
{ oldIcon: ".sprTreeSettingCssItem", newIcon: "" },
- { oldIcon: ".sprTreeSettingDataType", newIcon: "" },
+
{ oldIcon: ".sprTreeSettingDataTypeChild", newIcon: "" },
{ oldIcon: ".sprTreeSettingDomain", newIcon: "" },
{ oldIcon: ".sprTreeSettingLanguage", newIcon: "" },
diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config
index 78e9dfc0db..e263be1c66 100644
--- a/src/Umbraco.Web.UI/config/trees.Release.config
+++ b/src/Umbraco.Web.UI/config/trees.Release.config
@@ -2,12 +2,12 @@
-
-
+
+
-
-
+
+
@@ -21,7 +21,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config
index 14bbd2b560..eb184f5625 100644
--- a/src/Umbraco.Web.UI/config/trees.config
+++ b/src/Umbraco.Web.UI/config/trees.config
@@ -1,11 +1,11 @@
-
+
+
-
+
+
@@ -17,7 +17,7 @@
-
+
@@ -39,8 +39,4 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/DataTypeTreeController.cs b/src/Umbraco.Web/Trees/DataTypeTreeController.cs
new file mode 100644
index 0000000000..c9159b336b
--- /dev/null
+++ b/src/Umbraco.Web/Trees/DataTypeTreeController.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http.Formatting;
+using System.Web.Http;
+using Umbraco.Core;
+using Umbraco.Web.Trees.Menu;
+using umbraco.BusinessLogic.Actions;
+
+namespace Umbraco.Web.Trees
+{
+ [Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, "Data Types")]
+ public class DataTypeTreeController : TreeApiController
+ {
+ protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
+ {
+ //we only support one tree level for data types
+ if (id != Constants.System.Root.ToInvariantString())
+ {
+ throw new HttpResponseException(HttpStatusCode.NotFound);
+ }
+
+ var collection = new TreeNodeCollection();
+ collection.AddRange(
+ Services.DataTypeService.GetAllDataTypeDefinitions()
+ .OrderBy(x => x.Name)
+ .Select(dt =>
+ CreateTreeNode(
+ dt.Id.ToInvariantString(),
+ queryStrings,
+ dt.Name,
+ "icon-tasks",
+ false)));
+ return collection;
+ }
+
+ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
+ {
+ var menu = new MenuItemCollection();
+
+ if (id == Constants.System.Root.ToInvariantString())
+ {
+ // root actions
+ menu.AddMenuItem();
+ menu.AddMenuItem(true);
+ return menu;
+ }
+
+ //only have delete for each node
+ menu.AddMenuItem();
+ return menu;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/MediaTreeController.cs b/src/Umbraco.Web/Trees/MediaTreeController.cs
index a3bbbab977..0ea1954456 100644
--- a/src/Umbraco.Web/Trees/MediaTreeController.cs
+++ b/src/Umbraco.Web/Trees/MediaTreeController.cs
@@ -41,7 +41,7 @@ namespace Umbraco.Web.Trees
if (id == Constants.System.Root.ToInvariantString())
{
- // default actions for all users
+ // root actions
menu.AddMenuItem();
menu.AddMenuItem(true);
menu.AddMenuItem(true);
diff --git a/src/Umbraco.Web/Trees/TreeApiController.cs b/src/Umbraco.Web/Trees/TreeApiController.cs
index 424d53fa90..4370e33028 100644
--- a/src/Umbraco.Web/Trees/TreeApiController.cs
+++ b/src/Umbraco.Web/Trees/TreeApiController.cs
@@ -169,7 +169,7 @@ namespace Umbraco.Web.Trees
var node = new TreeNode(
rootNodeAsString,
- "", //root nodes aren't expandable, no need to lookup the child nodes url
+ Url.GetTreeUrl(GetType(), rootNodeAsString, queryStrings),
Url.GetMenuUrl(GetType(), rootNodeAsString, queryStrings))
{
HasChildren = true,
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index 9c34f2c0ff..8244f001e9 100644
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -303,6 +303,7 @@
+
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
index 39eb33e31f..986ea82796 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
@@ -18,6 +18,7 @@ namespace umbraco.cms.presentation.Trees
/// An abstract tree class for the content application.
/// Has built in methods for handling all of the request parameters specific to the content tree.
///
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public abstract class BaseContentTree : BaseTree
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs
index f4e4684c72..0c2d24f0a2 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs
@@ -15,6 +15,8 @@ using Property = umbraco.cms.businesslogic.property.Property;
namespace umbraco.cms.presentation.Trees
{
+
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public abstract class BaseMediaTree : BaseTree
{
private DisposableTimer _timer;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/ContentRecycleBin.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/ContentRecycleBin.cs
index aff51792be..06f450abd1 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/ContentRecycleBin.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/ContentRecycleBin.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Text;
using umbraco.businesslogic;
using umbraco.cms.businesslogic;
@@ -13,7 +14,7 @@ namespace umbraco.cms.presentation.Trees
///
/// Handles loading the content tree into umbraco's application tree
///
- [Tree(Constants.Applications.Content, "contentRecycleBin", "Recycle Bin", "folder.gif", "folder_o.gif", initialize: false)]
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public class ContentRecycleBin : BaseContentTree
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/MediaRecycleBin.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/MediaRecycleBin.cs
index 199e8a2018..6c88c37e88 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/MediaRecycleBin.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/MediaRecycleBin.cs
@@ -30,7 +30,7 @@ using Umbraco.Core;
namespace umbraco.cms.presentation.Trees
{
- [Tree(Constants.Applications.Media, "mediaRecycleBin", "Recycle Bin", "folder.gif", "folder_o.gif", initialize : false)]
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public class MediaRecycleBin : BaseMediaTree
{
public MediaRecycleBin(string application) : base(application) { }
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs
index abd79a204a..eca9d79c2e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs
@@ -1,17 +1,19 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using umbraco.BusinessLogic.Actions;
using umbraco.businesslogic;
using umbraco.cms.businesslogic.web;
using umbraco.cms.presentation.Trees;
using umbraco.interfaces;
using Umbraco.Core;
+using Action = umbraco.BusinessLogic.Actions.Action;
namespace umbraco
{
///
/// Handles loading the content tree into umbraco's application tree
///
- [Tree(Constants.Applications.Content, "content", "Content", silent: true)]
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public class loadContent : BaseContentTree
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDataTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDataTypes.cs
index 870b7d08cb..9d833bbd4d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDataTypes.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDataTypes.cs
@@ -31,8 +31,8 @@ namespace umbraco
{
///
/// Handles loading of all datatypes into the developer application tree
- ///
- [Tree(Constants.Applications.Developer, "datatype", "Data Types", sortOrder: 1)]
+ ///
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public class loadDataTypes : BaseTree
{
public loadDataTypes(string application) : base(application) { }
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMedia.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMedia.cs
index 80a1e4d307..c1fec19e6f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMedia.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMedia.cs
@@ -10,7 +10,7 @@ using Umbraco.Core;
namespace umbraco
{
- [Tree(Constants.Applications.Media, "media", "Media")]
+ [Obsolete("This is no longer used and will be removed from the codebase in the future")]
public class loadMedia : BaseMediaTree
{
diff --git a/src/umbraco.interfaces/IDataType.cs b/src/umbraco.interfaces/IDataType.cs
index e3543dd064..72d611a843 100644
--- a/src/umbraco.interfaces/IDataType.cs
+++ b/src/umbraco.interfaces/IDataType.cs
@@ -7,6 +7,7 @@ namespace umbraco.interfaces
/// It consists of IdataEditor which provides the Editing UI, the IDataPrevalue which provides prevalues and th their editing UI
/// And finally it contains IData which manages the actual data in the Data Type
///
+ [Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
public interface IDataType
{
///