From 9cecdfd1472c5b0fa9b77980693933bb3869be80 Mon Sep 17 00:00:00 2001
From: Clemens Gruber
Date: Sat, 26 Nov 2016 15:56:06 +0100
Subject: [PATCH] Upgrade to jQuery 3.1.1
---
CHANGELOG.md | 4 +
VERSIONS.md | 1 +
lib/jquery/rails/version.rb | 4 +-
vendor/assets/javascripts/jquery3.js | 468 ++++++++++++++--------
vendor/assets/javascripts/jquery3.min.js | 8 +-
vendor/assets/javascripts/jquery3.min.map | 2 +-
6 files changed, 319 insertions(+), 168 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 334d03a3..e65f160a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 4.2.2
+
+- Update jQuery to 3.1.1
+
## 4.2.1
- Update jQuery to 3.1.0
diff --git a/VERSIONS.md b/VERSIONS.md
index bd4b2648..73f9afe5 100644
--- a/VERSIONS.md
+++ b/VERSIONS.md
@@ -2,6 +2,7 @@
| Gem | jQuery | jQuery UJS | jQuery UI |
|--------|--------|------------| ----------|
+| 4.2.2 | 1.12.4 & 2.2.4 & 3.1.1 | 1.2.2 | - |
| 4.2.1 | 1.12.4 & 2.2.4 & 3.1.0 | 1.2.2 | - |
| 4.2.0 | 1.12.4 & 2.2.4 & 3.0.0 | 1.2.2 | - |
| 4.1.1 | 1.12.1 & 2.2.1 | 1.2.1 | - |
diff --git a/lib/jquery/rails/version.rb b/lib/jquery/rails/version.rb
index 81a4a94f..d4829627 100644
--- a/lib/jquery/rails/version.rb
+++ b/lib/jquery/rails/version.rb
@@ -1,9 +1,9 @@
module Jquery
module Rails
- VERSION = "4.2.1"
+ VERSION = "4.2.2"
JQUERY_VERSION = "1.12.4"
JQUERY_2_VERSION = "2.2.4"
- JQUERY_3_VERSION = "3.1.0"
+ JQUERY_3_VERSION = "3.1.1"
JQUERY_UJS_VERSION = "1.2.2"
end
end
diff --git a/vendor/assets/javascripts/jquery3.js b/vendor/assets/javascripts/jquery3.js
index f2fc2747..072e3081 100644
--- a/vendor/assets/javascripts/jquery3.js
+++ b/vendor/assets/javascripts/jquery3.js
@@ -1,6 +1,5 @@
-/*eslint-disable no-unused-vars*/
/*!
- * jQuery JavaScript Library v3.1.0
+ * jQuery JavaScript Library v3.1.1
* https://jquery.com/
*
* Includes Sizzle.js
@@ -10,7 +9,7 @@
* Released under the MIT license
* https://jquery.org/license
*
- * Date: 2016-07-07T21:44Z
+ * Date: 2016-09-22T22:30Z
*/
( function( global, factory ) {
@@ -83,13 +82,13 @@ var support = {};
doc.head.appendChild( script ).parentNode.removeChild( script );
}
/* global Symbol */
-// Defining this global in .eslintrc would create a danger of using the global
+// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module
var
- version = "3.1.0",
+ version = "3.1.1",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
@@ -129,13 +128,14 @@ jQuery.fn = jQuery.prototype = {
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
- return num != null ?
- // Return just the one element from the set
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+ // Return all the elements in a clean array
+ if ( num == null ) {
+ return slice.call( this );
+ }
- // Return all the elements in a clean array
- slice.call( this );
+ // Return just the one element from the set
+ return num < 0 ? this[ num + this.length ] : this[ num ];
},
// Take an array of elements and push it onto the stack
@@ -543,14 +543,14 @@ function isArrayLike( obj ) {
}
var Sizzle =
/*!
- * Sizzle CSS Selector Engine v2.3.0
+ * Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2016-01-04
+ * Date: 2016-08-08
*/
(function( window ) {
@@ -696,7 +696,7 @@ var i,
// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
+ rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
fcssescape = function( ch, asCodePoint ) {
if ( asCodePoint ) {
@@ -723,7 +723,7 @@ var i,
disabledAncestor = addCombinator(
function( elem ) {
- return elem.disabled === true;
+ return elem.disabled === true && ("form" in elem || "label" in elem);
},
{ dir: "parentNode", next: "legend" }
);
@@ -1009,26 +1009,54 @@ function createButtonPseudo( type ) {
* @param {Boolean} disabled true for :disabled; false for :enabled
*/
function createDisabledPseudo( disabled ) {
- // Known :disabled false positives:
- // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
- // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+
+ // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
return function( elem ) {
- // Check form elements and option elements for explicit disabling
- return "label" in elem && elem.disabled === disabled ||
- "form" in elem && elem.disabled === disabled ||
+ // Only certain elements can match :enabled or :disabled
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
+ if ( "form" in elem ) {
+
+ // Check for inherited disabledness on relevant non-disabled elements:
+ // * listed form-associated elements in a disabled fieldset
+ // https://html.spec.whatwg.org/multipage/forms.html#category-listed
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
+ // * option elements in a disabled optgroup
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
+ // All such elements have a "form" property.
+ if ( elem.parentNode && elem.disabled === false ) {
+
+ // Option elements defer to a parent optgroup if present
+ if ( "label" in elem ) {
+ if ( "label" in elem.parentNode ) {
+ return elem.parentNode.disabled === disabled;
+ } else {
+ return elem.disabled === disabled;
+ }
+ }
+
+ // Support: IE 6 - 11
+ // Use the isDisabled shortcut property to check for disabled fieldset ancestors
+ return elem.isDisabled === disabled ||
- // Check non-disabled form elements for fieldset[disabled] ancestors
- "form" in elem && elem.disabled === false && (
- // Support: IE6-11+
- // Ancestry is covered for us
- elem.isDisabled === disabled ||
+ // Where there is no isDisabled, check manually
+ /* jshint -W018 */
+ elem.isDisabled !== !disabled &&
+ disabledAncestor( elem ) === disabled;
+ }
- // Otherwise, assume any non-