From 13c58ddc5df0596b9cc7a62fe7fef18ee9efdaee Mon Sep 17 00:00:00 2001
From: Michael Moos
Date: Fri, 11 Jun 2021 08:25:27 +0200
Subject: [PATCH 1/3] updated dependencies to run the ASP.NET MVC project at
all again
---
Mvc.JQuery.Datatables.sln | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Mvc.JQuery.Datatables.sln b/Mvc.JQuery.Datatables.sln
index 1dd9889..0df0a88 100644
--- a/Mvc.JQuery.Datatables.sln
+++ b/Mvc.JQuery.Datatables.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.10
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31402.337
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.JQuery.DataTables.Common", "Mvc.JQuery.DataTables.Common\Mvc.JQuery.DataTables.Common.csproj", "{BFD9EA5A-FE3A-4CE2-9C09-B9E78CE208EE}"
EndProject
@@ -10,12 +10,15 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.JQuery.DataTables.AspNetCore", "Mvc.JQuery.DataTables.AspNetCore\Mvc.JQuery.DataTables.AspNetCore.csproj", "{59A635A9-751E-4457-BC54-65F85A9AE317}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mvc.JQuery.DataTables.Example", "Mvc.JQuery.DataTables.Example\Mvc.JQuery.DataTables.Example.csproj", "{305FA463-4D61-4E28-8A4B-55A1E74D1BD7}"
+ ProjectSection(ProjectDependencies) = postProject
+ {8DA3D5E6-D714-40C3-B6CB-E88D852C5175} = {8DA3D5E6-D714-40C3-B6CB-E88D852C5175}
+ EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mvc.JQuery.DataTables.Tests", "Mvc.JQuery.DataTables.Tests\Mvc.JQuery.DataTables.Tests.csproj", "{11A04151-EF52-4828-994F-0837AF9A586C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.JQuery.DataTables", "Mvc.JQuery.DataTables\Mvc.JQuery.DataTables.csproj", "{2583FCEF-E898-458D-9016-2F294B31F65F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mvc.JQuery.Datatables.Templates", "Mvc.JQuery.Datatables.Templates\Mvc.JQuery.Datatables.Templates.csproj", "{8DA3D5E6-D714-40C3-B6CB-E88D852C5175}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.JQuery.Datatables.Templates", "Mvc.JQuery.Datatables.Templates\Mvc.JQuery.Datatables.Templates.csproj", "{8DA3D5E6-D714-40C3-B6CB-E88D852C5175}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CAB6B030-6006-4546-9A32-8F06AC054E1E}"
ProjectSection(SolutionItems) = preProject
@@ -120,4 +123,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {2C227490-FC3E-4FB8-8CC5-01887C32DABE}
+ EndGlobalSection
EndGlobal
From 47c6f4993b64e71cc20ded5132632b56099e203d Mon Sep 17 00:00:00 2001
From: Winslow Maasdorp
Date: Fri, 11 Jun 2021 09:58:18 +0200
Subject: [PATCH 2/3] Added Button functions to ExampleTable
---
Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs | 4 ++++
.../Controllers/HomeController.cs | 2 ++
.../Views/Home/_ExampleTable.cshtml | 14 +++++++++++---
.../Views/Shared/DataTable.cshtml | 10 ++++++++--
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs b/Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs
index c0d59d5..3c04cdb 100644
--- a/Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs
+++ b/Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs
@@ -68,6 +68,8 @@ public string ColumnDefsString
public bool TableTools { get; set; }
+ public bool Buttons { get; set; }
+
public bool AutoWidth { get; set; }
public JToken SearchCols
@@ -96,6 +98,8 @@ public string Dom
str += "C";
if (this.TableTools)
str += "T<\"clear\">";
+ if (this.Buttons)
+ str += "B";
if (this.ShowPageSizes)
str += "l";
if (this.ShowFilterInput)
diff --git a/Mvc.JQuery.Datatables.Example/Controllers/HomeController.cs b/Mvc.JQuery.Datatables.Example/Controllers/HomeController.cs
index 4aadddd..bff8b03 100644
--- a/Mvc.JQuery.Datatables.Example/Controllers/HomeController.cs
+++ b/Mvc.JQuery.Datatables.Example/Controllers/HomeController.cs
@@ -48,6 +48,8 @@ public ActionResult Index()
vm.ColVis = true;
vm.ShowVisibleColumnPicker = true; //Displays a control for showing/hiding columns
+ //Enable Buttons
+ vm.Buttons = true;
//Localizable
if (Request.QueryString["lang"] == "de")
diff --git a/Mvc.JQuery.Datatables.Example/Views/Home/_ExampleTable.cshtml b/Mvc.JQuery.Datatables.Example/Views/Home/_ExampleTable.cshtml
index 794aeb0..8042616 100644
--- a/Mvc.JQuery.Datatables.Example/Views/Home/_ExampleTable.cshtml
+++ b/Mvc.JQuery.Datatables.Example/Views/Home/_ExampleTable.cshtml
@@ -10,8 +10,6 @@
-
-
@@ -22,11 +20,21 @@
+
+
+
+
+
+
+
+
+
+
@{
//var vm = Html.DataTableVm("table-id", (HomeController h) => h.GetUsers(null));
var vm = Model;
-
+
}
-
diff --git a/Mvc.JQuery.Datatables.Templates/Views/Shared/DataTable.cshtml b/Mvc.JQuery.Datatables.Templates/Views/Shared/DataTable.cshtml
index 1e0031b..e142531 100644
--- a/Mvc.JQuery.Datatables.Templates/Views/Shared/DataTable.cshtml
+++ b/Mvc.JQuery.Datatables.Templates/Views/Shared/DataTable.cshtml
@@ -64,7 +64,7 @@
}
if (Model.Buttons)
{
- options["buttons"] = new JRaw("[ 'copy', 'csv', 'excel', 'print' ]");
+ options["buttons"] = new JRaw("[ 'copy', 'csv', 'excel', 'print', 'pdf' ]");
}
diff --git a/Mvc.Jquery.DataTables.Tests/Mvc.JQuery.DataTables.Tests.csproj b/Mvc.Jquery.DataTables.Tests/Mvc.JQuery.DataTables.Tests.csproj
index 5379960..6d9939a 100644
--- a/Mvc.Jquery.DataTables.Tests/Mvc.JQuery.DataTables.Tests.csproj
+++ b/Mvc.Jquery.DataTables.Tests/Mvc.JQuery.DataTables.Tests.csproj
@@ -1,5 +1,6 @@
+
Debug
@@ -11,6 +12,8 @@
Mvc.JQuery.DataTables.Tests
v4.5.1
512
+
+
true
@@ -42,8 +45,24 @@
..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
-
- ..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll
+
+ ..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.core.dll
+ False
+
+
+ ..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.core.interfaces.dll
+ False
+
+
+ ..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.framework.dll
+
+
+ ..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.util.dll
+ False
+
+
+ ..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll
+ False
@@ -106,4 +125,10 @@
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
\ No newline at end of file