From 60f9394bdbda5ffe1b6c46314b40423c0f8dd467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C4=99czek?= Date: Sun, 27 Mar 2011 00:08:59 +0100 Subject: [PATCH] Lib.Web.Mvc 3.1 --- Lib.Web.Mvc/JQuery/JqGrid/JqGridHelper.cs | 11 ++++++++++- .../JQuery/JqGrid/JqGridNavigatorActionOptions.cs | 15 +++++++++++++++ Lib.Web.Mvc/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Lib.Web.Mvc/JQuery/JqGrid/JqGridHelper.cs b/Lib.Web.Mvc/JQuery/JqGrid/JqGridHelper.cs index b4b32c7..d93e327 100644 --- a/Lib.Web.Mvc/JQuery/JqGrid/JqGridHelper.cs +++ b/Lib.Web.Mvc/JQuery/JqGrid/JqGridHelper.cs @@ -678,8 +678,17 @@ private static void AppendNavigatorActionOptions(JqGridNavigatorActionOptions ac if (actionOptions.MethodType.HasValue) javaScriptBuilder.AppendFormat("mtype: '{0}',", actionOptions.MethodType.Value.ToString().ToUpper()); + if (!String.IsNullOrWhiteSpace(actionOptions.OnAfterShowForm)) + javaScriptBuilder.AppendFormat("afterShowForm: {0},", actionOptions.OnAfterShowForm); + + if (!String.IsNullOrWhiteSpace(actionOptions.OnBeforeShowForm)) + javaScriptBuilder.AppendFormat("beforeShowForm: {0},", actionOptions.OnBeforeShowForm); + if (!String.IsNullOrWhiteSpace(actionOptions.OnClose)) - javaScriptBuilder.AppendFormat("onClose: '{0}',", actionOptions.OnClose); + javaScriptBuilder.AppendFormat("onClose: {0},", actionOptions.OnClose); + + if (!String.IsNullOrWhiteSpace(actionOptions.OnInitializeForm)) + javaScriptBuilder.AppendFormat("onInitializeForm: {0},", actionOptions.OnInitializeForm); if (actionOptions.ReloadAfterSubmit.HasValue) javaScriptBuilder.AppendFormat("reloadAfterSubmit: {0},", actionOptions.ReloadAfterSubmit.Value.ToString().ToLower()); diff --git a/Lib.Web.Mvc/JQuery/JqGrid/JqGridNavigatorActionOptions.cs b/Lib.Web.Mvc/JQuery/JqGrid/JqGridNavigatorActionOptions.cs index 4595513..dd8fe2b 100644 --- a/Lib.Web.Mvc/JQuery/JqGrid/JqGridNavigatorActionOptions.cs +++ b/Lib.Web.Mvc/JQuery/JqGrid/JqGridNavigatorActionOptions.cs @@ -51,11 +51,26 @@ public class JqGridNavigatorActionOptions /// public JqGridMethodTypes? MethodType { get; set; } + /// + /// Gets or sets the name of the function for event which is raised after showing the form with the new data. + /// + public string OnAfterShowForm { get; set; } + + /// + /// Gets or sets the name of the function for event which is raised before showing the form with the new data. + /// + public string OnBeforeShowForm { get; set; } + /// /// Gets or sets the name of the function for event which is raised just before closing the form. /// public string OnClose { get; set; } + /// + /// Gets or sets the name of the function for event which is raised only once when creating the form for editing and adding. + /// + public string OnInitializeForm { get; set; } + /// /// Gets or sets the value indicating if grid should be reloaded after submiting. /// diff --git a/Lib.Web.Mvc/Properties/AssemblyInfo.cs b/Lib.Web.Mvc/Properties/AssemblyInfo.cs index ef8a79a..abdc880 100644 --- a/Lib.Web.Mvc/Properties/AssemblyInfo.cs +++ b/Lib.Web.Mvc/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("3.1.0.0")] +[assembly: AssemblyFileVersion("3.1.0.0")]