From 7b7b21d328f78e048552952f58e7208c659f2381 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 9 Jun 2015 09:14:42 +0200 Subject: Upgrade jquery-migrate to 1.2.1 --- core/js/core.json | 2 +- core/vendor/.gitignore | 2 +- core/vendor/jquery-migrate/.bower.json | 15 + core/vendor/jquery-migrate/component.json | 4 + core/vendor/jquery-migrate/jquery-migrate.js | 521 +++++++++++++++++++++++ core/vendor/jquery-migrate/jquery-migrate.min.js | 2 + core/vendor/jquery/jquery-migrate.js | 511 ---------------------- core/vendor/jquery/jquery-migrate.min.js | 3 - 8 files changed, 544 insertions(+), 516 deletions(-) create mode 100644 core/vendor/jquery-migrate/.bower.json create mode 100644 core/vendor/jquery-migrate/component.json create mode 100644 core/vendor/jquery-migrate/jquery-migrate.js create mode 100644 core/vendor/jquery-migrate/jquery-migrate.min.js delete mode 100644 core/vendor/jquery/jquery-migrate.js delete mode 100644 core/vendor/jquery/jquery-migrate.min.js (limited to 'core') diff --git a/core/js/core.json b/core/js/core.json index f57061a2c81..90bc318b237 100644 --- a/core/js/core.json +++ b/core/js/core.json @@ -1,7 +1,7 @@ { "vendor": [ "jquery/jquery.min.js", - "jquery/jquery-migrate.min.js", + "jquery-migrate/jquery-migrate.min.js", "jquery-ui/ui/jquery-ui.custom.js", "underscore/underscore.js", "moment/min/moment-with-locales.js", diff --git a/core/vendor/.gitignore b/core/vendor/.gitignore index 0d2ad861dee..14b80df5065 100644 --- a/core/vendor/.gitignore +++ b/core/vendor/.gitignore @@ -35,7 +35,7 @@ moment/scripts # jquery jquery/** !jquery/.bower.json -!jquery/jquery* +!jquery/jquery.* !jquery/MIT-LICENSE.txt # jquery-ui diff --git a/core/vendor/jquery-migrate/.bower.json b/core/vendor/jquery-migrate/.bower.json new file mode 100644 index 00000000000..35e7bf5f43f --- /dev/null +++ b/core/vendor/jquery-migrate/.bower.json @@ -0,0 +1,15 @@ +{ + "name": "jquery-migrate", + "version": "1.2.1", + "homepage": "https://github.com/appleboy/jquery-migrate", + "_release": "1.2.1", + "_resolution": { + "type": "version", + "tag": "1.2.1", + "commit": "65f37b60ae3d305efbe1e85909e14c60d524d12a" + }, + "_source": "git://github.com/appleboy/jquery-migrate.git", + "_target": "~1.2.1", + "_originalSource": "jquery-migrate", + "_direct": true +} \ No newline at end of file diff --git a/core/vendor/jquery-migrate/component.json b/core/vendor/jquery-migrate/component.json new file mode 100644 index 00000000000..11efdc01650 --- /dev/null +++ b/core/vendor/jquery-migrate/component.json @@ -0,0 +1,4 @@ +{ + "name" : "jquery-migrate", + "version" : "1.2.1" +} diff --git a/core/vendor/jquery-migrate/jquery-migrate.js b/core/vendor/jquery-migrate/jquery-migrate.js new file mode 100644 index 00000000000..dbe8cbd4d8c --- /dev/null +++ b/core/vendor/jquery-migrate/jquery-migrate.js @@ -0,0 +1,521 @@ +/*! + * jQuery Migrate - v1.2.1 - 2013-05-08 + * https://github.com/jquery/jquery-migrate + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT + */ +(function( jQuery, window, undefined ) { +// See http://bugs.jquery.com/ticket/13335 +// "use strict"; + + +var warnedAbout = {}; + +// List of warnings already given; public read only +jQuery.migrateWarnings = []; + +// Set to true to prevent console output; migrateWarnings still maintained +// jQuery.migrateMute = false; + +// Show a message on the console so devs know we're active +if ( !jQuery.migrateMute && window.console && window.console.log ) { + window.console.log("JQMIGRATE: Logging is active"); +} + +// Set to false to disable traces that appear with warnings +if ( jQuery.migrateTrace === undefined ) { + jQuery.migrateTrace = true; +} + +// Forget any warnings we've already given; public +jQuery.migrateReset = function() { + warnedAbout = {}; + jQuery.migrateWarnings.length = 0; +}; + +function migrateWarn( msg) { + var console = window.console; + if ( !warnedAbout[ msg ] ) { + warnedAbout[ msg ] = true; + jQuery.migrateWarnings.push( msg ); + if ( console && console.warn && !jQuery.migrateMute ) { + console.warn( "JQMIGRATE: " + msg ); + if ( jQuery.migrateTrace && console.trace ) { + console.trace(); + } + } + } +} + +function migrateWarnProp( obj, prop, value, msg ) { + if ( Object.defineProperty ) { + // On ES5 browsers (non-oldIE), warn if the code tries to get prop; + // allow property to be overwritten in case some other plugin wants it + try { + Object.defineProperty( obj, prop, { + configurable: true, + enumerable: true, + get: function() { + migrateWarn( msg ); + return value; + }, + set: function( newValue ) { + migrateWarn( msg ); + value = newValue; + } + }); + return; + } catch( err ) { + // IE8 is a dope about Object.defineProperty, can't warn there + } + } + + // Non-ES5 (or broken) browser; just set the property + jQuery._definePropertyBroken = true; + obj[ prop ] = value; +} + +if ( document.compatMode === "BackCompat" ) { + // jQuery has never supported or tested Quirks Mode + migrateWarn( "jQuery is not compatible with Quirks Mode" ); +} + + +var attrFn = jQuery( "", { size: 1 } ).attr("size") && jQuery.attrFn, + oldAttr = jQuery.attr, + valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || + function() { return null; }, + valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || + function() { return undefined; }, + rnoType = /^(?:input|button)$/i, + rnoAttrNodeType = /^[238]$/, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + ruseDefault = /^(?:checked|selected)$/i; + +// jQuery.attrFn +migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); + +jQuery.attr = function( elem, name, value, pass ) { + var lowerName = name.toLowerCase(), + nType = elem && elem.nodeType; + + if ( pass ) { + // Since pass is used internally, we only warn for new jQuery + // versions where there isn't a pass arg in the formal params + if ( oldAttr.length < 4 ) { + migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); + } + if ( elem && !rnoAttrNodeType.test( nType ) && + (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { + return jQuery( elem )[ name ]( value ); + } + } + + // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking + // for disconnected elements we don't warn on $( "