Gets tree syncing working, updates the GetApplicationTrees to still return a single Root since we require this everywhere for JS, fixes full screen section and makes users a full screen section (and reduces unecessary code), removes code to avoid breaking changes from v7

This commit is contained in:
Shannon
2018-10-16 16:41:06 +11:00
parent 466d782db4
commit 286f7b3279
12 changed files with 388 additions and 257 deletions

View File

@@ -33,39 +33,14 @@ namespace Umbraco.Web.Trees
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
var nodes = new TreeNodeCollection();
return nodes;
//full screen app without tree nodes
return TreeNodeCollection.Empty;
}
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
{
var menu = new MenuItemCollection();
if (id == Constants.System.Root.ToInvariantString())
{
//Create User
var createMenuItem = menu.Items.CreateMenuItem<ActionNew>(Services.TextService.Localize("actions/create"));
createMenuItem.Icon = "add";
createMenuItem.NavigateToRoute("users/users/overview?subview=users&create=true");
menu.Items.Add(createMenuItem);
//This is the same setting used in the global JS for 'showUserInvite'
if (EmailSender.CanSendRequiredEmail)
{
//Invite User (Action import closest type of action to an invite user)
var inviteMenuItem = menu.Items.CreateMenuItem<ActionImport>(Services.TextService.Localize("user/invite"));
inviteMenuItem.Icon = "message-unopened";
inviteMenuItem.NavigateToRoute("users/users/overview?subview=users&invite=true");
menu.Items.Add(inviteMenuItem);
}
return menu;
}
//There is no context menu options for editing a specific user
//Also we no longer list each user in the tree & in theory never hit this
return menu;
//doesn't have a menu, this is a full screen app without tree nodes
return MenuItemCollection.Empty;
}
}
}