Delete macros

This commit is contained in:
Bjarke Berg
2019-01-21 10:44:11 +01:00
parent 566895d3cd
commit 252d31a5f5
5 changed files with 66 additions and 11 deletions

View File

@@ -54,7 +54,7 @@ namespace Umbraco.Web.Trees
{
//Create the normal create action
menu.Items.Add<ActionNew>(Services.TextService);
//refresh action
menu.Items.Add(new RefreshNode(Services.TextService, true));
@@ -65,16 +65,7 @@ namespace Umbraco.Web.Trees
if (macro == null) return new MenuItemCollection();
//add delete option for all macros
menu.Items.Add<ActionDelete>(Services.TextService, opensDialog: true)
//Since we haven't implemented anything for macros in angular, this needs to be converted to
//use the legacy format
.ConvertLegacyMenuItem(new EntitySlim
{
Id = macro.Id,
Level = 1,
ParentId = -1,
Name = macro.Name
}, "macros", queryStrings.GetValue<string>("application"));
menu.Items.Add<ActionDelete>(Services.TextService, opensDialog: true);
return menu;
}