Update jquery, asp.net, automapper
This commit is contained in:
+12
-12
@@ -61,32 +61,32 @@
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Routing">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
+12
-4
@@ -1,18 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.2.1.0" newVersion="2.2.1.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.2.1.0" newVersion="3.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ExcelLibrary" version="1.2011.7.30" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
||||
</packages>
|
||||
Vendored
-4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+456
-357
File diff suppressed because it is too large
Load Diff
Vendored
+5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -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.12.0
|
||||
* Comment version: 1.13.1
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -15,7 +15,7 @@
|
||||
* for informational purposes only and are not the license terms under
|
||||
* which Microsoft distributed this file.
|
||||
*
|
||||
* jQuery Validation Plugin - v1.11.1 - 2/4/2013
|
||||
* jQuery Validation Plugin - v1.13.1 - 2/4/2013
|
||||
* https://github.com/jzaefferer/jquery-validation
|
||||
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT
|
||||
*
|
||||
|
||||
Vendored
+127
-55
@@ -1,12 +1,18 @@
|
||||
/*!
|
||||
* jQuery Validation Plugin v1.12.0
|
||||
* jQuery Validation Plugin v1.13.1
|
||||
*
|
||||
* http://jqueryvalidation.org/
|
||||
*
|
||||
* Copyright (c) 2014 Jörn Zaefferer
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function($) {
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
define( ["jquery"], factory );
|
||||
} else {
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
$.extend($.fn, {
|
||||
// http://jqueryvalidation.org/validate/
|
||||
@@ -56,17 +62,23 @@ $.extend($.fn, {
|
||||
event.preventDefault();
|
||||
}
|
||||
function handle() {
|
||||
var hidden;
|
||||
var hidden, result;
|
||||
if ( validator.settings.submitHandler ) {
|
||||
if ( validator.submitButton ) {
|
||||
// insert a hidden input as a replacement for the missing submit button
|
||||
hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
|
||||
hidden = $( "<input type='hidden'/>" )
|
||||
.attr( "name", validator.submitButton.name )
|
||||
.val( $( validator.submitButton ).val() )
|
||||
.appendTo( validator.currentForm );
|
||||
}
|
||||
validator.settings.submitHandler.call( validator, validator.currentForm, event );
|
||||
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
|
||||
if ( validator.submitButton ) {
|
||||
// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
|
||||
hidden.remove();
|
||||
}
|
||||
if ( result !== undefined ) {
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -184,11 +196,17 @@ $.extend($.fn, {
|
||||
// Custom selectors
|
||||
$.extend( $.expr[ ":" ], {
|
||||
// http://jqueryvalidation.org/blank-selector/
|
||||
blank: function( a ) { return !$.trim("" + $(a).val()); },
|
||||
blank: function( a ) {
|
||||
return !$.trim( "" + $( a ).val() );
|
||||
},
|
||||
// http://jqueryvalidation.org/filled-selector/
|
||||
filled: function( a ) { return !!$.trim("" + $(a).val()); },
|
||||
filled: function( a ) {
|
||||
return !!$.trim( "" + $( a ).val() );
|
||||
},
|
||||
// http://jqueryvalidation.org/unchecked-selector/
|
||||
unchecked: function( a ) { return !$(a).prop("checked"); }
|
||||
unchecked: function( a ) {
|
||||
return !$( a ).prop( "checked" );
|
||||
}
|
||||
});
|
||||
|
||||
// constructor for validator
|
||||
@@ -230,6 +248,7 @@ $.extend($.validator, {
|
||||
errorClass: "error",
|
||||
validClass: "valid",
|
||||
errorElement: "label",
|
||||
focusCleanup: false,
|
||||
focusInvalid: true,
|
||||
errorContainer: $( [] ),
|
||||
errorLabelContainer: $( [] ),
|
||||
@@ -239,12 +258,12 @@ $.extend($.validator, {
|
||||
onfocusin: function( element ) {
|
||||
this.lastActive = element;
|
||||
|
||||
// hide error label and remove error class on focus if enabled
|
||||
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
|
||||
// Hide error label and remove error class on focus if enabled
|
||||
if ( this.settings.focusCleanup ) {
|
||||
if ( this.settings.unhighlight ) {
|
||||
this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
|
||||
}
|
||||
this.addWrapper(this.errorsFor(element)).hide();
|
||||
this.hideThese( this.errorsFor( element ) );
|
||||
}
|
||||
},
|
||||
onfocusout: function( element ) {
|
||||
@@ -352,9 +371,11 @@ $.extend($.validator, {
|
||||
"[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='range'], [type='color'], [type='radio'], [type='checkbox']",
|
||||
"focusin focusout keyup", delegate)
|
||||
.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
|
||||
// Support: Chrome, oldIE
|
||||
// "select" is provided as event.target when clicking a option
|
||||
.validateDelegate("select, option, [type='radio'], [type='checkbox']", "click", delegate);
|
||||
|
||||
if ( this.settings.invalidHandler ) {
|
||||
$( this.currentForm ).bind( "invalid-form.validate", this.settings.invalidHandler );
|
||||
@@ -471,7 +492,12 @@ $.extend($.validator, {
|
||||
},
|
||||
|
||||
hideErrors: function() {
|
||||
this.addWrapper( this.toHide ).hide();
|
||||
this.hideThese( this.toHide );
|
||||
},
|
||||
|
||||
hideThese: function( errors ) {
|
||||
errors.not( this.containers ).text( "" );
|
||||
this.addWrapper( errors ).hide();
|
||||
},
|
||||
|
||||
valid: function() {
|
||||
@@ -510,7 +536,7 @@ $.extend($.validator, {
|
||||
// select all valid inputs inside the form (no submit or reset buttons)
|
||||
return $( this.currentForm )
|
||||
.find( "input, select, textarea" )
|
||||
.not(":submit, :reset, :image, [disabled]")
|
||||
.not( ":submit, :reset, :image, [disabled], [readonly]" )
|
||||
.not( this.settings.ignore )
|
||||
.filter( function() {
|
||||
if ( !this.name && validator.settings.debug && window.console ) {
|
||||
@@ -558,10 +584,12 @@ $.extend($.validator, {
|
||||
elementValue: function( element ) {
|
||||
var val,
|
||||
$element = $( element ),
|
||||
type = $element.attr("type");
|
||||
type = element.type;
|
||||
|
||||
if ( type === "radio" || type === "checkbox" ) {
|
||||
return $("input[name='" + $element.attr("name") + "']:checked").val();
|
||||
return $( "input[name='" + element.name + "']:checked" ).val();
|
||||
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
|
||||
return element.validity.badInput ? false : $element.val();
|
||||
}
|
||||
|
||||
val = $element.val();
|
||||
@@ -625,7 +653,7 @@ $.extend($.validator, {
|
||||
// specified in the element's HTML5 data attribute
|
||||
// return the generic message if present and no method specific message is present
|
||||
customDataMessage: function( element, method ) {
|
||||
return $( element ).data( "msg" + method[ 0 ].toUpperCase() +
|
||||
return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() +
|
||||
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
|
||||
},
|
||||
|
||||
@@ -719,47 +747,90 @@ $.extend($.validator, {
|
||||
},
|
||||
|
||||
showLabel: function( element, message ) {
|
||||
var label = this.errorsFor( element );
|
||||
if ( label.length ) {
|
||||
var place, group, errorID,
|
||||
error = this.errorsFor( element ),
|
||||
elementID = this.idOrName( element ),
|
||||
describedBy = $( element ).attr( "aria-describedby" );
|
||||
if ( error.length ) {
|
||||
// refresh error/success class
|
||||
label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
|
||||
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
|
||||
// replace message on existing label
|
||||
label.html(message);
|
||||
error.html( message );
|
||||
} else {
|
||||
// create label
|
||||
label = $("<" + this.settings.errorElement + ">")
|
||||
.attr("for", this.idOrName(element))
|
||||
// create error element
|
||||
error = $( "<" + this.settings.errorElement + ">" )
|
||||
.attr( "id", elementID + "-error" )
|
||||
.addClass( this.settings.errorClass )
|
||||
.html( message || "" );
|
||||
|
||||
// Maintain reference to the element to be placed into the DOM
|
||||
place = error;
|
||||
if ( this.settings.wrapper ) {
|
||||
// make sure the element is visible, even in IE
|
||||
// actually showing the wrapped element is handled elsewhere
|
||||
label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
|
||||
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
|
||||
}
|
||||
if ( !this.labelContainer.append(label).length ) {
|
||||
if ( this.settings.errorPlacement ) {
|
||||
this.settings.errorPlacement(label, $(element) );
|
||||
if ( this.labelContainer.length ) {
|
||||
this.labelContainer.append( place );
|
||||
} else if ( this.settings.errorPlacement ) {
|
||||
this.settings.errorPlacement( place, $( element ) );
|
||||
} else {
|
||||
label.insertAfter(element);
|
||||
place.insertAfter( element );
|
||||
}
|
||||
|
||||
// Link error back to the element
|
||||
if ( error.is( "label" ) ) {
|
||||
// If the error is a label, then associate using 'for'
|
||||
error.attr( "for", elementID );
|
||||
} else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
|
||||
// If the element is not a child of an associated label, then it's necessary
|
||||
// to explicitly apply aria-describedby
|
||||
|
||||
errorID = error.attr( "id" ).replace( /(:|\.|\[|\])/g, "\\$1");
|
||||
// Respect existing non-error aria-describedby
|
||||
if ( !describedBy ) {
|
||||
describedBy = errorID;
|
||||
} else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
|
||||
// Add to end of list if not already present
|
||||
describedBy += " " + errorID;
|
||||
}
|
||||
$( element ).attr( "aria-describedby", describedBy );
|
||||
|
||||
// If this element is grouped, then assign to all elements in the same group
|
||||
group = this.groups[ element.name ];
|
||||
if ( group ) {
|
||||
$.each( this.groups, function( name, testgroup ) {
|
||||
if ( testgroup === group ) {
|
||||
$( "[name='" + name + "']", this.currentForm )
|
||||
.attr( "aria-describedby", error.attr( "id" ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !message && this.settings.success ) {
|
||||
label.text("");
|
||||
error.text( "" );
|
||||
if ( typeof this.settings.success === "string" ) {
|
||||
label.addClass( this.settings.success );
|
||||
error.addClass( this.settings.success );
|
||||
} else {
|
||||
this.settings.success( label, element );
|
||||
this.settings.success( error, element );
|
||||
}
|
||||
}
|
||||
this.toShow = this.toShow.add(label);
|
||||
this.toShow = this.toShow.add( error );
|
||||
},
|
||||
|
||||
errorsFor: function( element ) {
|
||||
var name = this.idOrName(element);
|
||||
return this.errors().filter(function() {
|
||||
return $(this).attr("for") === name;
|
||||
});
|
||||
var name = this.idOrName( element ),
|
||||
describer = $( element ).attr( "aria-describedby" ),
|
||||
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
|
||||
|
||||
// aria-describedby should directly reference the error element
|
||||
if ( describer ) {
|
||||
selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
|
||||
}
|
||||
return this
|
||||
.errors()
|
||||
.filter( selector );
|
||||
},
|
||||
|
||||
idOrName: function( element ) {
|
||||
@@ -767,11 +838,14 @@ $.extend($.validator, {
|
||||
},
|
||||
|
||||
validationTargetFor: function( element ) {
|
||||
// if radio/checkbox, validate first element in group instead
|
||||
|
||||
// If radio/checkbox, validate first element in group instead
|
||||
if ( this.checkable( element ) ) {
|
||||
element = this.findByName( element.name ).not(this.settings.ignore)[0];
|
||||
element = this.findByName( element.name );
|
||||
}
|
||||
return element;
|
||||
|
||||
// Always apply ignore filter
|
||||
return $( element ).not( this.settings.ignore )[ 0 ];
|
||||
},
|
||||
|
||||
checkable: function( element ) {
|
||||
@@ -930,7 +1004,7 @@ $.extend($.validator, {
|
||||
var method, value,
|
||||
rules = {}, $element = $( element );
|
||||
for ( method in $.validator.methods ) {
|
||||
value = $element.data( "rule" + method[ 0 ].toUpperCase() + method.substring( 1 ).toLowerCase() );
|
||||
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
|
||||
if ( value !== undefined ) {
|
||||
rules[ method ] = value;
|
||||
}
|
||||
@@ -991,7 +1065,7 @@ $.extend($.validator, {
|
||||
if ( $.isArray( rules[ this ] ) ) {
|
||||
rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
|
||||
} else if ( typeof rules[ this ] === "string" ) {
|
||||
parts = rules[this].split(/[\s,]+/);
|
||||
parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
|
||||
rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
|
||||
}
|
||||
}
|
||||
@@ -999,12 +1073,12 @@ $.extend($.validator, {
|
||||
|
||||
if ( $.validator.autoCreateRanges ) {
|
||||
// auto-create ranges
|
||||
if ( rules.min && rules.max ) {
|
||||
if ( rules.min != null && rules.max != null ) {
|
||||
rules.range = [ rules.min, rules.max ];
|
||||
delete rules.min;
|
||||
delete rules.max;
|
||||
}
|
||||
if ( rules.minlength && rules.maxlength ) {
|
||||
if ( rules.minlength != null && rules.maxlength != null ) {
|
||||
rules.rangelength = [ rules.minlength, rules.maxlength ];
|
||||
delete rules.minlength;
|
||||
delete rules.maxlength;
|
||||
@@ -1076,7 +1150,7 @@ $.extend($.validator, {
|
||||
|
||||
// http://jqueryvalidation.org/dateISO-method/
|
||||
dateISO: function( value, element ) {
|
||||
return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
|
||||
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/
|
||||
@@ -1129,19 +1203,19 @@ $.extend($.validator, {
|
||||
|
||||
// http://jqueryvalidation.org/minlength-method/
|
||||
minlength: function( value, element, param ) {
|
||||
var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
|
||||
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
|
||||
return this.optional( element ) || length >= param;
|
||||
},
|
||||
|
||||
// http://jqueryvalidation.org/maxlength-method/
|
||||
maxlength: function( value, element, param ) {
|
||||
var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
|
||||
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
|
||||
return this.optional( element ) || length <= param;
|
||||
},
|
||||
|
||||
// http://jqueryvalidation.org/rangelength-method/
|
||||
rangelength: function( value, element, param ) {
|
||||
var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
|
||||
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
|
||||
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
|
||||
},
|
||||
|
||||
@@ -1240,12 +1314,10 @@ $.format = function deprecated() {
|
||||
throw "$.format has been deprecated. Please use $.validator.format instead.";
|
||||
};
|
||||
|
||||
}(jQuery));
|
||||
|
||||
// ajax mode: abort
|
||||
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
|
||||
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
|
||||
(function($) {
|
||||
|
||||
var pendingRequests = {},
|
||||
ajax;
|
||||
// Use a prefilter if available (1.5+)
|
||||
@@ -1275,11 +1347,10 @@ $.format = function deprecated() {
|
||||
return ajax.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
}(jQuery));
|
||||
|
||||
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
|
||||
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
|
||||
(function($) {
|
||||
|
||||
$.extend($.fn, {
|
||||
validateDelegate: function( delegate, type, handler ) {
|
||||
return this.bind(type, function( event ) {
|
||||
@@ -1290,4 +1361,5 @@ $.format = function deprecated() {
|
||||
});
|
||||
}
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
}));
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+53
-18
@@ -99,8 +99,19 @@
|
||||
}
|
||||
|
||||
function onReset(event) { // 'this' is the form element
|
||||
var $form = $(this);
|
||||
var $form = $(this),
|
||||
key = '__jquery_unobtrusive_validation_form_reset';
|
||||
if ($form.data(key)) {
|
||||
return;
|
||||
}
|
||||
// Set a flag that indicates we're currently resetting the form.
|
||||
$form.data(key, true);
|
||||
try {
|
||||
$form.data("validator").resetForm();
|
||||
} finally {
|
||||
$form.removeData(key);
|
||||
}
|
||||
|
||||
$form.find(".validation-summary-errors")
|
||||
.addClass("validation-summary-valid")
|
||||
.removeClass("validation-summary-errors");
|
||||
@@ -115,23 +126,37 @@
|
||||
function validationInfo(form) {
|
||||
var $form = $(form),
|
||||
result = $form.data(data_validation),
|
||||
onResetProxy = $.proxy(onReset, form);
|
||||
onResetProxy = $.proxy(onReset, form),
|
||||
defaultOptions = $jQval.unobtrusive.options || {},
|
||||
execInContext = function (name, args) {
|
||||
var func = defaultOptions[name];
|
||||
func && $.isFunction(func) && func.apply(form, args);
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
result = {
|
||||
options: { // options structure passed to jQuery Validate's validate() method
|
||||
errorClass: "input-validation-error",
|
||||
errorElement: "span",
|
||||
errorPlacement: $.proxy(onError, form),
|
||||
invalidHandler: $.proxy(onErrors, form),
|
||||
errorClass: defaultOptions.errorClass || "input-validation-error",
|
||||
errorElement: defaultOptions.errorElement || "span",
|
||||
errorPlacement: function () {
|
||||
onError.apply(form, arguments);
|
||||
execInContext("errorPlacement", arguments);
|
||||
},
|
||||
invalidHandler: function () {
|
||||
onErrors.apply(form, arguments);
|
||||
execInContext("invalidHandler", arguments);
|
||||
},
|
||||
messages: {},
|
||||
rules: {},
|
||||
success: $.proxy(onSuccess, form)
|
||||
success: function () {
|
||||
onSuccess.apply(form, arguments);
|
||||
execInContext("success", arguments);
|
||||
}
|
||||
},
|
||||
attachValidation: function () {
|
||||
$form
|
||||
.unbind("reset." + data_validation, onResetProxy)
|
||||
.bind("reset." + data_validation, onResetProxy)
|
||||
.off("reset." + data_validation, onResetProxy)
|
||||
.on("reset." + data_validation, onResetProxy)
|
||||
.validate(this.options);
|
||||
},
|
||||
validate: function () { // a validation function that is called by unobtrusive Ajax
|
||||
@@ -206,15 +231,17 @@
|
||||
/// attribute values.
|
||||
/// </summary>
|
||||
/// <param name="selector" type="String">Any valid jQuery selector.</param>
|
||||
var $forms = $(selector)
|
||||
.parents("form")
|
||||
.andSelf()
|
||||
.add($(selector).find("form"))
|
||||
.filter("form");
|
||||
|
||||
// :input is a psuedoselector provided by jQuery which selects input and input-like elements
|
||||
// combining :input with other selectors significantly decreases performance.
|
||||
$(selector).find(":input").filter("[data-val=true]").each(function () {
|
||||
// $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one
|
||||
// element with data-val=true
|
||||
var $selector = $(selector),
|
||||
$forms = $selector.parents()
|
||||
.addBack()
|
||||
.filter("form")
|
||||
.add($selector.find("form"))
|
||||
.has("[data-val=true]");
|
||||
|
||||
$selector.find("[data-val=true]").each(function () {
|
||||
$jQval.unobtrusive.parseElement(this, true);
|
||||
});
|
||||
|
||||
@@ -370,7 +397,15 @@
|
||||
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
|
||||
var paramName = appendModelPrefix(fieldName, prefix);
|
||||
value.data[paramName] = function () {
|
||||
return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val();
|
||||
var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
|
||||
// For checkboxes and radio buttons, only pick up values from checked fields.
|
||||
if (field.is(":checkbox")) {
|
||||
return field.filter(":checked").val() || field.filter(":hidden").val() || '';
|
||||
}
|
||||
else if (field.is(":radio")) {
|
||||
return field.filter(":checked").val() || '';
|
||||
}
|
||||
return field.val();
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+16
-8
@@ -9,7 +9,7 @@
|
||||
<add name="MileageTrakerContext" connectionString="Data Source=localhost;Initial Catalog=MileageTraker;Integrated Security=True;Connect Timeout=60" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<add key="webpages:Version" value="2.0.0.0" />
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
<add key="PreserveLoginUrl" value="true" />
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
@@ -77,17 +77,25 @@
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
+30
-30
@@ -48,13 +48,13 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoMapper, Version=3.2.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\AutoMapper.3.2.1\lib\net40\AutoMapper.dll</HintPath>
|
||||
<Reference Include="AutoMapper, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="AutoMapper.Net4, Version=3.2.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\AutoMapper.3.2.1\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
<Reference Include="AutoMapper.Net4, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
|
||||
@@ -89,37 +89,37 @@
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Routing">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -265,15 +265,18 @@
|
||||
<Content Include="fonts\fontawesome-webfont.ttf" />
|
||||
<Content Include="fonts\fontawesome-webfont.eot" />
|
||||
<Content Include="fonts\FontAwesome.otf" />
|
||||
<None Include="Scripts\jquery-2.1.0.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-2.1.0.js" />
|
||||
<Content Include="Scripts\jquery-2.1.0.min.js" />
|
||||
<None Include="Scripts\jquery.validate-vsdoc.js" />
|
||||
<None Include="Scripts\jquery-2.1.4.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-2.1.4.js" />
|
||||
<Content Include="Scripts\jquery-2.1.4.min.js" />
|
||||
<Content Include="Scripts\jquery-migrate-1.2.1.js" />
|
||||
<Content Include="Scripts\jquery-migrate-1.2.1.min.js" />
|
||||
<Content Include="Scripts\jquery-ui-1.10.4.custom.min.js" />
|
||||
<Content Include="Scripts\jquery-2.1.4.min.map" />
|
||||
<None Include="Scripts\jquery.validate-vsdoc.js" />
|
||||
<Content Include="Scripts\jquery.validate.js" />
|
||||
<Content Include="Scripts\jquery.validate.min.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Views\Log\ImportFix.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\HttpPostedFileBase.cshtml" />
|
||||
<Content Include="Views\City\Index.cshtml" />
|
||||
@@ -326,7 +329,6 @@
|
||||
<Content Include="Scripts\bootstrap.js" />
|
||||
<Content Include="Scripts\bootstrap.min.js" />
|
||||
<Content Include="Scripts\jquery.numeric.js" />
|
||||
<Content Include="Scripts\jquery-2.1.0.min.map" />
|
||||
<Content Include="Scripts\jquery.qtip.min.js" />
|
||||
<Content Include="Scripts\modernizr-2.6.2.js" />
|
||||
<Content Include="Scripts\Shared\ImportCreate.js" />
|
||||
@@ -342,8 +344,6 @@
|
||||
</Content>
|
||||
<Content Include="Scripts\jquery.unobtrusive-ajax.js" />
|
||||
<Content Include="Scripts\jquery.unobtrusive-ajax.min.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\Shared\Error.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
@@ -563,5 +563,5 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="..\packages\AutoMapper.3.2.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.2.1\tools\AutoMapper.targets')" />
|
||||
<Import Project="..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets')" />
|
||||
</Project>
|
||||
+7
-7
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.2.1" targetFramework="net40" />
|
||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
|
||||
<package id="ExcelLibrary" version="1.2011.7.30" />
|
||||
<package id="FontAwesome" version="4.0.3.1" targetFramework="net40" />
|
||||
<package id="JonSkeet.MiscUtil" version="0.1" targetFramework="net40" />
|
||||
<package id="jQuery" version="2.1.0" targetFramework="net40" />
|
||||
<package id="jQuery" version="2.1.4" targetFramework="net45" />
|
||||
<package id="jQuery.Migrate" version="1.2.1" targetFramework="net40" />
|
||||
<package id="jQuery.Validation" version="1.12.0" targetFramework="net40" />
|
||||
<package id="jQuery.Validation" version="1.13.1" targetFramework="net45" />
|
||||
<package id="jQuery.vsdoc" version="1.6" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.1.2" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
||||
<package id="MvcCheckBoxList" version="1.4.4.5" targetFramework="net40" requireReinstallation="True" />
|
||||
<package id="Twitter.Bootstrap" version="2.2.2" targetFramework="net40" />
|
||||
|
||||
Reference in New Issue
Block a user