All: Drop support for jQuery 1.7

Closes gh-1923
This commit is contained in:
Michał Gołębiowski-Owczarek 2020-07-22 16:04:47 +02:00 committed by GitHub
parent 086c304218
commit b61b16b5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 17 additions and 28133 deletions

View File

@ -298,15 +298,6 @@ grunt.initConfig( {
"jquery/jquery.js": "jquery-1.x/dist/jquery.js",
"jquery/LICENSE.txt": "jquery-1.x/LICENSE.txt",
"jquery-1.7.0/jquery.js": "jquery-1.7.0/jquery.js",
"jquery-1.7.0/MIT-LICENSE.txt": "jquery-1.7.0/MIT-LICENSE.txt",
"jquery-1.7.1/jquery.js": "jquery-1.7.1/jquery.js",
"jquery-1.7.1/MIT-LICENSE.txt": "jquery-1.7.1/MIT-LICENSE.txt",
"jquery-1.7.2/jquery.js": "jquery-1.7.2/jquery.js",
"jquery-1.7.2/MIT-LICENSE.txt": "jquery-1.7.2/MIT-LICENSE.txt",
"jquery-1.8.0/jquery.js": "jquery-1.8.0/jquery.js",
"jquery-1.8.0/MIT-LICENSE.txt": "jquery-1.8.0/MIT-LICENSE.txt",

View File

@ -22,9 +22,6 @@
"qunit-composite": "JamesMGreene/qunit-composite#v1.1.0",
"requirejs": "2.1.14",
"jquery-1.7.0": "jquery#1.7.0",
"jquery-1.7.1": "jquery#1.7.1",
"jquery-1.7.2": "jquery#1.7.2",
"jquery-1.8.0": "jquery#1.8.0",
"jquery-1.8.1": "jquery#1.8.1",
"jquery-1.8.2": "jquery#1.8.2",

View File

@ -18,8 +18,7 @@ var versions = {
"1.11": "1.11.3",
"1.10": "1.10.2",
"1.9": "1.9.1",
"1.8": "1.8.3",
"1.7": "1.7.2"
"1.8": "1.8.3"
},
tests = {
"Accordion": "accordion/accordion.html",

View File

@ -1,20 +0,0 @@
Copyright (c) 2011 John Resig, http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
Copyright (c) 2011 John Resig, http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
Copyright (c) 2011 John Resig, http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
"test": "grunt"
},
"dependencies": {
"jquery": ">=1.7.0 <4.0.0"
"jquery": ">=1.8.0 <4.0.0"
},
"devDependencies": {
"commitplease": "2.3.0",

View File

@ -20,7 +20,6 @@ QUnit.config.urlConfig.push( {
id: "jquery",
label: "jQuery version",
value: [
"1.7.0", "1.7.1", "1.7.2",
"1.8.0", "1.8.1", "1.8.2", "1.8.3",
"1.9.0", "1.9.1",
"1.10.0", "1.10.1", "1.10.2",

View File

@ -135,7 +135,7 @@ QUnit.test( "keyboard support", function( assert ) {
setTimeout( step2 );
}
// Support: IE 11 with jQuery 1.7 - 1.8 only
// Support: IE 11 with jQuery 1.8 only
// All of the setTimeouts() from keydowns aren't necessary with newer jQuery.
// Only the explicit focus simulations require them.
function step2() {

View File

@ -94,28 +94,25 @@ QUnit.test( "Checkbox creation requires a label, and finds it in all cases", fun
QUnit.test( "Calling checkboxradio on an unsupported element throws an error", function( assert ) {
assert.expect( 2 );
var errorMessage =
"Can't create checkboxradio on element.nodeName=div and element.type=undefined";
var error = new Error( errorMessage );
var error = new Error(
"Can't create checkboxradio on element.nodeName=div and element.type=undefined"
);
assert.raises(
function() {
$( "<div>" ).checkboxradio();
},
// Support: jQuery 1.7.0 only
$.fn.jquery === "1.7" ? errorMessage : error,
error,
"Proper error thrown"
);
errorMessage = "Can't create checkboxradio on element.nodeName=input and element.type=button";
error = new Error( errorMessage );
error = new Error(
"Can't create checkboxradio on element.nodeName=input and element.type=button"
);
assert.raises(
function() {
$( "<input type='button'>" ).checkboxradio();
},
// Support: jQuery 1.7.0 only
$.fn.jquery === "1.7" ? errorMessage : error,
error,
"Proper error thrown"
);
} );
@ -123,15 +120,12 @@ QUnit.test( "Calling checkboxradio on an unsupported element throws an error", f
QUnit.test( "Calling checkboxradio on an input with no label throws an error", function( assert ) {
assert.expect( 1 );
var errorMessage = "No label found for checkboxradio widget";
var error = new Error( errorMessage );
var error = new Error( "No label found for checkboxradio widget" );
assert.raises(
function() {
$( "<input type='checkbox'>" ).checkboxradio();
},
// Support: jQuery 1.7.0 only
$.fn.jquery === "1.7" ? errorMessage : error,
error,
"Proper error thrown"
);
} );

View File

@ -1,7 +1,6 @@
( function() {
var versions = [
"1.7.0", "1.7.1", "1.7.2",
"1.8.0", "1.8.1", "1.8.2", "1.8.3",
"1.9.0", "1.9.1",
"1.10.0", "1.10.1", "1.10.2",

68
ui/jquery-patch.js vendored
View File

@ -1,5 +1,5 @@
/*!
* jQuery UI Support for jQuery core 1.7.x and newer @VERSION
* jQuery UI Support for jQuery core 1.8.x and newer @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@ -8,9 +8,9 @@
*
*/
//>>label: jQuery 1.7 Support
//>>label: jQuery 1.8+ Support
//>>group: Core
//>>description: Support version 1.7.x of jQuery core
//>>description: Support version 1.8.x and newer of jQuery core
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
@ -24,68 +24,6 @@
}
}( function( $ ) {
// Support: jQuery 1.7 only
// Not a great way to check versions, but since we only support 1.7+ and only
// need to detect <1.8, this is a simple check that should suffice. Checking
// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0
// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting
// 1.7 anymore). See #11197 for why we're not using feature detection.
if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
// Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()
// Unlike jQuery Core 1.8+, these only support numeric values to set the
// dimensions in pixels
$.each( [ "Width", "Height" ], function( i, name ) {
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
type = name.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce( elem, size, border, margin ) {
$.each( side, function() {
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
if ( border ) {
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
}
if ( margin ) {
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
}
} );
return size;
}
$.fn[ "inner" + name ] = function( size ) {
if ( size === undefined ) {
return orig[ "inner" + name ].call( this );
}
return this.each( function() {
$( this ).css( type, reduce( this, size ) + "px" );
} );
};
$.fn[ "outer" + name ] = function( size, margin ) {
if ( typeof size !== "number" ) {
return orig[ "outer" + name ].call( this, size );
}
return this.each( function() {
$( this ).css( type, reduce( this, size, true, margin ) + "px" );
} );
};
} );
$.fn.addBack = function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
};
}
// Support: jQuery 1.9.x or older
// $.expr[ ":" ] is deprecated.
if ( !$.expr.pseudos ) {

View File

@ -42,10 +42,7 @@ $.widget( "ui.tooltip", {
"ui-tooltip": "ui-corner-all ui-widget-shadow"
},
content: function() {
// support: IE<9, Opera in jQuery <1.7
// .text() can't accept undefined, so coerce to a string
var title = $( this ).attr( "title" ) || "";
var title = $( this ).attr( "title" );
// Escape title, since we're going from an attribute to raw HTML
return $( "<a>" ).text( title ).html();