From fee3c8c26557ce4d22f5a7af25ce2c3f69804992 Mon Sep 17 00:00:00 2001 From: Harry McIntyre Date: Thu, 16 Jun 2016 09:37:00 +0100 Subject: [PATCH 1/4] Fix for inclusion of RegisterDatatablesModelBinder.cs.pp --- .gitignore | 1 + .vs/config/applicationhost.config | 1035 ----------------- .../Mvc.JQuery.Datatables.Core.csproj | 1 - .../Mvc.JQuery.Datatables.csproj | 1 + .../RegisterDatatablesModelBinder.cs.pp | 0 5 files changed, 2 insertions(+), 1036 deletions(-) delete mode 100644 .vs/config/applicationhost.config rename {Mvc.JQuery.Datatables.Core => Mvc.JQuery.Datatables}/RegisterDatatablesModelBinder.cs.pp (100%) diff --git a/.gitignore b/.gitignore index 22554cd..0dc74df 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ LPRun.5.1.ReSharper.user packages/* /packages /*.user +.vs diff --git a/.vs/config/applicationhost.config b/.vs/config/applicationhost.config deleted file mode 100644 index 3cf05b5..0000000 --- a/.vs/config/applicationhost.config +++ /dev/null @@ -1,1035 +0,0 @@ - - - - - - - - -
-
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mvc.JQuery.Datatables.Core/Mvc.JQuery.Datatables.Core.csproj b/Mvc.JQuery.Datatables.Core/Mvc.JQuery.Datatables.Core.csproj index 251fca1..bd986b2 100644 --- a/Mvc.JQuery.Datatables.Core/Mvc.JQuery.Datatables.Core.csproj +++ b/Mvc.JQuery.Datatables.Core/Mvc.JQuery.Datatables.Core.csproj @@ -108,7 +108,6 @@ Content\jquery-datatables-column-filter\media\js\jquery.dataTables.columnFilter.css - diff --git a/Mvc.JQuery.Datatables/Mvc.JQuery.Datatables.csproj b/Mvc.JQuery.Datatables/Mvc.JQuery.Datatables.csproj index 203859b..b2fc0f5 100644 --- a/Mvc.JQuery.Datatables/Mvc.JQuery.Datatables.csproj +++ b/Mvc.JQuery.Datatables/Mvc.JQuery.Datatables.csproj @@ -85,6 +85,7 @@ + diff --git a/Mvc.JQuery.Datatables.Core/RegisterDatatablesModelBinder.cs.pp b/Mvc.JQuery.Datatables/RegisterDatatablesModelBinder.cs.pp similarity index 100% rename from Mvc.JQuery.Datatables.Core/RegisterDatatablesModelBinder.cs.pp rename to Mvc.JQuery.Datatables/RegisterDatatablesModelBinder.cs.pp From 1a9b7715c2198a34c5e9b4e5aaf4fe954bf272d5 Mon Sep 17 00:00:00 2001 From: Harry McIntyre Date: Thu, 16 Jun 2016 17:01:45 +0100 Subject: [PATCH 2/4] Update DataTableConfigVm.cs --- Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs b/Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs index ad4d9f9..14d2da8 100644 --- a/Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs +++ b/Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs @@ -47,11 +47,11 @@ public DataTableConfigVm(string id, string ajaxUrl, IEnumerable columns) /// public bool Filter { get; set; } - public string Id { get; private set; } + public string Id { get; set; } - public string AjaxUrl { get; private set; } + public string AjaxUrl { get; set; } - public IEnumerable Columns { get; private set; } + public IEnumerable Columns { get; set; } public IDictionary JsOptions { get { return m_JsOptions; } } From 80db49a52b7e7f2969e74ad976768b45bf14b9e6 Mon Sep 17 00:00:00 2001 From: Harry McIntyre Date: Mon, 20 Jun 2016 14:36:10 +0100 Subject: [PATCH 3/4] Update .gitattributes --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 412eeda..5baabcc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,3 +20,5 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain + +Mvc.JQuery.Datatables.Example/* linguist-vendored From 764a7915d5e84e0b9de2c1b56b2ff75964e585ec Mon Sep 17 00:00:00 2001 From: Harry McIntyre Date: Tue, 26 Jul 2016 10:27:09 +0100 Subject: [PATCH 4/4] Load help page on installation --- .../Core.JQuery.Datatables.nuspec | 7 ++-- Mvc.JQuery.Datatables.Core/tools/install.ps1 | 41 +++++++++++++++++++ .../tools/uninstall.ps1 | 9 ++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 Mvc.JQuery.Datatables.Core/tools/install.ps1 create mode 100644 Mvc.JQuery.Datatables.Core/tools/uninstall.ps1 diff --git a/Mvc.JQuery.Datatables.Core/Core.JQuery.Datatables.nuspec b/Mvc.JQuery.Datatables.Core/Core.JQuery.Datatables.nuspec index c116919..c5cc116 100644 --- a/Mvc.JQuery.Datatables.Core/Core.JQuery.Datatables.nuspec +++ b/Mvc.JQuery.Datatables.Core/Core.JQuery.Datatables.nuspec @@ -12,7 +12,8 @@ Copyright 2011 jquery datatables iqueryable razor - + + + + \ No newline at end of file diff --git a/Mvc.JQuery.Datatables.Core/tools/install.ps1 b/Mvc.JQuery.Datatables.Core/tools/install.ps1 new file mode 100644 index 0000000..3530242 --- /dev/null +++ b/Mvc.JQuery.Datatables.Core/tools/install.ps1 @@ -0,0 +1,41 @@ +#This file is based on file from Glimpse project, under Apache licence (https://github.com/Glimpse/Glimpse/blob/efa39506576048084250622a2fc2150f8880cbe2/license.txt) +param($installPath, $toolsPath, $package, $project) + +$from = $null + +$tempDir = $env:TEMP +$log = [System.IO.Path]::Combine($tempDir,"Mvc.JQuery.DataTables\install.log") + +if ([System.IO.File]::Exists($log)) +{ + $lines = Get-Content $log | where {$_.Contains($project.FileName)} | where {$_.Contains($package.Id)} + + if ($lines -ne $null){ + + if ($lines.GetType().Name -eq 'String'){ + $lastline = $lines + } else { + $lastLine = $lines[$lines.Length-1] + } + + $props = $lastLine.Split(',') + + $versionRemoved = $props[1] + $timeRemoved = $props[2] + $timeRemoved = Get-Date -Date $timeRemoved + $now = Get-Date + + $delta = New-TimeSpan $timeRemoved $now + + if ($delta.Minutes -lt 5){ + $from = $versionRemoved + } + } +} + +if ($from -ne $null -and $from -ne $package.Version){ + $DTE.ItemOperations.Navigate("http://aspdatatables.azurewebsites.net/?" + $package.Id + "=" + $from + ".." + $package.Version) +} +else{ + $DTE.ItemOperations.Navigate("http://aspdatatables.azurewebsites.net/?" + $package.Id + "=" + $package.Version) +} \ No newline at end of file diff --git a/Mvc.JQuery.Datatables.Core/tools/uninstall.ps1 b/Mvc.JQuery.Datatables.Core/tools/uninstall.ps1 new file mode 100644 index 0000000..4e98851 --- /dev/null +++ b/Mvc.JQuery.Datatables.Core/tools/uninstall.ps1 @@ -0,0 +1,9 @@ +param($installPath, $toolsPath, $package, $project) + +$tempDir = $env:TEMP +$tempDir = [System.IO.Path]::Combine($tempDir,"Mvc.JQuery.DataTables") +if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)} +$file = [System.IO.Path]::Combine($tempDir, "install.log") +$datetime = Get-Date + +$package.Id + "," + $package.Version + "," + $datetime.ToString() + "," + $project.FileName | out-file $file -append \ No newline at end of file