From 716f63243494a19fa1eb4af48002b26e1b9ee786 Mon Sep 17 00:00:00 2001 From: ithielnor Date: Mon, 5 May 2014 20:01:48 -0400 Subject: [PATCH 1/3] Correctly set button classname in helpers. --- Griddly.Mvc/GriddlySettings.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Griddly.Mvc/GriddlySettings.cs b/Griddly.Mvc/GriddlySettings.cs index e43202e..57ce925 100644 --- a/Griddly.Mvc/GriddlySettings.cs +++ b/Griddly.Mvc/GriddlySettings.cs @@ -138,7 +138,7 @@ public GriddlySettings Button(Func argumentTemplate, string capt Icon = icon, Action = action, EnableOnSelection = enableOnSelection.Value, - ClassName = className, + ClassName = className ?? GriddlySettings.DefaultButtonClassName, Target = target }); } @@ -155,7 +155,7 @@ public GriddlySettings Button(string argument, string caption, string icon = nul Icon = icon, Action = action, EnableOnSelection = enableOnSelection.Value, - ClassName = className, + ClassName = className ?? GriddlySettings.DefaultButtonClassName, Target = target }); } From 9d5b765464e33357843134a62ee3a0052335584a Mon Sep 17 00:00:00 2001 From: ithielnor Date: Tue, 6 May 2014 10:38:18 -0400 Subject: [PATCH 2/3] New nuget. 1.0.41 --- Build/CommonAssemblyInfo.cs | 4 ++-- Build/publish-nuget.ps1 | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Build/CommonAssemblyInfo.cs b/Build/CommonAssemblyInfo.cs index c30dea9..0573b1d 100644 --- a/Build/CommonAssemblyInfo.cs +++ b/Build/CommonAssemblyInfo.cs @@ -15,5 +15,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.40.0")] -[assembly: AssemblyFileVersion("1.0.40.0")] +[assembly: AssemblyVersion("1.0.41.0")] +[assembly: AssemblyFileVersion("1.0.41.0")] diff --git a/Build/publish-nuget.ps1 b/Build/publish-nuget.ps1 index 696af31..d9df517 100644 --- a/Build/publish-nuget.ps1 +++ b/Build/publish-nuget.ps1 @@ -1,6 +1,8 @@ # http://www.jeremyskinner.co.uk/2011/01/12/automating-nuget-package-creation-with-msbuild-and-powershell/ -msbuild +$scriptpath = split-path -parent $MyInvocation.MyCommand.Path + +msbuild $scriptpath/build.proj Function Get-DropBox() { $hostFile = Join-Path (Split-Path (Get-ItemProperty HKCU:\Software\Dropbox).InstallPath) "host.db" @@ -10,12 +12,11 @@ Function Get-DropBox() { $dropbox = Get-DropBox $keyfile = "$dropbox\Personal\nuget-key.txt" -$scriptpath = split-path -parent $MyInvocation.MyCommand.Path $nugetpath = resolve-path "$scriptpath/../.nuget/nuget.exe" $packagespath = resolve-path "$scriptpath/packages" if(-not (test-path $keyfile)) { - throw "Could not find the NuGet access key at $keyfile. If you're not Chris, you shouldn't be running this script!" + throw "Could not find the NuGet access key at $keyfile. If you're not the project owner, you shouldn't be running this script!" } else { pushd $packagespath From 2a5b2afc48310adfc0b2b5cc02e4a96662a174ff Mon Sep 17 00:00:00 2001 From: ithielnor Date: Thu, 8 May 2014 10:26:32 -0400 Subject: [PATCH 3/3] Corrected GriddlySettings.Button helpers to properly add classname instead of override. --- Griddly.Mvc/GriddlySettings.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Griddly.Mvc/GriddlySettings.cs b/Griddly.Mvc/GriddlySettings.cs index 57ce925..5b49ab4 100644 --- a/Griddly.Mvc/GriddlySettings.cs +++ b/Griddly.Mvc/GriddlySettings.cs @@ -131,16 +131,19 @@ public GriddlySettings Button(Func argumentTemplate, string capt if (enableOnSelection == null) enableOnSelection = (action == GriddlyButtonAction.Ajax || action == GriddlyButtonAction.AjaxBulk || action == GriddlyButtonAction.Post); - return Add(new GriddlyButton() + var button = new GriddlyButton() { ArgumentTemplate = argumentTemplate, Text = caption, Icon = icon, Action = action, EnableOnSelection = enableOnSelection.Value, - ClassName = className ?? GriddlySettings.DefaultButtonClassName, Target = target - }); + }; + + button.ClassName = ((button.ClassName ?? "") + " " + (className ?? "")).Trim(); + + return Add(button); } public GriddlySettings Button(string argument, string caption, string icon = null, GriddlyButtonAction action = GriddlyButtonAction.Navigate, bool? enableOnSelection = null, string className = null, string target = null) @@ -148,16 +151,19 @@ public GriddlySettings Button(string argument, string caption, string icon = nul if (enableOnSelection == null) enableOnSelection = (action == GriddlyButtonAction.Ajax || action == GriddlyButtonAction.AjaxBulk || action == GriddlyButtonAction.Post); - return Add(new GriddlyButton() + var button = new GriddlyButton() { Argument = argument, Text = caption, Icon = icon, Action = action, EnableOnSelection = enableOnSelection.Value, - ClassName = className ?? GriddlySettings.DefaultButtonClassName, Target = target - }); + }; + + button.ClassName = ((button.ClassName ?? "") + " " + (className ?? "")).Trim(); + + return Add(button); } public GriddlySettings ButtonSeparator()