aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-07-22 16:04:47 +0200
committerGitHub <noreply@github.com>2020-07-22 16:04:47 +0200
commitb61b16b5a89ee27b30efdf7635d897af810af130 (patch)
treed2fc081ab5465ac1cd8e12072e92e9245dda8b08 /ui
parent086c304218b0f6e24e8f9ea7d76c75d192977abd (diff)
downloadjquery-ui-b61b16b5a89ee27b30efdf7635d897af810af130.tar.gz
jquery-ui-b61b16b5a89ee27b30efdf7635d897af810af130.zip
All: Drop support for jQuery 1.7
Closes gh-1923
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery-patch.js68
-rw-r--r--ui/widgets/tooltip.js5
2 files changed, 4 insertions, 69 deletions
diff --git a/ui/jquery-patch.js b/ui/jquery-patch.js
index 3d0870f7c..4d939535e 100644
--- a/ui/jquery-patch.js
+++ b/ui/jquery-patch.js
@@ -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 ) {
diff --git a/ui/widgets/tooltip.js b/ui/widgets/tooltip.js
index 106485269..cd031ceb2 100644
--- a/ui/widgets/tooltip.js
+++ b/ui/widgets/tooltip.js
@@ -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();