Upgrade jquery validate
This commit is contained in:
@@ -806,9 +806,9 @@
|
|||||||
<Content Include="scripts\jquery.validate.min.js" />
|
<Content Include="scripts\jquery.validate.min.js" />
|
||||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" />
|
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" />
|
||||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js" />
|
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js" />
|
||||||
|
<Content Include="scripts\jquery.validate.custom.js" />
|
||||||
<Content Include="scripts\jquery.validate.unobtrusive.js" />
|
<Content Include="scripts\jquery.validate.unobtrusive.js" />
|
||||||
<Content Include="scripts\jquery.validate.unobtrusive.min.js" />
|
<Content Include="scripts\jquery.validate.unobtrusive.min.js" />
|
||||||
<Content Include="scripts\jquery.validate.custom.js" />
|
|
||||||
<Content Include="scripts\LeafInputCreate.js" />
|
<Content Include="scripts\LeafInputCreate.js" />
|
||||||
<Content Include="scripts\popper-utils.js" />
|
<Content Include="scripts\popper-utils.js" />
|
||||||
<Content Include="scripts\popper-utils.min.js" />
|
<Content Include="scripts\popper-utils.min.js" />
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" />
|
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net452" />
|
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net452" />
|
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11" targetFramework="net452" />
|
||||||
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net452" developmentDependency="true" />
|
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net452" developmentDependency="true" />
|
||||||
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
|
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin" version="4.1.0" targetFramework="net452" />
|
<package id="Microsoft.Owin" version="4.1.0" targetFramework="net452" />
|
||||||
|
|||||||
+32
-29
@@ -1,26 +1,23 @@
|
|||||||
/* NUGET: BEGIN LICENSE TEXT
|
// Unobtrusive validation support library for jQuery and jQuery Validate
|
||||||
*
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
* Microsoft grants you the right to use these script files for the sole
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
* purpose of either: (i) interacting through your browser with the Microsoft
|
// @version v3.2.11
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*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 */
|
/*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 */
|
/*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,
|
var $jQval = $.validator,
|
||||||
adapters,
|
adapters,
|
||||||
data_validation = "unobtrusiveValidation";
|
data_validation = "unobtrusiveValidation";
|
||||||
@@ -84,11 +81,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onSuccess(error) { // 'this' is the form element
|
function onSuccess(error) { // 'this' is the form element
|
||||||
var container = error.data("unobtrusiveContainer"),
|
var container = error.data("unobtrusiveContainer");
|
||||||
replaceAttrValue = container.attr("data-valmsg-replace"),
|
|
||||||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
|
|
||||||
|
|
||||||
if (container) {
|
if (container) {
|
||||||
|
var replaceAttrValue = container.attr("data-valmsg-replace"),
|
||||||
|
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
|
||||||
|
|
||||||
container.addClass("field-validation-valid").removeClass("field-validation-error");
|
container.addClass("field-validation-valid").removeClass("field-validation-error");
|
||||||
error.removeData("unobtrusiveContainer");
|
error.removeData("unobtrusiveContainer");
|
||||||
|
|
||||||
@@ -120,7 +118,7 @@
|
|||||||
.removeClass("field-validation-error")
|
.removeClass("field-validation-error")
|
||||||
.removeData("unobtrusiveContainer")
|
.removeData("unobtrusiveContainer")
|
||||||
.find(">*") // If we were using valmsg-replace, get the underlying error
|
.find(">*") // If we were using valmsg-replace, get the underlying error
|
||||||
.removeData("unobtrusiveContainer");
|
.removeData("unobtrusiveContainer");
|
||||||
}
|
}
|
||||||
|
|
||||||
function validationInfo(form) {
|
function validationInfo(form) {
|
||||||
@@ -131,7 +129,7 @@
|
|||||||
execInContext = function (name, args) {
|
execInContext = function (name, args) {
|
||||||
var func = defaultOptions[name];
|
var func = defaultOptions[name];
|
||||||
func && $.isFunction(func) && func.apply(form, args);
|
func && $.isFunction(func) && func.apply(form, args);
|
||||||
}
|
};
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
result = {
|
result = {
|
||||||
@@ -236,10 +234,10 @@
|
|||||||
// element with data-val=true
|
// element with data-val=true
|
||||||
var $selector = $(selector),
|
var $selector = $(selector),
|
||||||
$forms = $selector.parents()
|
$forms = $selector.parents()
|
||||||
.addBack()
|
.addBack()
|
||||||
.filter("form")
|
.filter("form")
|
||||||
.add($selector.find("form"))
|
.add($selector.find("form"))
|
||||||
.has("[data-val=true]");
|
.has("[data-val=true]");
|
||||||
|
|
||||||
$selector.find("[data-val=true]").each(function () {
|
$selector.find("[data-val=true]").each(function () {
|
||||||
$jQval.unobtrusive.parseElement(this, true);
|
$jQval.unobtrusive.parseElement(this, true);
|
||||||
@@ -422,8 +420,13 @@
|
|||||||
setValidationValues(options, "regex", options.params.regex);
|
setValidationValues(options, "regex", options.params.regex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
adapters.add("fileextensions", ["extensions"], function (options) {
|
||||||
|
setValidationValues(options, "extension", options.params.extensions);
|
||||||
|
});
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$jQval.unobtrusive.parse(document);
|
$jQval.unobtrusive.parse(document);
|
||||||
});
|
});
|
||||||
}(jQuery));
|
|
||||||
|
return $jQval.unobtrusive;
|
||||||
|
}));
|
||||||
|
|||||||
+5
-19
File diff suppressed because one or more lines are too long
@@ -42,7 +42,7 @@
|
|||||||
$($el).height('auto');
|
$($el).height('auto');
|
||||||
topPostion = $el.position().top;
|
topPostion = $el.position().top;
|
||||||
|
|
||||||
if (currentRowStart != topPostion) {
|
if (currentRowStart !== topPostion) {
|
||||||
for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
|
for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
|
||||||
rowDivs[currentDiv].height(currentTallest);
|
rowDivs[currentDiv].height(currentTallest);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user