From 4bb944ea3f642afcb439aab14ae60c0971b66593 Mon Sep 17 00:00:00 2001 From: Max Kalika Date: Fri, 15 Apr 2016 11:05:18 -0700 Subject: [PATCH] Issue #105: Upgrade jquery to 1.12.3. --- src/main/resources/assets/js/jquery.js | 63 +++++++++++--------------- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/src/main/resources/assets/js/jquery.js b/src/main/resources/assets/js/jquery.js index d888910..5fac9dd 100644 --- a/src/main/resources/assets/js/jquery.js +++ b/src/main/resources/assets/js/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.12.1 + * jQuery JavaScript Library v1.12.3 * http://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * http://jquery.org/license * - * Date: 2016-02-22T19:07Z + * Date: 2016-04-05T19:16Z */ (function( global, factory ) { @@ -65,7 +65,7 @@ var support = {}; var - version = "1.12.1", + version = "1.12.3", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -8198,7 +8198,8 @@ jQuery.fn.delay = function( time, type ) { } )(); -var rreturn = /\r/g; +var rreturn = /\r/g, + rspaces = /[\x20\t\r\n\f]+/g; jQuery.fn.extend( { val: function( value ) { @@ -8278,7 +8279,9 @@ jQuery.extend( { // Support: IE10-11+ // option.text throws exceptions (#14686, #14858) - jQuery.trim( jQuery.text( elem ) ); + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " ); } }, select: { @@ -8332,7 +8335,7 @@ jQuery.extend( { while ( i-- ) { option = options[ i ]; - if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) { + if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { // Support: IE6 // When new option element is added to select box we need to @@ -8751,8 +8754,11 @@ if ( !support.hrefNormalized ) { } // Support: Safari, IE9+ -// mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { @@ -8767,6 +8773,16 @@ if ( !support.optSelected ) { } } return null; + }, + set: function( elem ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } } }; } @@ -10349,13 +10365,6 @@ function createActiveXHR() { -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - // Install script dataType jQuery.ajaxSetup( { accepts: { @@ -10542,21 +10551,6 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { -// Support: Safari 8+ -// In Safari 8 documents created via document.implementation.createHTMLDocument -// collapse sibling forms: the second one becomes a child of the first one. -// Because of that, this security measure has to be disabled in Safari 8. -// https://bugs.webkit.org/show_bug.cgi?id=137337 -support.createHTMLDocument = ( function() { - if ( !document.implementation.createHTMLDocument ) { - return false; - } - var doc = document.implementation.createHTMLDocument( "" ); - doc.body.innerHTML = "
"; - return doc.body.childNodes.length === 2; -} )(); - - // data: string of html // context (optional): If specified, the fragment will be created in this context, // defaults to document @@ -10569,12 +10563,7 @@ jQuery.parseHTML = function( data, context, keepScripts ) { keepScripts = context; context = false; } - - // document.implementation stops scripts or inline event handlers from - // being executed immediately - context = context || ( support.createHTMLDocument ? - document.implementation.createHTMLDocument( "" ) : - document ); + context = context || document; var parsed = rsingleTag.exec( data ), scripts = !keepScripts && []; @@ -10656,7 +10645,7 @@ jQuery.fn.load = function( url, params, callback ) { // If it fails, this function gets "jqXHR", "status", "error" } ).always( callback && function( jqXHR, status ) { self.each( function() { - callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] ); + callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); } ); } ); }