jquery-rails 4.1.1 → 4.3.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jquery-rails might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.travis.yml +6 -3
- data/CHANGELOG.md +38 -0
- data/Gemfile +17 -1
- data/README.md +21 -2
- data/Rakefile +5 -3
- data/VERSIONS.md +8 -0
- data/jquery-rails.gemspec +1 -1
- data/lib/jquery/assert_select.rb +24 -6
- data/lib/jquery/rails/version.rb +5 -4
- data/test/assert_select_jquery_test.rb +22 -0
- data/vendor/assets/javascripts/jquery.js +32 -50
- data/vendor/assets/javascripts/jquery.min.js +5 -5
- data/vendor/assets/javascripts/jquery.min.map +1 -1
- data/vendor/assets/javascripts/jquery2.js +47 -64
- data/vendor/assets/javascripts/jquery2.min.js +4 -4
- data/vendor/assets/javascripts/jquery2.min.map +1 -1
- data/vendor/assets/javascripts/jquery3.js +10588 -0
- data/vendor/assets/javascripts/jquery3.min.js +2 -0
- data/vendor/assets/javascripts/jquery3.min.map +1 -0
- data/vendor/assets/javascripts/jquery_ujs.js +10 -10
- metadata +7 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v2.2.
|
2
|
+
* jQuery JavaScript Library v2.2.4
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Released under the MIT license
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date: 2016-
|
12
|
+
* Date: 2016-05-20T17:23Z
|
13
13
|
*/
|
14
14
|
|
15
15
|
(function( global, factory ) {
|
@@ -65,7 +65,7 @@ var support = {};
|
|
65
65
|
|
66
66
|
|
67
67
|
var
|
68
|
-
version = "2.2.
|
68
|
+
version = "2.2.4",
|
69
69
|
|
70
70
|
// Define a local copy of jQuery
|
71
71
|
jQuery = function( selector, context ) {
|
@@ -276,6 +276,7 @@ jQuery.extend( {
|
|
276
276
|
},
|
277
277
|
|
278
278
|
isPlainObject: function( obj ) {
|
279
|
+
var key;
|
279
280
|
|
280
281
|
// Not plain objects:
|
281
282
|
// - Any object or value whose internal [[Class]] property is not "[object Object]"
|
@@ -285,14 +286,18 @@ jQuery.extend( {
|
|
285
286
|
return false;
|
286
287
|
}
|
287
288
|
|
289
|
+
// Not own constructor property must be Object
|
288
290
|
if ( obj.constructor &&
|
289
|
-
!hasOwn.call( obj
|
291
|
+
!hasOwn.call( obj, "constructor" ) &&
|
292
|
+
!hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
|
290
293
|
return false;
|
291
294
|
}
|
292
295
|
|
293
|
-
//
|
294
|
-
//
|
295
|
-
|
296
|
+
// Own properties are enumerated firstly, so to speed up,
|
297
|
+
// if last one is own, then all properties are own
|
298
|
+
for ( key in obj ) {}
|
299
|
+
|
300
|
+
return key === undefined || hasOwn.call( obj, key );
|
296
301
|
},
|
297
302
|
|
298
303
|
isEmptyObject: function( obj ) {
|
@@ -5001,13 +5006,14 @@ jQuery.Event.prototype = {
|
|
5001
5006
|
isDefaultPrevented: returnFalse,
|
5002
5007
|
isPropagationStopped: returnFalse,
|
5003
5008
|
isImmediatePropagationStopped: returnFalse,
|
5009
|
+
isSimulated: false,
|
5004
5010
|
|
5005
5011
|
preventDefault: function() {
|
5006
5012
|
var e = this.originalEvent;
|
5007
5013
|
|
5008
5014
|
this.isDefaultPrevented = returnTrue;
|
5009
5015
|
|
5010
|
-
if ( e ) {
|
5016
|
+
if ( e && !this.isSimulated ) {
|
5011
5017
|
e.preventDefault();
|
5012
5018
|
}
|
5013
5019
|
},
|
@@ -5016,7 +5022,7 @@ jQuery.Event.prototype = {
|
|
5016
5022
|
|
5017
5023
|
this.isPropagationStopped = returnTrue;
|
5018
5024
|
|
5019
|
-
if ( e ) {
|
5025
|
+
if ( e && !this.isSimulated ) {
|
5020
5026
|
e.stopPropagation();
|
5021
5027
|
}
|
5022
5028
|
},
|
@@ -5025,7 +5031,7 @@ jQuery.Event.prototype = {
|
|
5025
5031
|
|
5026
5032
|
this.isImmediatePropagationStopped = returnTrue;
|
5027
5033
|
|
5028
|
-
if ( e ) {
|
5034
|
+
if ( e && !this.isSimulated ) {
|
5029
5035
|
e.stopImmediatePropagation();
|
5030
5036
|
}
|
5031
5037
|
|
@@ -5956,19 +5962,6 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
5956
5962
|
styles = getStyles( elem ),
|
5957
5963
|
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
5958
5964
|
|
5959
|
-
// Support: IE11 only
|
5960
|
-
// In IE 11 fullscreen elements inside of an iframe have
|
5961
|
-
// 100x too small dimensions (gh-1764).
|
5962
|
-
if ( document.msFullscreenElement && window.top !== window ) {
|
5963
|
-
|
5964
|
-
// Support: IE11 only
|
5965
|
-
// Running getBoundingClientRect on a disconnected node
|
5966
|
-
// in IE throws an error.
|
5967
|
-
if ( elem.getClientRects().length ) {
|
5968
|
-
val = Math.round( elem.getBoundingClientRect()[ name ] * 100 );
|
5969
|
-
}
|
5970
|
-
}
|
5971
|
-
|
5972
5965
|
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
5973
5966
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
5974
5967
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
@@ -7325,6 +7318,12 @@ jQuery.extend( {
|
|
7325
7318
|
}
|
7326
7319
|
} );
|
7327
7320
|
|
7321
|
+
// Support: IE <=11 only
|
7322
|
+
// Accessing the selectedIndex property
|
7323
|
+
// forces the browser to respect setting selected
|
7324
|
+
// on the option
|
7325
|
+
// The getter ensures a default option is selected
|
7326
|
+
// when in an optgroup
|
7328
7327
|
if ( !support.optSelected ) {
|
7329
7328
|
jQuery.propHooks.selected = {
|
7330
7329
|
get: function( elem ) {
|
@@ -7333,6 +7332,16 @@ if ( !support.optSelected ) {
|
|
7333
7332
|
parent.parentNode.selectedIndex;
|
7334
7333
|
}
|
7335
7334
|
return null;
|
7335
|
+
},
|
7336
|
+
set: function( elem ) {
|
7337
|
+
var parent = elem.parentNode;
|
7338
|
+
if ( parent ) {
|
7339
|
+
parent.selectedIndex;
|
7340
|
+
|
7341
|
+
if ( parent.parentNode ) {
|
7342
|
+
parent.parentNode.selectedIndex;
|
7343
|
+
}
|
7344
|
+
}
|
7336
7345
|
}
|
7337
7346
|
};
|
7338
7347
|
}
|
@@ -7527,7 +7536,8 @@ jQuery.fn.extend( {
|
|
7527
7536
|
|
7528
7537
|
|
7529
7538
|
|
7530
|
-
var rreturn = /\r/g
|
7539
|
+
var rreturn = /\r/g,
|
7540
|
+
rspaces = /[\x20\t\r\n\f]+/g;
|
7531
7541
|
|
7532
7542
|
jQuery.fn.extend( {
|
7533
7543
|
val: function( value ) {
|
@@ -7603,9 +7613,15 @@ jQuery.extend( {
|
|
7603
7613
|
option: {
|
7604
7614
|
get: function( elem ) {
|
7605
7615
|
|
7606
|
-
|
7607
|
-
|
7608
|
-
|
7616
|
+
var val = jQuery.find.attr( elem, "value" );
|
7617
|
+
return val != null ?
|
7618
|
+
val :
|
7619
|
+
|
7620
|
+
// Support: IE10-11+
|
7621
|
+
// option.text throws exceptions (#14686, #14858)
|
7622
|
+
// Strip and collapse whitespace
|
7623
|
+
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
7624
|
+
jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
|
7609
7625
|
}
|
7610
7626
|
},
|
7611
7627
|
select: {
|
@@ -7658,7 +7674,7 @@ jQuery.extend( {
|
|
7658
7674
|
while ( i-- ) {
|
7659
7675
|
option = options[ i ];
|
7660
7676
|
if ( option.selected =
|
7661
|
-
|
7677
|
+
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
7662
7678
|
) {
|
7663
7679
|
optionSet = true;
|
7664
7680
|
}
|
@@ -7836,6 +7852,7 @@ jQuery.extend( jQuery.event, {
|
|
7836
7852
|
},
|
7837
7853
|
|
7838
7854
|
// Piggyback on a donor event to simulate a different one
|
7855
|
+
// Used only for `focus(in | out)` events
|
7839
7856
|
simulate: function( type, elem, event ) {
|
7840
7857
|
var e = jQuery.extend(
|
7841
7858
|
new jQuery.Event(),
|
@@ -7843,27 +7860,10 @@ jQuery.extend( jQuery.event, {
|
|
7843
7860
|
{
|
7844
7861
|
type: type,
|
7845
7862
|
isSimulated: true
|
7846
|
-
|
7847
|
-
// Previously, `originalEvent: {}` was set here, so stopPropagation call
|
7848
|
-
// would not be triggered on donor event, since in our own
|
7849
|
-
// jQuery.event.stopPropagation function we had a check for existence of
|
7850
|
-
// originalEvent.stopPropagation method, so, consequently it would be a noop.
|
7851
|
-
//
|
7852
|
-
// But now, this "simulate" function is used only for events
|
7853
|
-
// for which stopPropagation() is noop, so there is no need for that anymore.
|
7854
|
-
//
|
7855
|
-
// For the 1.x branch though, guard for "click" and "submit"
|
7856
|
-
// events is still used, but was moved to jQuery.event.stopPropagation function
|
7857
|
-
// because `originalEvent` should point to the original event for the constancy
|
7858
|
-
// with other events and for more focused logic
|
7859
7863
|
}
|
7860
7864
|
);
|
7861
7865
|
|
7862
7866
|
jQuery.event.trigger( e, null, elem );
|
7863
|
-
|
7864
|
-
if ( e.isDefaultPrevented() ) {
|
7865
|
-
event.preventDefault();
|
7866
|
-
}
|
7867
7867
|
}
|
7868
7868
|
|
7869
7869
|
} );
|
@@ -9353,18 +9353,6 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|
9353
9353
|
|
9354
9354
|
|
9355
9355
|
|
9356
|
-
// Support: Safari 8+
|
9357
|
-
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
9358
|
-
// collapse sibling forms: the second one becomes a child of the first one.
|
9359
|
-
// Because of that, this security measure has to be disabled in Safari 8.
|
9360
|
-
// https://bugs.webkit.org/show_bug.cgi?id=137337
|
9361
|
-
support.createHTMLDocument = ( function() {
|
9362
|
-
var body = document.implementation.createHTMLDocument( "" ).body;
|
9363
|
-
body.innerHTML = "<form></form><form></form>";
|
9364
|
-
return body.childNodes.length === 2;
|
9365
|
-
} )();
|
9366
|
-
|
9367
|
-
|
9368
9356
|
// Argument "data" should be string of html
|
9369
9357
|
// context (optional): If specified, the fragment will be created in this context,
|
9370
9358
|
// defaults to document
|
@@ -9377,12 +9365,7 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
|
9377
9365
|
keepScripts = context;
|
9378
9366
|
context = false;
|
9379
9367
|
}
|
9380
|
-
|
9381
|
-
// Stop scripts or inline event handlers from being executed immediately
|
9382
|
-
// by using document.implementation
|
9383
|
-
context = context || ( support.createHTMLDocument ?
|
9384
|
-
document.implementation.createHTMLDocument( "" ) :
|
9385
|
-
document );
|
9368
|
+
context = context || document;
|
9386
9369
|
|
9387
9370
|
var parsed = rsingleTag.exec( data ),
|
9388
9371
|
scripts = !keepScripts && [];
|
@@ -9464,7 +9447,7 @@ jQuery.fn.load = function( url, params, callback ) {
|
|
9464
9447
|
// If it fails, this function gets "jqXHR", "status", "error"
|
9465
9448
|
} ).always( callback && function( jqXHR, status ) {
|
9466
9449
|
self.each( function() {
|
9467
|
-
callback.apply(
|
9450
|
+
callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
|
9468
9451
|
} );
|
9469
9452
|
} );
|
9470
9453
|
}
|