diff --git a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Trees/LegacyTestTree.cs b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Trees/LegacyTestTree.cs
index bfc0583813..3d6832282f 100644
--- a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Trees/LegacyTestTree.cs
+++ b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Trees/LegacyTestTree.cs
@@ -2,9 +2,9 @@
using System.Net.Http.Formatting;
using System.Text;
using Umbraco.Core;
+using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.Trees;
-using Umbraco.Web.Trees.Menu;
using umbraco.cms.presentation.Trees;
using Constants = Umbraco.Core.Constants;
diff --git a/src/Umbraco.Web/Trees/SearchResultItem.cs b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs
similarity index 91%
rename from src/Umbraco.Web/Trees/SearchResultItem.cs
rename to src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs
index 37513f6ea5..573ce75366 100644
--- a/src/Umbraco.Web/Trees/SearchResultItem.cs
+++ b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs
@@ -1,25 +1,25 @@
-namespace Umbraco.Web.Trees
-{
- public class SearchResultItem
- {
- ///
- /// The string representation of the ID, used for Web responses
- ///
- public string Id { get; set; }
-
- ///
- /// The name/title of the search result item
- ///
- public string Title { get; set; }
-
- ///
- /// The rank of the search result
- ///
- public int Rank { get; set; }
-
- ///
- /// Description/Synopsis of the item
- ///
- public string Description { get; set; }
- }
+namespace Umbraco.Web.Models.ContentEditing
+{
+ public class SearchResultItem
+ {
+ ///
+ /// The string representation of the ID, used for Web responses
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// The name/title of the search result item
+ ///
+ public string Title { get; set; }
+
+ ///
+ /// The rank of the search result
+ ///
+ public int Rank { get; set; }
+
+ ///
+ /// Description/Synopsis of the item
+ ///
+ public string Description { get; set; }
+ }
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/Menu/ActionMenuItem.cs b/src/Umbraco.Web/Models/Trees/ActionMenuItem.cs
similarity index 96%
rename from src/Umbraco.Web/Trees/Menu/ActionMenuItem.cs
rename to src/Umbraco.Web/Models/Trees/ActionMenuItem.cs
index 74d7cb0364..d8e259dbbd 100644
--- a/src/Umbraco.Web/Trees/Menu/ActionMenuItem.cs
+++ b/src/Umbraco.Web/Models/Trees/ActionMenuItem.cs
@@ -1,42 +1,42 @@
-using System;
-using Umbraco.Core;
-
-namespace Umbraco.Web.Trees.Menu
-{
- ///
- /// A menu item that represents some JS that needs to execute when the menu item is clicked.
- ///
- ///
- /// These types of menu items are rare but they do exist. Things like refresh node simply execute
- /// JS and don't launch a dialog.
- ///
- /// Each action menu item describes what angular service that it's method exists in and what the method name is.
- ///
- /// An action menu item must describe the angular service name for which it's method exists. It may also define what the
- /// method name is that will be called in this service but if one is not specified then we will assume the method name is the
- /// same as the Type name of the current action menu class.
- ///
- public abstract class ActionMenuItem : MenuItem
- {
- protected ActionMenuItem()
- : base()
- {
- var attribute = GetType().GetCustomAttribute(false);
- if (attribute == null)
- {
- throw new InvalidOperationException("All " + typeof (ActionMenuItem).FullName + " instances must be attributed with " + typeof (ActionMenuItemAttribute).FullName);
- }
-
- //add the current type to the metadata
- if (attribute.MethodName.IsNullOrWhiteSpace())
- {
- //if no method name is supplied we will assume that the menu action is the type name of the current menu class
- AdditionalData.Add("jsAction", string.Format("{0}.{1}", attribute.ServiceName, this.GetType().Name));
- }
- else
- {
- AdditionalData.Add("jsAction", string.Format("{0}.{1}", attribute.ServiceName, attribute.MethodName));
- }
- }
- }
+using System;
+using Umbraco.Core;
+
+namespace Umbraco.Web.Models.Trees
+{
+ ///
+ /// A menu item that represents some JS that needs to execute when the menu item is clicked.
+ ///
+ ///
+ /// These types of menu items are rare but they do exist. Things like refresh node simply execute
+ /// JS and don't launch a dialog.
+ ///
+ /// Each action menu item describes what angular service that it's method exists in and what the method name is.
+ ///
+ /// An action menu item must describe the angular service name for which it's method exists. It may also define what the
+ /// method name is that will be called in this service but if one is not specified then we will assume the method name is the
+ /// same as the Type name of the current action menu class.
+ ///
+ public abstract class ActionMenuItem : MenuItem
+ {
+ protected ActionMenuItem()
+ : base()
+ {
+ var attribute = GetType().GetCustomAttribute(false);
+ if (attribute == null)
+ {
+ throw new InvalidOperationException("All " + typeof (ActionMenuItem).FullName + " instances must be attributed with " + typeof (ActionMenuItemAttribute).FullName);
+ }
+
+ //add the current type to the metadata
+ if (attribute.MethodName.IsNullOrWhiteSpace())
+ {
+ //if no method name is supplied we will assume that the menu action is the type name of the current menu class
+ AdditionalData.Add("jsAction", string.Format("{0}.{1}", attribute.ServiceName, this.GetType().Name));
+ }
+ else
+ {
+ AdditionalData.Add("jsAction", string.Format("{0}.{1}", attribute.ServiceName, attribute.MethodName));
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/Menu/ActionMenuItemAttribute.cs b/src/Umbraco.Web/Models/Trees/ActionMenuItemAttribute.cs
similarity index 94%
rename from src/Umbraco.Web/Trees/Menu/ActionMenuItemAttribute.cs
rename to src/Umbraco.Web/Models/Trees/ActionMenuItemAttribute.cs
index fe36e6d1c5..a08a7293ea 100644
--- a/src/Umbraco.Web/Trees/Menu/ActionMenuItemAttribute.cs
+++ b/src/Umbraco.Web/Models/Trees/ActionMenuItemAttribute.cs
@@ -1,39 +1,39 @@
-using System;
-using Umbraco.Core;
-
-namespace Umbraco.Web.Trees.Menu
-{
- ///
- /// The attribute to assign to any ActionMenuItem objects.
- ///
- [AttributeUsage(AttributeTargets.Class)]
- public sealed class ActionMenuItemAttribute : Attribute
- {
- ///
- /// This constructor defines both the angular service and method name to use
- ///
- ///
- ///
- public ActionMenuItemAttribute(string serviceName, string methodName)
- {
- Mandate.ParameterNotNullOrEmpty(serviceName, "serviceName");
- Mandate.ParameterNotNullOrEmpty(methodName, "methodName");
- MethodName = methodName;
- ServiceName = serviceName;
- }
-
- ///
- /// This constructor will assume that the method name equals the type name of the action menu class
- ///
- ///
- public ActionMenuItemAttribute(string serviceName)
- {
- Mandate.ParameterNotNullOrEmpty(serviceName, "serviceName");
- MethodName = "";
- ServiceName = serviceName;
- }
-
- public string MethodName { get; private set; }
- public string ServiceName { get; private set; }
- }
+using System;
+using Umbraco.Core;
+
+namespace Umbraco.Web.Models.Trees
+{
+ ///
+ /// The attribute to assign to any ActionMenuItem objects.
+ ///
+ [AttributeUsage(AttributeTargets.Class)]
+ public sealed class ActionMenuItemAttribute : Attribute
+ {
+ ///
+ /// This constructor defines both the angular service and method name to use
+ ///
+ ///
+ ///
+ public ActionMenuItemAttribute(string serviceName, string methodName)
+ {
+ Mandate.ParameterNotNullOrEmpty(serviceName, "serviceName");
+ Mandate.ParameterNotNullOrEmpty(methodName, "methodName");
+ MethodName = methodName;
+ ServiceName = serviceName;
+ }
+
+ ///
+ /// This constructor will assume that the method name equals the type name of the action menu class
+ ///
+ ///
+ public ActionMenuItemAttribute(string serviceName)
+ {
+ Mandate.ParameterNotNullOrEmpty(serviceName, "serviceName");
+ MethodName = "";
+ ServiceName = serviceName;
+ }
+
+ public string MethodName { get; private set; }
+ public string ServiceName { get; private set; }
+ }
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/Menu/CreateChildEntity.cs b/src/Umbraco.Web/Models/Trees/CreateChildEntity.cs
similarity index 81%
rename from src/Umbraco.Web/Trees/Menu/CreateChildEntity.cs
rename to src/Umbraco.Web/Models/Trees/CreateChildEntity.cs
index 3a211fa114..6d1d64373e 100644
--- a/src/Umbraco.Web/Trees/Menu/CreateChildEntity.cs
+++ b/src/Umbraco.Web/Models/Trees/CreateChildEntity.cs
@@ -1,10 +1,10 @@
-namespace Umbraco.Web.Trees.Menu
-{
- ///
- /// Represents the refresh node menu item
- ///
- [ActionMenuItem("umbracoMenuActions")]
- public sealed class CreateChildEntity : ActionMenuItem
- {
- }
+namespace Umbraco.Web.Models.Trees
+{
+ ///
+ /// Represents the refresh node menu item
+ ///
+ [ActionMenuItem("umbracoMenuActions")]
+ public sealed class CreateChildEntity : ActionMenuItem
+ {
+ }
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/Menu/MenuItem.cs b/src/Umbraco.Web/Models/Trees/MenuItem.cs
similarity index 95%
rename from src/Umbraco.Web/Trees/Menu/MenuItem.cs
rename to src/Umbraco.Web/Models/Trees/MenuItem.cs
index 031c585930..708f078a33 100644
--- a/src/Umbraco.Web/Trees/Menu/MenuItem.cs
+++ b/src/Umbraco.Web/Models/Trees/MenuItem.cs
@@ -1,69 +1,69 @@
-using System.ComponentModel.DataAnnotations;
-using System.Runtime.Serialization;
-using umbraco.interfaces;
-using System.Collections.Generic;
-using Umbraco.Core;
-
-namespace Umbraco.Web.Trees.Menu
-{
- ///
- /// A context menu item
- ///
- [DataContract(Name = "menuItem", Namespace = "")]
- public class MenuItem
- {
- public MenuItem()
- {
- AdditionalData = new Dictionary();
- Icon = "folder";
- }
-
- public MenuItem(string alias, string name)
- : this()
- {
- Alias = alias;
- Name = name;
- }
-
- public MenuItem(IAction legacyMenu, string name = "")
- : this()
- {
- Name = name.IsNullOrWhiteSpace() ? legacyMenu.Alias : name;
- Alias = legacyMenu.Alias;
- SeperatorBefore = false;
- Icon = legacyMenu.Icon;
- Action = legacyMenu;
- }
-
- internal IAction Action { get; set; }
-
- ///
- /// A dictionary to support any additional meta data that should be rendered for the node which is
- /// useful for custom action commands such as 'create', 'copy', etc...
- ///
- ///
- /// We will also use the meta data collection for dealing with legacy menu items (i.e. for loading custom URLs or
- /// executing custom JS).
- ///
- [DataMember(Name = "metaData")]
- public Dictionary AdditionalData { get; private set; }
-
- [DataMember(Name = "name", IsRequired = true)]
- [Required]
- public string Name { get; set; }
-
- [DataMember(Name = "alias", IsRequired = true)]
- [Required]
- public string Alias { get; set; }
-
- ///
- /// Ensures a menu separator will exist before this menu item
- ///
- [DataMember(Name = "seperator")]
- public bool SeperatorBefore { get; set; }
-
- [DataMember(Name = "cssclass")]
- public string Icon { get; set; }
-
- }
+using System.ComponentModel.DataAnnotations;
+using System.Runtime.Serialization;
+using umbraco.interfaces;
+using System.Collections.Generic;
+using Umbraco.Core;
+
+namespace Umbraco.Web.Models.Trees
+{
+ ///
+ /// A context menu item
+ ///
+ [DataContract(Name = "menuItem", Namespace = "")]
+ public class MenuItem
+ {
+ public MenuItem()
+ {
+ AdditionalData = new Dictionary();
+ Icon = "folder";
+ }
+
+ public MenuItem(string alias, string name)
+ : this()
+ {
+ Alias = alias;
+ Name = name;
+ }
+
+ public MenuItem(IAction legacyMenu, string name = "")
+ : this()
+ {
+ Name = name.IsNullOrWhiteSpace() ? legacyMenu.Alias : name;
+ Alias = legacyMenu.Alias;
+ SeperatorBefore = false;
+ Icon = legacyMenu.Icon;
+ Action = legacyMenu;
+ }
+
+ internal IAction Action { get; set; }
+
+ ///
+ /// A dictionary to support any additional meta data that should be rendered for the node which is
+ /// useful for custom action commands such as 'create', 'copy', etc...
+ ///
+ ///
+ /// We will also use the meta data collection for dealing with legacy menu items (i.e. for loading custom URLs or
+ /// executing custom JS).
+ ///
+ [DataMember(Name = "metaData")]
+ public Dictionary AdditionalData { get; private set; }
+
+ [DataMember(Name = "name", IsRequired = true)]
+ [Required]
+ public string Name { get; set; }
+
+ [DataMember(Name = "alias", IsRequired = true)]
+ [Required]
+ public string Alias { get; set; }
+
+ ///
+ /// Ensures a menu separator will exist before this menu item
+ ///
+ [DataMember(Name = "seperator")]
+ public bool SeperatorBefore { get; set; }
+
+ [DataMember(Name = "cssclass")]
+ public string Icon { get; set; }
+
+ }
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Trees/Menu/MenuItemCollection.cs b/src/Umbraco.Web/Models/Trees/MenuItemCollection.cs
similarity index 89%
rename from src/Umbraco.Web/Trees/Menu/MenuItemCollection.cs
rename to src/Umbraco.Web/Models/Trees/MenuItemCollection.cs
index ea57fb7a07..d92b0c71d4 100644
--- a/src/Umbraco.Web/Trees/Menu/MenuItemCollection.cs
+++ b/src/Umbraco.Web/Models/Trees/MenuItemCollection.cs
@@ -1,45 +1,44 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-
-namespace Umbraco.Web.Trees.Menu
-{
- ///
- /// A menu item collection for a given tree node
- ///
- [DataContract(Name = "menuItems", Namespace = "")]
- public class MenuItemCollection
- {
- private readonly MenuItemList _menuItems = new MenuItemList();
-
- public MenuItemCollection()
- {
- }
-
- public MenuItemCollection(IEnumerable