From 69cd7ed3fdd96ff032896f1e5ecc47a79161537d Mon Sep 17 00:00:00 2001 From: "Richard.Hu" Date: Fri, 4 May 2018 22:59:04 +0800 Subject: [PATCH] update nuget component. add some comments --- ClientsLibrary/ClientsLibrary.csproj | 4 +- ClientsLibrary/packages.config | 2 +- CommonLibrary/CommonLibrary.csproj | 4 +- CommonLibrary/packages.config | 2 +- .../HslCommunicationNetTestTool.csproj | 4 +- HslCommunicationNetTestTool/packages.config | 2 +- README.md | 23 ++- 软件系统客户端Wpf/packages.config | 4 +- 软件系统客户端Wpf/软件系统客户端Wpf.csproj | 8 +- 软件系统客户端模版/packages.config | 2 +- 软件系统客户端模版/软件系统客户端模版.csproj | 4 +- .../FormServerWindow.Designer.cs | 26 +-- 软件系统服务端模版/FormServerWindow.cs | 123 ++++++++------ 软件系统服务端模版/packages.config | 2 +- 软件系统服务端模版/软件系统服务端模版.csproj | 4 +- 软件系统浏览器模版/ApplicationInsights.config | 8 +- .../Scripts/jquery.unobtrusive-ajax.js | 67 ++++---- .../Scripts/jquery.unobtrusive-ajax.min.js | 34 ++-- .../Scripts/jquery.validate-vsdoc.js | 4 +- 软件系统浏览器模版/Scripts/jquery.validate.js | 151 +++++++++++------- .../Scripts/jquery.validate.min.js | 8 +- .../Scripts/jquery.validate.unobtrusive.js | 50 +++--- .../Scripts/jquery.validate.unobtrusive.min.js | 23 +-- 软件系统浏览器模版/Web.config | 22 +-- 软件系统浏览器模版/packages.config | 36 ++--- 软件系统浏览器模版/软件系统浏览器模版.csproj | 80 +++++----- 26 files changed, 374 insertions(+), 323 deletions(-) diff --git a/ClientsLibrary/ClientsLibrary.csproj b/ClientsLibrary/ClientsLibrary.csproj index db4d61e..c255a90 100644 --- a/ClientsLibrary/ClientsLibrary.csproj +++ b/ClientsLibrary/ClientsLibrary.csproj @@ -33,8 +33,8 @@ ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/ClientsLibrary/packages.config b/ClientsLibrary/packages.config index 2a3a232..fa1c2e4 100644 --- a/ClientsLibrary/packages.config +++ b/ClientsLibrary/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/CommonLibrary/CommonLibrary.csproj b/CommonLibrary/CommonLibrary.csproj index b879f84..a8e42af 100644 --- a/CommonLibrary/CommonLibrary.csproj +++ b/CommonLibrary/CommonLibrary.csproj @@ -30,8 +30,8 @@ 4 - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/CommonLibrary/packages.config b/CommonLibrary/packages.config index 2a3a232..fa1c2e4 100644 --- a/CommonLibrary/packages.config +++ b/CommonLibrary/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj b/HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj index 24b762d..da20b34 100644 --- a/HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj +++ b/HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj @@ -31,8 +31,8 @@ 4 - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/HslCommunicationNetTestTool/packages.config b/HslCommunicationNetTestTool/packages.config index 2a3a232..fa1c2e4 100644 --- a/HslCommunicationNetTestTool/packages.config +++ b/HslCommunicationNetTestTool/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/README.md b/README.md index a230fce..7655246 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,29 @@ [![Android Studio](https://img.shields.io/badge/Android%20Studio-2.3-green.svg)](https://www.visualstudio.com/zh-hans/) ## Summary -一个基于中小型提炼的C-S开发框架,覆盖电脑端,web端,手机端的全平台系统模版,在大多数的一对多的系统设计中会包含一些常用的重复的功能代码,比如网络通信机制,客户端版本控制,账户控制管理,密码修改,公告管理,服务器配置,各种常用窗口等等,而且大多数的中小型系统只是需要到简单的权限管理即可。 +一个基于中小型提炼的C-S开发框架,覆盖电脑端,web端,手机端的全平台系统模版,在大多数的一对多的系统设计中会包含一些常用的重复的功能代码, +比如网络通信机制,客户端版本控制,账户控制管理,密码修改,公告管理,服务器配置,各种常用窗口等等,而且大多数的中小型系统只是需要到简单的权限管理即可。
-本框架包含了四种客户端的模式,第一种常用的winform客户端,第二种为wpf客户端,第三种为asp.net mvc模式,第四种为安卓平台的客户端,也就是说你可以在winform和wpf客户端上选择一种模式,然后您的系统提供一些功能(诸如报表查看)到asp.net上去,然后提供一个手机端使用的Android App,如果服务器假设在云端,所有的人都可以随时随地的进行交互,数据流通,所有的账户模型都是统一的,浏览器还方便一些只需要查看报表用户的人员不需要在部署客户端了。当然,客户端可以提供更加强大的功能。 +本框架包含了四种客户端的模式,第一种常用的winform客户端,第二种为wpf客户端,第三种为asp.net mvc模式, +第四种为安卓平台的客户端,也就是说你可以在winform和wpf客户端上选择一种模式,然后您的系统提供一些功能(诸如报表查看)到asp.net上去, +然后提供一个手机端使用的Android App,如果服务器假设在云端,所有的人都可以随时随地的进行交互,数据流通,所有的账户模型都是统一的, +浏览器还方便一些只需要查看报表用户的人员不需要在部署客户端了。当然,客户端可以提供更加强大的功能。 + + +A CS development framework based on small-to-medium sized refining, covering computer-side, web-side, and mobile-side full-platform system templates, +will include some commonly used repetitive function codes, such as network communication mechanisms, +in most one-to-many system designs. Client version control, account control management, password modification, +announcement management, server configuration, various common windows, etc., and most small and medium-sized systems +just need simple rights management. + + + This framework contains four client-side modes, the first commonly used winform client, the second is the wpf client, +the third is the asp.net mvc mode, and the fourth is the client of the Android platform. You can choose a mode on winform and wpf clients, +then your system provides some functions (such as report viewing) to asp.net, and then provide an Android app for mobile phone use, +if the server is assumed in the cloud, all People can interact with anytime, anywhere, data flow, all account models are unified, +the browser is also convenient for some people who only need to view the report users do not need to deploy the client. Of course, +the client can provide more powerful features. ## Features included diff --git a/软件系统客户端Wpf/packages.config b/软件系统客户端Wpf/packages.config index 17e42bc..74b5212 100644 --- a/软件系统客户端Wpf/packages.config +++ b/软件系统客户端Wpf/packages.config @@ -1,7 +1,7 @@  - + - + \ No newline at end of file diff --git a/软件系统客户端Wpf/软件系统客户端Wpf.csproj b/软件系统客户端Wpf/软件系统客户端Wpf.csproj index 33d98ab..44e2af1 100644 --- a/软件系统客户端Wpf/软件系统客户端Wpf.csproj +++ b/软件系统客户端Wpf/软件系统客户端Wpf.csproj @@ -40,14 +40,14 @@ ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll - - ..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + ..\packages\MaterialDesignThemes.2.4.0.1044\lib\net45\MaterialDesignThemes.Wpf.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll diff --git a/软件系统客户端模版/packages.config b/软件系统客户端模版/packages.config index 2a3a232..fa1c2e4 100644 --- a/软件系统客户端模版/packages.config +++ b/软件系统客户端模版/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/软件系统客户端模版/软件系统客户端模版.csproj b/软件系统客户端模版/软件系统客户端模版.csproj index 5e43d31..8e17795 100644 --- a/软件系统客户端模版/软件系统客户端模版.csproj +++ b/软件系统客户端模版/软件系统客户端模版.csproj @@ -39,8 +39,8 @@ ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/软件系统服务端模版/FormServerWindow.Designer.cs b/软件系统服务端模版/FormServerWindow.Designer.cs index 6c44393..6182d88 100644 --- a/软件系统服务端模版/FormServerWindow.Designer.cs +++ b/软件系统服务端模版/FormServerWindow.Designer.cs @@ -46,6 +46,7 @@ this.消息发送ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.一键断开ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.账户管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.日志查看ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.关于软件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.版本号说明ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -62,7 +63,6 @@ this.label7 = new System.Windows.Forms.Label(); this.label_GC_Memery = new System.Windows.Forms.Label(); this.label_Pm_Memery = new System.Windows.Forms.Label(); - this.日志查看ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -135,38 +135,45 @@ // 版本控制ToolStripMenuItem // this.版本控制ToolStripMenuItem.Name = "版本控制ToolStripMenuItem"; - this.版本控制ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); + this.版本控制ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); this.版本控制ToolStripMenuItem.Text = "版本控制"; this.版本控制ToolStripMenuItem.Click += new System.EventHandler(this.版本控制ToolStripMenuItem_Click); // // 维护切换ToolStripMenuItem // this.维护切换ToolStripMenuItem.Name = "维护切换ToolStripMenuItem"; - this.维护切换ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); + this.维护切换ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); this.维护切换ToolStripMenuItem.Text = "维护切换"; this.维护切换ToolStripMenuItem.Click += new System.EventHandler(this.维护切换ToolStripMenuItem_Click); // // 消息发送ToolStripMenuItem // this.消息发送ToolStripMenuItem.Name = "消息发送ToolStripMenuItem"; - this.消息发送ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); + this.消息发送ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); this.消息发送ToolStripMenuItem.Text = "消息发送"; this.消息发送ToolStripMenuItem.Click += new System.EventHandler(this.消息发送ToolStripMenuItem_Click); // // 一键断开ToolStripMenuItem // this.一键断开ToolStripMenuItem.Name = "一键断开ToolStripMenuItem"; - this.一键断开ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); + this.一键断开ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); this.一键断开ToolStripMenuItem.Text = "一键断开"; this.一键断开ToolStripMenuItem.Click += new System.EventHandler(this.一键断开ToolStripMenuItem_Click); // // 账户管理ToolStripMenuItem // this.账户管理ToolStripMenuItem.Name = "账户管理ToolStripMenuItem"; - this.账户管理ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); + this.账户管理ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); this.账户管理ToolStripMenuItem.Text = "账户管理"; this.账户管理ToolStripMenuItem.Click += new System.EventHandler(this.账户管理ToolStripMenuItem_Click); // + // 日志查看ToolStripMenuItem + // + this.日志查看ToolStripMenuItem.Name = "日志查看ToolStripMenuItem"; + this.日志查看ToolStripMenuItem.Size = new System.Drawing.Size(144, 26); + this.日志查看ToolStripMenuItem.Text = "日志查看"; + this.日志查看ToolStripMenuItem.Click += new System.EventHandler(this.日志查看ToolStripMenuItem_Click); + // // 关于ToolStripMenuItem // this.关于ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -327,13 +334,6 @@ this.label_Pm_Memery.Text = "0"; this.label_Pm_Memery.TextAlign = System.Drawing.ContentAlignment.TopRight; // - // 日志查看ToolStripMenuItem - // - this.日志查看ToolStripMenuItem.Name = "日志查看ToolStripMenuItem"; - this.日志查看ToolStripMenuItem.Size = new System.Drawing.Size(152, 26); - this.日志查看ToolStripMenuItem.Text = "日志查看"; - this.日志查看ToolStripMenuItem.Click += new System.EventHandler(this.日志查看ToolStripMenuItem_Click); - // // FormServerWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); diff --git a/软件系统服务端模版/FormServerWindow.cs b/软件系统服务端模版/FormServerWindow.cs index 410b736..d3d601b 100644 --- a/软件系统服务端模版/FormServerWindow.cs +++ b/软件系统服务端模版/FormServerWindow.cs @@ -21,7 +21,7 @@ using HslCommunication.Core.Net; /******************************************************************************************** * - * 模版日期 2017-10-06 + * 模版日期 2018年5月4日 22:27:58 * 创建人 Richard.Hu * 版权所有 Richard.Hu * 授权说明 模版仅授权个人研究学习使用,如需商用,请联系hsl200909@163.com洽谈 @@ -45,6 +45,7 @@ using HslCommunication.Core.Net; * * 本项目模版不包含 《软件自动更新.exe》 * 该exe程序来自另一个开源项目HslCommunication + * 地址为:https://github.com/dathlin/HslCommunication * ********************************************************************************************/ @@ -97,38 +98,39 @@ namespace 软件系统服务端模版 private string LogSavePath { get; set; } - private void Form1_Load(object sender, EventArgs e) + private void Form1_Load( object sender, EventArgs e ) { // 初始化默认的委托对象 - ActionInitialization(); + ActionInitialization( ); // 邮件系统初始化 - SoftMailInitialization(); + SoftMailInitialization( ); // 初始化日志工具 - RuntimeLogHelper = new LogNetSingle(LogSavePath + @"\log.txt"); + RuntimeLogHelper = new LogNetSingle( LogSavePath + @"\log.txt" ); // 初始化反馈信息工具 - AdviceLogHelper = new LogNetSingle(LogSavePath + @"\advice_log.txt"); + AdviceLogHelper = new LogNetSingle( LogSavePath + @"\advice_log.txt" ); // 初始化客户端异常日志工具 - ClientsLogHelper = new LogNetSingle(LogSavePath + @"\clients_log.txt"); + ClientsLogHelper = new LogNetSingle( LogSavePath + @"\clients_log.txt" ); // 初始化并加载账户信息 UserServer.ServerSettings.FileSavePath = Application.StartupPath + @"\settings.txt"; - UserServer.ServerSettings.LoadByFile(); + UserServer.ServerSettings.LoadByFile( ); CommonLibrary.DataBaseSupport.SqlServerSupport.ConnectionString = UserServer.ServerSettings.SqlServerStr; // 初始化并加载角色规则 UserServer.ServerRoles.FileSavePath = Application.StartupPath + @"\roles.txt"; - UserServer.ServerRoles.LoadByFile(); + UserServer.ServerRoles.LoadByFile( ); // 初始化版权信息 - toolStripStatusLabel_version.Text = UserServer.ServerSettings.SystemVersion.ToString(); + toolStripStatusLabel_version.Text = UserServer.ServerSettings.SystemVersion.ToString( ); toolStripStatusLabel1.Text = $"本软件著作权归{SoftResources.StringResouce.SoftCopyRight}所有"; label5.Text = SoftResources.StringResouce.SoftName; // 加载账户信息 UserServer.ServerAccounts.FileSavePath = Application.StartupPath + @"\accounts.txt"; - UserServer.ServerAccounts.LoadByFile(); + UserServer.ServerAccounts.LoadByFile( ); UserServer.ServerAccounts.ILogNet = RuntimeLogHelper; // 初始化聊天信息 - ChatInitialization(); + ChatInitialization( ); } + private void Form1_FormClosing(object sender, FormClosingEventArgs e) { // 密码验证的示例,此处关闭窗口验证 @@ -207,7 +209,7 @@ namespace 软件系统服务端模版 if (e.ExceptionObject is Exception ex) { RuntimeLogHelper.WriteException("UnhandledException:", ex); - //发送到自己的EMAIL + // 发送到自己的EMAIL SendUserMail(ex); } } @@ -215,8 +217,10 @@ namespace 软件系统服务端模版 #endregion #region Menu Click Event + private void 启动服务器ToolStripMenuItem_Click(object sender, EventArgs e) { + // Start Server if (!IsSystemStart) { Net_Simplify_Server_Initialization();//同步网络初始化 @@ -345,20 +349,25 @@ namespace 软件系统服务端模版 #endregion - #region 软件更新服务引擎 + #region Software Auto Update Function /// /// 支持软件自动更新的后台服务引擎 /// private NetSoftUpdateServer net_soft_update_Server = new NetSoftUpdateServer(); + private void Net_SoftUpdate_Server_Initialization() { try { net_soft_update_Server.LogNet = new LogNetSingle(LogSavePath + @"\update_log.txt"); - //在服务器的这个路径下,放置客户端运行的所有文件,不要包含settings文件,不要从此处运行 - //只放置exe和dll组件,必须放置:软件自动更新.exe net_soft_update_Server.Token = UserSystem.KeyToken; + + // 在服务器的这个路径下,放置客户端运行的所有文件,不要包含settings文件,不要从此处运行 + // 只放置exe和dll组件,必须放置:软件自动更新.exe + + // In this path of the server, place all files run by the client, do not include the settings file, do not run from here + // Only exe and dll components are placed and must be placed: 软件自动更新.exe net_soft_update_Server.FileUpdatePath = Application.StartupPath + @"\AdvancedFiles\ClientFiles";//客户端文件路径 net_soft_update_Server.ServerStart(UserSystem.Port_Update_Net); } @@ -376,6 +385,7 @@ namespace 软件系统服务端模版 /// 用户同步数据传送的引擎 /// private NetSimplifyServer net_simplify_server = new NetSimplifyServer(); + /// /// 同步传送数据的初始化 /// @@ -395,6 +405,7 @@ namespace 软件系统服务端模版 SoftBasic.ShowExceptionMessage(ex); } } + /// /// 接收来自客户端的字节数据 /// @@ -917,6 +928,7 @@ namespace 软件系统服务端模版 /// 异步客户端管理引擎,维护所有的客户端在线情况,支持主动发数据到所有的客户端 /// private NetComplexServer net_socket_server = new NetComplexServer(); + /// /// 异步传送数据的初始化 /// @@ -983,7 +995,7 @@ namespace 软件系统服务端模版 private void Net_socket_server_AcceptByte(AppSession session, NetHandle customer, byte[] data) { - //如果此处充斥大量if语句,影响观感,则考虑进行指令头分类操作,客户端异步发送的字节数组都会到此处处理 + // 如果此处充斥大量if语句,影响观感,则考虑进行指令头分类操作,客户端异步发送的字节数组都会到此处处理 } @@ -1074,7 +1086,7 @@ namespace 软件系统服务端模版 #endregion - #region 后台计数线程 + #region Time Tick Thread /********************************************************************************************* * @@ -1098,25 +1110,28 @@ namespace 软件系统服务端模版 thread.IsBackground = true; thread.Start(); } + /// /// 缓存的上次内存占用 /// private long GC_Memery { get; set; } + /// /// 程序的内存对象 /// private long Pm_Memery { get; set; } + private void MethodOccurEverySecond() { long current1 = GC.GetTotalMemory(false); - //增加到性能计数 + // 增加到性能计数 AddPerfomace(current1); long current2 = 0; toolStripStatusLabel_time.Text = DateTime.Now.ToString(); label_GC_Memery.Text = current1.ToString(); - label_Pm_Memery.Text = "备用";//current2.ToString(); + label_Pm_Memery.Text = "备用"; //current2.ToString(); label_GC_Memery.BackColor = current1 < GC_Memery ? Color.Tomato : SystemColors.Control; label_Pm_Memery.BackColor = current2 < Pm_Memery ? Color.Tomato : SystemColors.Control; GC_Memery = current1; @@ -1182,8 +1197,7 @@ namespace 软件系统服务端模版 } #endregion - - + #endregion #region Advanced File Server @@ -1245,6 +1259,7 @@ namespace 软件系统服务端模版 /// 终极文件管理服务器 /// private UltimateFileServer net_ultimate_file_server { get; set; } = null; + /// /// 终极文件管理服务器 /// @@ -1252,12 +1267,12 @@ namespace 软件系统服务端模版 { try { - net_ultimate_file_server = new UltimateFileServer(); - net_ultimate_file_server.Token = UserSystem.KeyToken; - net_ultimate_file_server.LogNet = new LogNetSingle(LogSavePath + @"\ultimate_file_log.txt"); - net_ultimate_file_server.LogNet.SetMessageDegree(HslMessageDegree.DEBUG);//默认debug及以上级别日志均进行存储,根据需要自行选择 - net_ultimate_file_server.FilesDirectoryPath = Application.StartupPath + @"\UltimateFiles"; - net_ultimate_file_server.ServerStart(UserSystem.Port_Ultimate_File_Server); + net_ultimate_file_server = new UltimateFileServer(); // 实例化 + net_ultimate_file_server.Token = UserSystem.KeyToken; // 设置系统的令牌 + net_ultimate_file_server.LogNet = new LogNetSingle(LogSavePath + @"\ultimate_file_log.txt"); // 设置日志路径 + net_ultimate_file_server.LogNet.SetMessageDegree(HslMessageDegree.DEBUG); // 默认debug及以上级别日志均进行存储,根据需要自行选择 + net_ultimate_file_server.FilesDirectoryPath = Application.StartupPath + @"\UltimateFiles"; // 设置文件根目录 + net_ultimate_file_server.ServerStart(UserSystem.Port_Ultimate_File_Server); // 启动服务 // 共享文件管理器只是终极文件管理器的一个子容器 ShareFileContainer = net_ultimate_file_server.GetGroupFromFilePath(Application.StartupPath + @"\UltimateFiles\ShareFiles"); @@ -1274,17 +1289,18 @@ namespace 软件系统服务端模版 private void ShareFileContainer_FileCountChanged(int fileCount) { - //将文件数据发送给客户端 + // 将文件数据发送给客户端 net_socket_server.SendAllClients(CommonHeadCode.MultiNetHeadCode.文件总数量, fileCount.ToString()); } + // 主界面的共享文件的容器 [The main interface of the shared file container] private GroupFileContainer ShareFileContainer; - + #endregion - #region 意见反馈块 + #region Feedback Function /********************************************************************************************************** * @@ -1292,7 +1308,7 @@ namespace 软件系统服务端模版 * 举例: AdviceLogHelper.SaveInformation("张三:主界面的颜色稍微调整一下"); * **********************************************************************************************************/ - + /// /// 用来记录一般的事物日志 @@ -1318,6 +1334,9 @@ namespace 软件系统服务端模版 /// /// 服务器的UDP核心引擎 /// + /// + /// A UDP net server, receive data from client + /// private NetUdpServer net_udp_server { get; set; } private void Net_Udp_Server_Initialization() @@ -1325,12 +1344,12 @@ namespace 软件系统服务端模版 try { net_udp_server = new NetUdpServer(); - net_udp_server.LogNet =new LogNetSingle(LogSavePath + @"\udp_log.txt");//日志路径 - net_udp_server.LogNet.SetMessageDegree(HslMessageDegree.DEBUG);//默认debug及以上级别日志均进行存储,根据需要自行选择 + net_udp_server.LogNet =new LogNetSingle(LogSavePath + @"\udp_log.txt"); // 日志路径 + net_udp_server.LogNet.SetMessageDegree(HslMessageDegree.DEBUG); // 默认debug及以上级别日志均进行存储,根据需要自行选择 net_udp_server.Token = UserSystem.KeyToken; - net_udp_server.ReceiveCacheLength = 1024;//单次接收数据的缓冲长度 - net_udp_server.AcceptByte += Net_udp_server_AcceptByte;//接收到字节数据的时候触发事件 - net_udp_server.AcceptString += Net_udp_server_AcceptString;//接收到字符串数据的时候触发事件 + net_udp_server.ReceiveCacheLength = 1024; // 单次接收数据的缓冲长度 + net_udp_server.AcceptByte += Net_udp_server_AcceptByte; // 接收到字节数据的时候触发事件 + net_udp_server.AcceptString += Net_udp_server_AcceptString; // 接收到字符串数据的时候触发事件 net_udp_server.ServerStart(UserSystem.Port_Udp_Server); } catch (Exception ex) @@ -1341,8 +1360,8 @@ namespace 软件系统服务端模版 private void Net_udp_server_AcceptString(AppSession session, NetHandle customer, string data) { - //此处为测试 - Invoke(new Action(() => + // 此处为测试 [Just for testing, there is no meaning] + Invoke( new Action(() => { textBox1.AppendText($"{DateTime.Now.ToString("MM-dd HH:mm:ss ")}来自IP:{session.IpEndPoint.Address.ToString()} 内容:{data}{Environment.NewLine}"); })); @@ -1391,10 +1410,10 @@ namespace 软件系统服务端模版 { Chats_Managment = new SoftMsgQueue() { - MaxCache = 200,//记录200条临时消息 - FileSavePath = Application.StartupPath + @"\chats.txt"//设置保存的路径 + MaxCache = 200, // 记录200条临时消息 + FileSavePath = Application.StartupPath + @"\chats.txt" // 设置保存的路径 }; - Chats_Managment.LoadByFile();//加载以前的数据 + Chats_Managment.LoadByFile();// 加载以前的数据 } /// @@ -1405,9 +1424,9 @@ namespace 软件系统服务端模版 private void ChatAddMessage(string user, string message) { string content = "\u0002" + user + DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss") + Environment.NewLine + " " + message; - //转发所有的客户端,包括发送者 + // 转发所有的客户端,包括发送者 net_socket_server.SendAllClients(CommonHeadCode.MultiNetHeadCode.留言版消息, content); - //添加缓存 + // 添加缓存 Chats_Managment.AddNewItem(content); } @@ -1441,6 +1460,7 @@ namespace 软件系统服务端模版 /// 用来记录一般的事物日志 /// private ILogNet RuntimeLogHelper { get; set; } + /// /// 用来记录客户端的异常日志 /// @@ -1463,26 +1483,37 @@ namespace 软件系统服务端模版 /// 控制系统是否真的发送邮件到指定地址 /// private bool IsSendMailEnable { get; set; } + + /// /// 邮件发送系统的初始方式,所有的参数将在下面进行 /// private void SoftMailInitialization() { - IsSendMailEnable = false;// 先进行关闭 - SoftMail.MailSystem163.MailSendAddress = "hsl200909@163.com";// 作者测试的邮箱地址,实际需要换成你自己的 + // 先进行关闭 如果想发送设置为True [If you want to send the setting to True] + IsSendMailEnable = false; + // 作者测试的邮箱地址,实际需要换成你自己的 [You should replace it with your own email address] + SoftMail.MailSystem163.MailSendAddress = "hsl200909@163.com"; } /// /// 调用该方法可以直接将异常发送到你的邮箱里,如果服务器连接网络的话 /// + /// + /// If the server is connected to the network, calling this method can send the exception directly to your mailbox + /// /// 异常 private void SendUserMail(Exception ex) { if(IsSendMailEnable) SoftMail.MailSystem163.SendMail(ex); } + /// /// 发送指定的主题和内容到指定的邮箱 /// + /// + /// Send the specified topic and content to the specified mailbox + /// /// 主题 /// 内容 private void SendUserMail(string subject, string body) diff --git a/软件系统服务端模版/packages.config b/软件系统服务端模版/packages.config index 2a3a232..fa1c2e4 100644 --- a/软件系统服务端模版/packages.config +++ b/软件系统服务端模版/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/软件系统服务端模版/软件系统服务端模版.csproj b/软件系统服务端模版/软件系统服务端模版.csproj index 807c3dc..71ed5c6 100644 --- a/软件系统服务端模版/软件系统服务端模版.csproj +++ b/软件系统服务端模版/软件系统服务端模版.csproj @@ -35,8 +35,8 @@ ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Newtonsoft.Json.11.0.2\lib\net35\Newtonsoft.Json.dll diff --git a/软件系统浏览器模版/ApplicationInsights.config b/软件系统浏览器模版/ApplicationInsights.config index b975f28..3fced91 100644 --- a/软件系统浏览器模版/ApplicationInsights.config +++ b/软件系统浏览器模版/ApplicationInsights.config @@ -23,8 +23,7 @@ @@ -35,6 +34,10 @@ localhost 127.0.0.1 + + Microsoft.Azure.EventHubs + Microsoft.Azure.ServiceBus + - System.Web.Handlers.TransferRequestHandler Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler System.Web.StaticFileHandler System.Web.Handlers.AssemblyResourceLoader diff --git a/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.js b/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.js index 78781d5..e6ac0c8 100644 --- a/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.js +++ b/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.js @@ -1,21 +1,17 @@ -/* NUGET: BEGIN LICENSE TEXT - * - * Microsoft grants you the right to use these script files for the sole - * purpose of either: (i) interacting through your browser with the Microsoft - * website or online service, subject to the applicable licensing or use - * terms; or (ii) using the files as included with a Microsoft product subject - * to that product's license terms. Microsoft reserves all other rights to the - * files not expressly granted by Microsoft, whether by implication, estoppel - * or otherwise. Insofar as a script file is dual licensed under GPL, - * Microsoft neither took the code under GPL nor distributes it thereunder but - * under the terms set out in this paragraph. All notices and licenses - * below are for informational purposes only. - * - * NUGET: END LICENSE TEXT */ -/*! -** Unobtrusive Ajax support library for jQuery -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ +// Unobtrusive Ajax support library for jQuery +// Copyright (C) Microsoft Corporation. All rights reserved. +// @version v3.2.5 +// +// Microsoft grants you the right to use these script files for the sole +// purpose of either: (i) interacting through your browser with the Microsoft +// website or online service, subject to the applicable licensing or use +// terms; or (ii) using the files as included with a Microsoft product subject +// to that product's license terms. Microsoft reserves all other rights to the +// files not expressly granted by Microsoft, whether by implication, estoppel +// or otherwise. Insofar as a script file is dual licensed under GPL, +// Microsoft neither took the code under GPL nor distributes it thereunder but +// under the terms set out in this paragraph. All notices and licenses +// below are for informational purposes only. /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ /*global window: false, jQuery: false */ @@ -59,23 +55,18 @@ var top; switch (mode) { - case "BEFORE": - top = update.firstChild; - $("
").html(data).contents().each(function () { - update.insertBefore(this, top); - }); - break; - case "AFTER": - $("
").html(data).contents().each(function () { - update.appendChild(this); - }); - break; - case "REPLACE-WITH": - $(update).replaceWith(data); - break; - default: - $(update).html(data); - break; + case "BEFORE": + $(update).prepend(data); + break; + case "AFTER": + $(update).append(data); + break; + case "REPLACE-WITH": + $(update).replaceWith(data); + break; + default: + $(update).html(data); + break; } }); } @@ -94,7 +85,7 @@ $.extend(options, { type: element.getAttribute("data-ajax-method") || undefined, url: element.getAttribute("data-ajax-url") || undefined, - cache: !!element.getAttribute("data-ajax-cache"), + cache: (element.getAttribute("data-ajax-cache") || "").toLowerCase() === "true", beforeSend: function (xhr) { var result; asyncOnBeforeSend(xhr, method); @@ -175,7 +166,7 @@ $(document).on("submit", "form[data-ajax=true]", function (evt) { var clickInfo = $(this).data(data_click) || [], clickTarget = $(this).data(data_target), - isCancel = clickTarget && clickTarget.hasClass("cancel"); + isCancel = clickTarget && (clickTarget.hasClass("cancel") || clickTarget.attr('formnovalidate') !== undefined); evt.preventDefault(); if (!isCancel && !validate(this)) { return; @@ -186,4 +177,4 @@ data: clickInfo.concat($(this).serializeArray()) }); }); -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.min.js b/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.min.js index 79c7057..58c006c 100644 --- a/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.min.js +++ b/软件系统浏览器模版/Scripts/jquery.unobtrusive-ajax.min.js @@ -1,19 +1,15 @@ -/* NUGET: BEGIN LICENSE TEXT - * - * Microsoft grants you the right to use these script files for the sole - * purpose of either: (i) interacting through your browser with the Microsoft - * website or online service, subject to the applicable licensing or use - * terms; or (ii) using the files as included with a Microsoft product subject - * to that product's license terms. Microsoft reserves all other rights to the - * files not expressly granted by Microsoft, whether by implication, estoppel - * or otherwise. Insofar as a script file is dual licensed under GPL, - * Microsoft neither took the code under GPL nor distributes it thereunder but - * under the terms set out in this paragraph. All notices and licenses - * below are for informational purposes only. - * - * NUGET: END LICENSE TEXT */ -/* -** Unobtrusive Ajax support library for jQuery -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ -(function(a){var b="unobtrusiveAjaxClick",d="unobtrusiveAjaxClickTarget",h="unobtrusiveValidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return Function.constructor.apply(null,b)}function e(a){return a==="GET"||a==="POST"}function g(b,a){!e(a)&&b.setRequestHeader("X-HTTP-Method-Override",a)}function i(c,b,e){var d;if(e.indexOf("application/x-javascript")!==-1)return;d=(c.getAttribute("data-ajax-mode")||"").toUpperCase();a(c.getAttribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"BEFORE":e=c.firstChild;a("
").html(b).contents().each(function(){c.insertBefore(this,e)});break;case"AFTER":a("
").html(b).contents().each(function(){c.appendChild(this)});break;case"REPLACE-WITH":a(c).replaceWith(b);break;default:a(c).html(b)}})}function f(b,d){var j,k,f,h;j=b.getAttribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getAttribute("data-ajax-loading"));h=parseInt(b.getAttribute("data-ajax-loading-duration"),10)||0;a.extend(d,{type:b.getAttribute("data-ajax-method")||undefined,url:b.getAttribute("data-ajax-url")||undefined,cache:!!b.getAttribute("data-ajax-cache"),beforeSend:function(d){var a;g(d,f);a=c(b.getAttribute("data-ajax-begin"),["xhr"]).apply(b,arguments);a!==false&&k.show(h);return a},complete:function(){k.hide(h);c(b.getAttribute("data-ajax-complete"),["xhr","status"]).apply(b,arguments)},success:function(a,e,d){i(b,a,d.getResponseHeader("Content-Type")||"text/html");c(b.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(b,arguments)},error:function(){c(b.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(b,arguments)}});d.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});f=d.type.toUpperCase();if(!e(f)){d.type="POST";d.data.push({name:"X-HTTP-Method-Override",value:f})}a.ajax(d)}function j(c){var b=a(c).data(h);return!b||!b.validate||b.validate()}a(document).on("click","a[data-ajax=true]",function(a){a.preventDefault();f(this,{url:this.href,type:"GET",data:[]})});a(document).on("click","form[data-ajax=true] input[type=image]",function(c){var g=c.target.name,e=a(c.target),f=a(e.parents("form")[0]),d=e.offset();f.data(b,[{name:g+".x",value:Math.round(c.pageX-d.left)},{name:g+".y",value:Math.round(c.pageY-d.top)}]);setTimeout(function(){f.removeData(b)},0)});a(document).on("click","form[data-ajax=true] :submit",function(e){var g=e.currentTarget.name,f=a(e.target),c=a(f.parents("form")[0]);c.data(b,g?[{name:g,value:e.currentTarget.value}]:[]);c.data(d,f);setTimeout(function(){c.removeData(b);c.removeData(d)},0)});a(document).on("submit","form[data-ajax=true]",function(h){var e=a(this).data(b)||[],c=a(this).data(d),g=c&&c.hasClass("cancel");h.preventDefault();if(!g&&!j(this))return;f(this,{url:this.action,type:this.method||"GET",data:e.concat(a(this).serializeArray())})})})(jQuery); \ No newline at end of file +// Unobtrusive Ajax support library for jQuery +// Copyright (C) Microsoft Corporation. All rights reserved. +// @version v3.2.5 +// +// Microsoft grants you the right to use these script files for the sole +// purpose of either: (i) interacting through your browser with the Microsoft +// website or online service, subject to the applicable licensing or use +// terms; or (ii) using the files as included with a Microsoft product subject +// to that product's license terms. Microsoft reserves all other rights to the +// files not expressly granted by Microsoft, whether by implication, estoppel +// or otherwise. Insofar as a script file is dual licensed under GPL, +// Microsoft neither took the code under GPL nor distributes it thereunder but +// under the terms set out in this paragraph. All notices and licenses +// below are for informational purposes only. +!function(t){function a(t,a){for(var e=window,r=(t||"").split(".");e&&r.length;)e=e[r.shift()];return"function"==typeof e?e:(a.push(t),Function.constructor.apply(null,a))}function e(t){return"GET"===t||"POST"===t}function r(t,a){e(a)||t.setRequestHeader("X-HTTP-Method-Override",a)}function n(a,e,r){var n;r.indexOf("application/x-javascript")===-1&&(n=(a.getAttribute("data-ajax-mode")||"").toUpperCase(),t(a.getAttribute("data-ajax-update")).each(function(a,r){switch(n){case"BEFORE":t(r).prepend(e);break;case"AFTER":t(r).append(e);break;case"REPLACE-WITH":t(r).replaceWith(e);break;default:t(r).html(e)}}))}function u(u,i){var o,d,c,s;o=u.getAttribute("data-ajax-confirm"),o&&!window.confirm(o)||(d=t(u.getAttribute("data-ajax-loading")),s=parseInt(u.getAttribute("data-ajax-loading-duration"),10)||0,t.extend(i,{type:u.getAttribute("data-ajax-method")||void 0,url:u.getAttribute("data-ajax-url")||void 0,cache:"true"===(u.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(t){var e;return r(t,c),e=a(u.getAttribute("data-ajax-begin"),["xhr"]).apply(u,arguments),e!==!1&&d.show(s),e},complete:function(){d.hide(s),a(u.getAttribute("data-ajax-complete"),["xhr","status"]).apply(u,arguments)},success:function(t,e,r){n(u,t,r.getResponseHeader("Content-Type")||"text/html"),a(u.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(u,arguments)},error:function(){a(u.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(u,arguments)}}),i.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),c=i.type.toUpperCase(),e(c)||(i.type="POST",i.data.push({name:"X-HTTP-Method-Override",value:c})),t.ajax(i))}function i(a){var e=t(a).data(c);return!e||!e.validate||e.validate()}var o="unobtrusiveAjaxClick",d="unobtrusiveAjaxClickTarget",c="unobtrusiveValidation";t(document).on("click","a[data-ajax=true]",function(t){t.preventDefault(),u(this,{url:this.href,type:"GET",data:[]})}),t(document).on("click","form[data-ajax=true] input[type=image]",function(a){var e=a.target.name,r=t(a.target),n=t(r.parents("form")[0]),u=r.offset();n.data(o,[{name:e+".x",value:Math.round(a.pageX-u.left)},{name:e+".y",value:Math.round(a.pageY-u.top)}]),setTimeout(function(){n.removeData(o)},0)}),t(document).on("click","form[data-ajax=true] :submit",function(a){var e=a.currentTarget.name,r=t(a.target),n=t(r.parents("form")[0]);n.data(o,e?[{name:e,value:a.currentTarget.value}]:[]),n.data(d,r),setTimeout(function(){n.removeData(o),n.removeData(d)},0)}),t(document).on("submit","form[data-ajax=true]",function(a){var e=t(this).data(o)||[],r=t(this).data(d),n=r&&(r.hasClass("cancel")||void 0!==r.attr("formnovalidate"));a.preventDefault(),(n||i(this))&&u(this,{url:this.action,type:this.method||"GET",data:e.concat(t(this).serializeArray())})})}(jQuery); \ No newline at end of file diff --git a/软件系统浏览器模版/Scripts/jquery.validate-vsdoc.js b/软件系统浏览器模版/Scripts/jquery.validate-vsdoc.js index a525290..aa8b91b 100644 --- a/软件系统浏览器模版/Scripts/jquery.validate-vsdoc.js +++ b/软件系统浏览器模版/Scripts/jquery.validate-vsdoc.js @@ -4,7 +4,7 @@ * intended to be used only for design-time IntelliSense. Please use the * standard jQuery library for all production use. * -* Comment version: 1.16.0 +* Comment version: 1.17.0 */ /* @@ -15,7 +15,7 @@ * for informational purposes only and are not the license terms under * which Microsoft distributed this file. * -* jQuery Validation Plugin - v1.16.0 - 12/5/2016 +* jQuery Validation Plugin - v1.17.0 - 12/5/2016 * https://github.com/jzaefferer/jquery-validation * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT * diff --git a/软件系统浏览器模版/Scripts/jquery.validate.js b/软件系统浏览器模版/Scripts/jquery.validate.js index 6d39fab..12674b0 100644 --- a/软件系统浏览器模版/Scripts/jquery.validate.js +++ b/软件系统浏览器模版/Scripts/jquery.validate.js @@ -1,9 +1,9 @@ /*! - * jQuery Validation Plugin v1.16.0 + * jQuery Validation Plugin v1.17.0 * - * http://jqueryvalidation.org/ + * https://jqueryvalidation.org/ * - * Copyright (c) 2016 Jörn Zaefferer + * Copyright (c) 2017 Jörn Zaefferer * Released under the MIT license */ (function( factory ) { @@ -18,7 +18,7 @@ $.extend( $.fn, { - // http://jqueryvalidation.org/validate/ + // https://jqueryvalidation.org/validate/ validate: function( options ) { // If nothing is selected, return nothing; can't chain anyway @@ -44,9 +44,10 @@ $.extend( $.fn, { if ( validator.settings.onsubmit ) { this.on( "click.validate", ":submit", function( event ) { - if ( validator.settings.submitHandler ) { - validator.submitButton = event.target; - } + + // Track the used submit button to properly handle scripted + // submits later. + validator.submitButton = event.currentTarget; // Allow suppressing validation by adding a cancel class to the submit button if ( $( this ).hasClass( "cancel" ) ) { @@ -68,17 +69,22 @@ $.extend( $.fn, { } function handle() { var hidden, result; - if ( validator.settings.submitHandler ) { - if ( validator.submitButton ) { - // Insert a hidden input as a replacement for the missing submit button - hidden = $( "" ) - .attr( "name", validator.submitButton.name ) - .val( $( validator.submitButton ).val() ) - .appendTo( validator.currentForm ); - } + // Insert a hidden input as a replacement for the missing submit button + // The hidden input is inserted in two cases: + // - A user defined a `submitHandler` + // - There was a pending request due to `remote` method and `stopRequest()` + // was called to submit the form in case it's valid + if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) { + hidden = $( "" ) + .attr( "name", validator.submitButton.name ) + .val( $( validator.submitButton ).val() ) + .appendTo( validator.currentForm ); + } + + if ( validator.settings.submitHandler ) { result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); - if ( validator.submitButton ) { + if ( hidden ) { // And clean up afterwards; thanks to no-block-scope, hidden can be referenced hidden.remove(); @@ -112,7 +118,7 @@ $.extend( $.fn, { return validator; }, - // http://jqueryvalidation.org/valid/ + // https://jqueryvalidation.org/valid/ valid: function() { var valid, validator, errorList; @@ -133,13 +139,22 @@ $.extend( $.fn, { return valid; }, - // http://jqueryvalidation.org/rules/ + // https://jqueryvalidation.org/rules/ rules: function( command, argument ) { var element = this[ 0 ], settings, staticRules, existingRules, data, param, filtered; // If nothing is selected, return empty object; can't chain anyway - if ( element == null || element.form == null ) { + if ( element == null ) { + return; + } + + if ( !element.form && element.hasAttribute( "contenteditable" ) ) { + element.form = this.closest( "form" )[ 0 ]; + element.name = this.attr( "name" ); + } + + if ( element.form == null ) { return; } @@ -167,9 +182,6 @@ $.extend( $.fn, { $.each( argument.split( /\s/ ), function( index, method ) { filtered[ method ] = existingRules[ method ]; delete existingRules[ method ]; - if ( method === "required" ) { - $( element ).removeAttr( "aria-required" ); - } } ); return filtered; } @@ -189,7 +201,6 @@ $.extend( $.fn, { param = data.required; delete data.required; data = $.extend( { required: param }, data ); - $( element ).attr( "aria-required", "true" ); } // Make sure remote is at back @@ -206,18 +217,18 @@ $.extend( $.fn, { // Custom selectors $.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support - // http://jqueryvalidation.org/blank-selector/ + // https://jqueryvalidation.org/blank-selector/ blank: function( a ) { return !$.trim( "" + $( a ).val() ); }, - // http://jqueryvalidation.org/filled-selector/ + // https://jqueryvalidation.org/filled-selector/ filled: function( a ) { var val = $( a ).val(); return val !== null && !!$.trim( "" + val ); }, - // http://jqueryvalidation.org/unchecked-selector/ + // https://jqueryvalidation.org/unchecked-selector/ unchecked: function( a ) { return !$( a ).prop( "checked" ); } @@ -230,7 +241,7 @@ $.validator = function( options, form ) { this.init(); }; -// http://jqueryvalidation.org/jQuery.validator.format/ +// https://jqueryvalidation.org/jQuery.validator.format/ $.validator.format = function( source, params ) { if ( arguments.length === 1 ) { return function() { @@ -343,7 +354,7 @@ $.extend( $.validator, { } }, - // http://jqueryvalidation.org/jQuery.validator.setDefaults/ + // https://jqueryvalidation.org/jQuery.validator.setDefaults/ setDefaults: function( settings ) { $.extend( $.validator.defaults, settings ); }, @@ -402,6 +413,7 @@ $.extend( $.validator, { // Set form expando on contenteditable if ( !this.form && this.hasAttribute( "contenteditable" ) ) { this.form = $( this ).closest( "form" )[ 0 ]; + this.name = $( this ).attr( "name" ); } var validator = $.data( this.form, "validator" ), @@ -426,13 +438,9 @@ $.extend( $.validator, { if ( this.settings.invalidHandler ) { $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler ); } - - // Add aria-required to any Static/Data/Class required fields before first validation - // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html - $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" ); }, - // http://jqueryvalidation.org/Validator.form/ + // https://jqueryvalidation.org/Validator.form/ form: function() { this.checkForm(); $.extend( this.submitted, this.errorMap ); @@ -452,7 +460,7 @@ $.extend( $.validator, { return this.valid(); }, - // http://jqueryvalidation.org/Validator.element/ + // https://jqueryvalidation.org/Validator.element/ element: function( element ) { var cleanElement = this.clean( element ), checkElement = this.validationTargetFor( cleanElement ), @@ -503,7 +511,7 @@ $.extend( $.validator, { return result; }, - // http://jqueryvalidation.org/Validator.showErrors/ + // https://jqueryvalidation.org/Validator.showErrors/ showErrors: function( errors ) { if ( errors ) { var validator = this; @@ -529,7 +537,7 @@ $.extend( $.validator, { } }, - // http://jqueryvalidation.org/Validator.resetForm/ + // https://jqueryvalidation.org/Validator.resetForm/ resetForm: function() { if ( $.fn.resetForm ) { $( this.currentForm ).resetForm(); @@ -570,7 +578,10 @@ $.extend( $.validator, { var count = 0, i; for ( i in obj ) { - if ( obj[ i ] ) { + + // This check allows counting elements with empty error + // message as invalid elements + if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) { count++; } } @@ -635,6 +646,7 @@ $.extend( $.validator, { // Set form expando on contenteditable if ( this.hasAttribute( "contenteditable" ) ) { this.form = $( this ).closest( "form" )[ 0 ]; + this.name = name; } // Select only the first element for each name, and only those with rules specified @@ -735,21 +747,27 @@ $.extend( $.validator, { } ).length, dependencyMismatch = false, val = this.elementValue( element ), - result, method, rule; + result, method, rule, normalizer; - // If a normalizer is defined for this element, then - // call it to retreive the changed value instead + // Prioritize the local normalizer defined for this element over the global one + // if the former exists, otherwise user the global one in case it exists. + if ( typeof rules.normalizer === "function" ) { + normalizer = rules.normalizer; + } else if ( typeof this.settings.normalizer === "function" ) { + normalizer = this.settings.normalizer; + } + + // If normalizer is defined, then call it to retreive the changed value instead // of using the real one. // Note that `this` in the normalizer is `element`. - if ( typeof rules.normalizer === "function" ) { - val = rules.normalizer.call( element, val ); + if ( normalizer ) { + val = normalizer.call( element, val ); if ( typeof val !== "string" ) { throw new TypeError( "The normalizer should return a string value." ); } - // Delete the normalizer from rules to avoid treating - // it as a pre-defined method. + // Delete the normalizer from rules to avoid treating it as a pre-defined method. delete rules.normalizer; } @@ -1089,6 +1107,15 @@ $.extend( $.validator, { $( element ).removeClass( this.settings.pendingClass ); if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { $( this.currentForm ).submit(); + + // Remove the hidden input that was used as a replacement for the + // missing submit button. The hidden input is added by `handle()` + // to ensure that the value of the used submit button is passed on + // for scripted submits triggered by this method + if ( this.submitButton ) { + $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove(); + } + this.formSubmitted = false; } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) { $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); @@ -1316,7 +1343,7 @@ $.extend( $.validator, { return data; }, - // http://jqueryvalidation.org/jQuery.validator.addMethod/ + // https://jqueryvalidation.org/jQuery.validator.addMethod/ addMethod: function( name, method, message ) { $.validator.methods[ name ] = method; $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; @@ -1325,10 +1352,10 @@ $.extend( $.validator, { } }, - // http://jqueryvalidation.org/jQuery.validator.methods/ + // https://jqueryvalidation.org/jQuery.validator.methods/ methods: { - // http://jqueryvalidation.org/required-method/ + // https://jqueryvalidation.org/required-method/ required: function( value, element, param ) { // Check if dependency is met @@ -1347,7 +1374,7 @@ $.extend( $.validator, { return value.length > 0; }, - // http://jqueryvalidation.org/email-method/ + // https://jqueryvalidation.org/email-method/ email: function( value, element ) { // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address @@ -1357,7 +1384,7 @@ $.extend( $.validator, { return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value ); }, - // http://jqueryvalidation.org/url-method/ + // https://jqueryvalidation.org/url-method/ url: function( value, element ) { // Copyright (c) 2010-2013 Diego Perini, MIT licensed @@ -1367,60 +1394,60 @@ $.extend( $.validator, { return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); }, - // http://jqueryvalidation.org/date-method/ + // https://jqueryvalidation.org/date-method/ date: function( value, element ) { return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); }, - // http://jqueryvalidation.org/dateISO-method/ + // https://jqueryvalidation.org/dateISO-method/ dateISO: function( value, element ) { return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); }, - // http://jqueryvalidation.org/number-method/ + // https://jqueryvalidation.org/number-method/ number: function( value, element ) { return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); }, - // http://jqueryvalidation.org/digits-method/ + // https://jqueryvalidation.org/digits-method/ digits: function( value, element ) { return this.optional( element ) || /^\d+$/.test( value ); }, - // http://jqueryvalidation.org/minlength-method/ + // https://jqueryvalidation.org/minlength-method/ minlength: function( value, element, param ) { var length = $.isArray( value ) ? value.length : this.getLength( value, element ); return this.optional( element ) || length >= param; }, - // http://jqueryvalidation.org/maxlength-method/ + // https://jqueryvalidation.org/maxlength-method/ maxlength: function( value, element, param ) { var length = $.isArray( value ) ? value.length : this.getLength( value, element ); return this.optional( element ) || length <= param; }, - // http://jqueryvalidation.org/rangelength-method/ + // https://jqueryvalidation.org/rangelength-method/ rangelength: function( value, element, param ) { var length = $.isArray( value ) ? value.length : this.getLength( value, element ); return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); }, - // http://jqueryvalidation.org/min-method/ + // https://jqueryvalidation.org/min-method/ min: function( value, element, param ) { return this.optional( element ) || value >= param; }, - // http://jqueryvalidation.org/max-method/ + // https://jqueryvalidation.org/max-method/ max: function( value, element, param ) { return this.optional( element ) || value <= param; }, - // http://jqueryvalidation.org/range-method/ + // https://jqueryvalidation.org/range-method/ range: function( value, element, param ) { return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); }, - // http://jqueryvalidation.org/step-method/ + // https://jqueryvalidation.org/step-method/ step: function( value, element, param ) { var type = $( element ).attr( "type" ), errorMessage = "Step attribute on input type " + type + " is not supported.", @@ -1458,7 +1485,7 @@ $.extend( $.validator, { return this.optional( element ) || valid; }, - // http://jqueryvalidation.org/equalTo-method/ + // https://jqueryvalidation.org/equalTo-method/ equalTo: function( value, element, param ) { // Bind to the blur event of the target in order to revalidate whenever the target field is updated @@ -1471,7 +1498,7 @@ $.extend( $.validator, { return value === target.val(); }, - // http://jqueryvalidation.org/remote-method/ + // https://jqueryvalidation.org/remote-method/ remote: function( value, element, param, method ) { if ( this.optional( element ) ) { return "dependency-mismatch"; diff --git a/软件系统浏览器模版/Scripts/jquery.validate.min.js b/软件系统浏览器模版/Scripts/jquery.validate.min.js index 49bd55c..20402da 100644 --- a/软件系统浏览器模版/Scripts/jquery.validate.min.js +++ b/软件系统浏览器模版/Scripts/jquery.validate.min.js @@ -1,4 +1,4 @@ -/*! jQuery Validation Plugin - v1.16.0 - 12/2/2016 - * http://jqueryvalidation.org/ - * Copyright (c) 2016 Jörn Zaefferer; Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return!c.settings.submitHandler||(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&null!=j.form){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]);var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a}); \ No newline at end of file +/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017 + * https://jqueryvalidation.org/ + * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a}); \ No newline at end of file diff --git a/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.js b/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.js index 0503334..6af3efa 100644 --- a/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.js +++ b/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.js @@ -1,26 +1,22 @@ -/* NUGET: BEGIN LICENSE TEXT - * - * Microsoft grants you the right to use these script files for the sole - * purpose of either: (i) interacting through your browser with the Microsoft - * website or online service, subject to the applicable licensing or use - * terms; or (ii) using the files as included with a Microsoft product subject - * to that product's license terms. Microsoft reserves all other rights to the - * files not expressly granted by Microsoft, whether by implication, estoppel - * or otherwise. Insofar as a script file is dual licensed under GPL, - * Microsoft neither took the code under GPL nor distributes it thereunder but - * under the terms set out in this paragraph. All notices and licenses - * below are for informational purposes only. - * - * NUGET: END LICENSE TEXT */ -/*! -** Unobtrusive validation support library for jQuery and jQuery Validate -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ +// Unobtrusive validation support library for jQuery and jQuery Validate +// Copyright (C) Microsoft Corporation. All rights reserved. +// @version v3.2.9 /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ /*global document: false, jQuery: false */ -(function ($) { +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define("jquery.validate.unobtrusive", ['jquery.validation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports + module.exports = factory(require('jquery-validation')); + } else { + // Browser global + jQuery.validator.unobtrusive = factory(jQuery); + } +}(function ($) { var $jQval = $.validator, adapters, data_validation = "unobtrusiveValidation"; @@ -84,11 +80,12 @@ } function onSuccess(error) { // 'this' is the form element - var container = error.data("unobtrusiveContainer"), - replaceAttrValue = container.attr("data-valmsg-replace"), - replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; + var container = error.data("unobtrusiveContainer"); if (container) { + var replaceAttrValue = container.attr("data-valmsg-replace"), + replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; + container.addClass("field-validation-valid").removeClass("field-validation-error"); error.removeData("unobtrusiveContainer"); @@ -131,7 +128,7 @@ execInContext = function (name, args) { var func = defaultOptions[name]; func && $.isFunction(func) && func.apply(form, args); - } + }; if (!result) { result = { @@ -422,8 +419,13 @@ setValidationValues(options, "regex", options.params.regex); } }); + adapters.add("fileextensions", ["extensions"], function (options) { + setValidationValues(options, "extension", options.params.extensions); + }); $(function () { $jQval.unobtrusive.parse(document); }); -}(jQuery)); \ No newline at end of file + + return $jQval.unobtrusive; +})); \ No newline at end of file diff --git a/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.min.js b/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.min.js index dfeaf38..5f6e039 100644 --- a/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.min.js +++ b/软件系统浏览器模版/Scripts/jquery.validate.unobtrusive.min.js @@ -1,19 +1,4 @@ -/* NUGET: BEGIN LICENSE TEXT - * - * Microsoft grants you the right to use these script files for the sole - * purpose of either: (i) interacting through your browser with the Microsoft - * website or online service, subject to the applicable licensing or use - * terms; or (ii) using the files as included with a Microsoft product subject - * to that product's license terms. Microsoft reserves all other rights to the - * files not expressly granted by Microsoft, whether by implication, estoppel - * or otherwise. Insofar as a script file is dual licensed under GPL, - * Microsoft neither took the code under GPL nor distributes it thereunder but - * under the terms set out in this paragraph. All notices and licenses - * below are for informational purposes only. - * - * NUGET: END LICENSE TEXT */ -/* -** Unobtrusive validation support library for jQuery and jQuery Validate -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ -(function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); \ No newline at end of file +// Unobtrusive validation support library for jQuery and jQuery Validate +// Copyright (C) Microsoft Corporation. All rights reserved. +// @version v3.2.9 +!function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery.validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("
  • ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function u(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=f.unobtrusive.options||{},u=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),u("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),u("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),u("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var m,f=a.validator,v="unobtrusiveValidation";return f.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=u(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){f.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=u(this);a&&a.attachValidation()})}},m=f.unobtrusive.adapters,m.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},m.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},m.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},m.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},f.addMethod("__dummy__",function(a,e,n){return!0}),f.addMethod("regex",function(a,e,n){var t;return!!this.optional(e)||(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),f.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),f.methods.extension?(m.addSingleVal("accept","mimtype"),m.addSingleVal("extension","extension")):m.addSingleVal("extension","extension","accept"),m.addSingleVal("regex","pattern"),m.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),m.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),m.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),m.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),m.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||e(a,"required",!0)}),m.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),m.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),m.add("fileextensions",["extensions"],function(a){e(a,"extension",a.params.extensions)}),a(function(){f.unobtrusive.parse(document)}),f.unobtrusive}); \ No newline at end of file diff --git a/软件系统浏览器模版/Web.config b/软件系统浏览器模版/Web.config index c735124..4230aab 100644 --- a/软件系统浏览器模版/Web.config +++ b/软件系统浏览器模版/Web.config @@ -31,6 +31,14 @@ + + + + + + + + @@ -39,17 +47,13 @@ + + + + - - - - - - - - - + diff --git a/软件系统浏览器模版/packages.config b/软件系统浏览器模版/packages.config index 2f1b481..43b8713 100644 --- a/软件系统浏览器模版/packages.config +++ b/软件系统浏览器模版/packages.config @@ -2,29 +2,29 @@ - + - - + + - - - - - - - - - - + + + + + + + + + + - - + + - - - + + + diff --git a/软件系统浏览器模版/软件系统浏览器模版.csproj b/软件系统浏览器模版/软件系统浏览器模版.csproj index f3a674c..1feb5dd 100644 --- a/软件系统浏览器模版/软件系统浏览器模版.csproj +++ b/软件系统浏览器模版/软件系统浏览器模版.csproj @@ -1,7 +1,7 @@  + - Debug @@ -57,32 +57,32 @@ False ..\CommonLibrary\bin\Debug\CommonLibrary.dll - - ..\packages\HslCommunication.5.0.4\lib\net35\HslCommunication.dll + + ..\packages\HslCommunication.5.0.6\lib\net35\HslCommunication.dll ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.4.0\lib\net45\Microsoft.AI.Agent.Intercept.dll - - ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.4.1\lib\net45\Microsoft.AI.DependencyCollector.dll + + ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.5.1\lib\net45\Microsoft.AI.DependencyCollector.dll - - ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.4.1\lib\net45\Microsoft.AI.PerfCounterCollector.dll + + ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.5.1\lib\net45\Microsoft.AI.PerfCounterCollector.dll - - ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.4.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll + + ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.5.1\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll - - ..\packages\Microsoft.ApplicationInsights.Web.2.4.1\lib\net45\Microsoft.AI.Web.dll + + ..\packages\Microsoft.ApplicationInsights.Web.2.5.1\lib\net45\Microsoft.AI.Web.dll - - ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.4.1\lib\net45\Microsoft.AI.WindowsServer.dll + + ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.5.1\lib\net45\Microsoft.AI.WindowsServer.dll - - ..\packages\Microsoft.ApplicationInsights.2.4.0\lib\net45\Microsoft.ApplicationInsights.dll + + ..\packages\Microsoft.ApplicationInsights.2.5.1\lib\net45\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.0\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll + + ..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.3\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll @@ -103,6 +103,24 @@ + + ..\packages\Microsoft.AspNet.WebPages.3.2.5\lib\net45\System.Web.Helpers.dll + + + ..\packages\Microsoft.AspNet.Mvc.5.2.5\lib\net45\System.Web.Mvc.dll + + + ..\packages\Microsoft.AspNet.Razor.3.2.5\lib\net45\System.Web.Razor.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.5\lib\net45\System.Web.WebPages.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.5\lib\net45\System.Web.WebPages.Deployment.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.5\lib\net45\System.Web.WebPages.Razor.dll + @@ -120,33 +138,9 @@ - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll - - - True - ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll - ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll - - True - ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll - ..\packages\WebGrease.1.6.0\lib\WebGrease.dll @@ -193,9 +187,9 @@ - + @@ -281,8 +275,8 @@ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - +