cleanup usings

This commit is contained in:
Claus
2019-01-07 12:59:38 +01:00
parent d231db8ef2
commit 003d54cacd
25 changed files with 15 additions and 78 deletions

View File

@@ -9,7 +9,6 @@ using System.Web.Http;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi;

View File

@@ -14,7 +14,6 @@ using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi;
using Umbraco.Core.Composing;
using Umbraco.Core.Services;
using Current = Umbraco.Web.Composing.Current;
using ApplicationTree = Umbraco.Core.Models.ApplicationTree;

View File

@@ -1,14 +1,12 @@
using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees
@@ -117,6 +115,5 @@ namespace Umbraco.Web.Trees
return menu;
}
}
}

View File

@@ -9,11 +9,9 @@ using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
using Constants = Umbraco.Core.Constants;

View File

@@ -14,7 +14,6 @@ using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi.Filters;
using System.Globalization;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Composing;

View File

@@ -5,12 +5,9 @@ using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi.Filters;

View File

@@ -12,8 +12,6 @@ using Umbraco.Web.WebApi.Filters;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees
@@ -91,7 +89,6 @@ namespace Umbraco.Web.Trees
Constants.DataTypes.DefaultContentListView,
Constants.DataTypes.DefaultMediaListView,
Constants.DataTypes.DefaultMembersListView
};
}

View File

@@ -3,9 +3,7 @@ using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi.Filters;

View File

@@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;

View File

@@ -1,15 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http.Routing;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;
namespace Umbraco.Web.Trees
{
@@ -78,6 +72,5 @@ namespace Umbraco.Web.Trees
public ActionUrlMethod ActionMethod { get; private set; }
public string DialogTitle { get; private set; }
}
}
}

View File

@@ -2,14 +2,11 @@
using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees
@@ -70,7 +67,6 @@ namespace Umbraco.Web.Trees
return menu;
}
var macro = Services.MacroService.GetById(int.Parse(id));
if (macro == null) return new MenuItemCollection();

View File

@@ -9,11 +9,9 @@ using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
using Constants = Umbraco.Core.Constants;

View File

@@ -5,18 +5,14 @@ using System.Net.Http.Formatting;
using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
namespace Umbraco.Web.Trees
{
[UmbracoTreeAuthorize(Constants.Trees.MediaTypes)]

View File

@@ -14,7 +14,6 @@ using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
using Constants = Umbraco.Core.Constants;
@@ -116,8 +115,6 @@ namespace Umbraco.Web.Trees
return node;
}
}
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
@@ -188,7 +185,6 @@ namespace Umbraco.Web.Trees
menu.Items.Add(new ExportMember(Services.TextService));
}
return menu;
}

View File

@@ -1,9 +1,7 @@
using System.Collections.Generic;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;
namespace Umbraco.Web.Trees

View File

@@ -1,15 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using umbraco;
using umbraco.cms.businesslogic.packager;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees
@@ -27,13 +24,11 @@ namespace Umbraco.Web.Trees
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
{
var root = base.CreateRootNode(queryStrings);
root.RoutePath = $"{Constants.Applications.Packages}/{Constants.Trees.Packages}/overview";
root.Icon = "icon-box";
return root;
}
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
var nodes = new TreeNodeCollection();
@@ -47,7 +42,8 @@ namespace Umbraco.Web.Trees
.OrderBy(entity => entity.Data.Name)
.Select(dt =>
{
var node = CreateTreeNode(dt.Data.Id.ToString(), id, queryStrings, dt.Data.Name, "icon-inbox", false,
var node = CreateTreeNode(dt.Data.Id.ToString(), id, queryStrings, dt.Data.Name,
"icon-inbox", false,
$"/{queryStrings.GetValue<string>("application")}/framed/{Uri.EscapeDataString("developer/Packages/EditPackage.aspx?id=" + dt.Data.Id)}");
return node;
}));
@@ -64,16 +60,12 @@ namespace Umbraco.Web.Trees
createdPackages.Count > 0,
string.Empty);
//TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now.
node.AdditionalData["jsClickCallback"] = "javascript:void(0);";
nodes.Add(node);
}
return nodes;
}
@@ -85,12 +77,14 @@ namespace Umbraco.Web.Trees
if (id == "-1")
{
menu.Items.Add<ActionNew>(Services.TextService, opensDialog: true)
.ConvertLegacyMenuItem(null, Constants.Trees.Packages, queryStrings.GetValue<string>("application"));
.ConvertLegacyMenuItem(null, Constants.Trees.Packages,
queryStrings.GetValue<string>("application"));
}
else if (id == "created")
{
menu.Items.Add<ActionNew>(Services.TextService, opensDialog: true)
.ConvertLegacyMenuItem(null, Constants.Trees.Packages, queryStrings.GetValue<string>("application"));
.ConvertLegacyMenuItem(null, Constants.Trees.Packages,
queryStrings.GetValue<string>("application"));
menu.Items.Add(new RefreshNode(Services.TextService, true));
}

View File

@@ -1,5 +1,4 @@
using umbraco;
using Umbraco.Core.IO;
using Umbraco.Core.IO;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;

View File

@@ -44,9 +44,10 @@ namespace Umbraco.Web.Trees
if (id == Constants.System.Root.ToInvariantString())
{
nodes.AddRange(Services.RelationService.GetAllRelationTypes()
.Select(rt => CreateTreeNode(rt.Id.ToString(), id, queryStrings, rt.Name,
"icon-trafic", false)));
.Select(rt => CreateTreeNode(rt.Id.ToString(), id, queryStrings, rt.Name,
"icon-trafic", false)));
}
return nodes;
}
}

View File

@@ -1,5 +1,4 @@
using System;
using Umbraco.Core;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Web.Composing;
using Umbraco.Web.Models.Trees;

View File

@@ -5,16 +5,13 @@ using System.Linq;
using System.Net.Http.Formatting;
using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.Search;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees

View File

@@ -48,8 +48,6 @@ namespace Umbraco.Web.Trees
IsSingleNodeTree = isSingleNodeTree;
}
public string ApplicationAlias { get; private set; }
public string Alias { get; private set; }
public string Title { get; private set; }

View File

@@ -1,8 +1,4 @@
using System;
using System.Linq;
using Umbraco.Core.Services;
namespace Umbraco.Web.Trees
namespace Umbraco.Web.Trees
{
/// <summary>
/// The base controller for all tree requests
@@ -22,8 +18,8 @@ namespace Umbraco.Web.Trees
/// </summary>
public override string RootNodeDisplayName
=> _rootNodeDisplayName
?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias)
?.GetRootNodeDisplayName(Services.TextService));
?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias)
?.GetRootNodeDisplayName(Services.TextService));
/// <summary>
/// Gets the current tree alias from the attribute assigned to it.

View File

@@ -10,7 +10,6 @@ using Umbraco.Core.Models.Entities;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.Search;
namespace Umbraco.Web.Trees
{

View File

@@ -2,8 +2,6 @@
using System.Linq;
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;

View File

@@ -1,10 +1,7 @@
using System.Net.Http.Formatting;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.Trees