This commit is contained in:
perploug
2013-10-27 15:22:04 +01:00
64 changed files with 1287 additions and 1865 deletions

View File

@@ -155,8 +155,17 @@ namespace Umbraco.Web.Trees
FilterUserAllowedMenuItems(nodeMenu, allowedMenuItems);
//set the default to create
nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias;
//if the media item is in the recycle bin, don't have a default menu, just show the regular menu
if (item.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).Contains(RecycleBinId.ToInvariantString()))
{
nodeMenu.DefaultMenuAlias = null;
}
else
{
//set the default to create
nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias;
}
return nodeMenu;
}