cleanup usings
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user