Implements: U4-2937 A tree item should be able to have a default action

This commit is contained in:
Shannon
2013-09-26 15:55:38 +10:00
parent c9fd168cbd
commit e1cf3bc597
14 changed files with 477 additions and 493 deletions

View File

@@ -26,7 +26,7 @@ namespace Umbraco.Web.Trees
{
//get reference to all TreeApiControllers
var controllerTrees = UmbracoApiControllerResolver.Current.RegisteredUmbracoApiControllers
.Where(TypeHelper.IsTypeAssignableFrom<TreeApiController>)
.Where(TypeHelper.IsTypeAssignableFrom<TreeController>)
.ToArray();
//find the one we're looking for
@@ -47,7 +47,7 @@ namespace Umbraco.Web.Trees
}
var foundControllerTree = foundControllerTreeAttempt.Result;
//instantiate it, since we are proxying, we need to setup the instance with our current context
var instance = (TreeApiController)DependencyResolver.Current.GetService(foundControllerTree);
var instance = (TreeController)DependencyResolver.Current.GetService(foundControllerTree);
instance.ControllerContext = controllerContext;
instance.Request = controllerContext.Request;
//return the root
@@ -67,7 +67,7 @@ namespace Umbraco.Web.Trees
var foundControllerTree = foundControllerTreeAttempt.Result;
//instantiate it, since we are proxying, we need to setup the instance with our current context
var instance = (TreeApiController)DependencyResolver.Current.GetService(foundControllerTree);
var instance = (TreeController)DependencyResolver.Current.GetService(foundControllerTree);
instance.ControllerContext = controllerContext;
instance.Request = controllerContext.Request;
//return it's data