From 3b3dc84cca81a2b1e97d439f8e141467aada108f Mon Sep 17 00:00:00 2001 From: Joel Potter Date: Thu, 1 Nov 2018 10:33:25 -0400 Subject: [PATCH] Pass controller context to handle custom export Version 3.1 --- Build/CommonAssemblyInfo.cs | 4 ++-- Griddly.Mvc/GriddlyResult.cs | 2 +- Griddly.Mvc/GriddlySettings.cs | 2 +- Griddly/Controllers/HomeController.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Build/CommonAssemblyInfo.cs b/Build/CommonAssemblyInfo.cs index 6c85820..7861a39 100644 --- a/Build/CommonAssemblyInfo.cs +++ b/Build/CommonAssemblyInfo.cs @@ -15,6 +15,6 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.7")] -[assembly: AssemblyFileVersion("3.0.7")] +[assembly: AssemblyVersion("3.1.0")] +[assembly: AssemblyFileVersion("3.1.0")] //[assembly: AssemblyInformationalVersion("2.5-filters")] diff --git a/Griddly.Mvc/GriddlyResult.cs b/Griddly.Mvc/GriddlyResult.cs index bcb1d6c..3325a79 100644 --- a/Griddly.Mvc/GriddlyResult.cs +++ b/Griddly.Mvc/GriddlyResult.cs @@ -145,7 +145,7 @@ public override void ExecuteResult(ControllerContext context) if (griddlyContext.ExportFormat == GriddlyExportFormat.Custom) { - result = GriddlySettings.HandleCustomExport(this, items); + result = GriddlySettings.HandleCustomExport(this, items, context); } else { diff --git a/Griddly.Mvc/GriddlySettings.cs b/Griddly.Mvc/GriddlySettings.cs index 57bdc0b..852270c 100644 --- a/Griddly.Mvc/GriddlySettings.cs +++ b/Griddly.Mvc/GriddlySettings.cs @@ -62,7 +62,7 @@ public static class Icons /// /// First argument is the record set. Second argument is the posted form values. /// - public static Func HandleCustomExport = null; + public static Func HandleCustomExport = null; public static Action OnBeforeRender = null; public static Action OnGriddlyResultExecuting = null; public static Action OnGriddlyPageExecuting = null; diff --git a/Griddly/Controllers/HomeController.cs b/Griddly/Controllers/HomeController.cs index cc8efe8..bd72ff4 100644 --- a/Griddly/Controllers/HomeController.cs +++ b/Griddly/Controllers/HomeController.cs @@ -12,7 +12,7 @@ namespace Griddly.Controllers { public class HomeController : Controller { - public static ActionResult HandleCustomExport(GriddlyResult result, NameValueCollection form) + public static ActionResult HandleCustomExport(GriddlyResult result, NameValueCollection form, ControllerContext context) { return new JsonResult() {