From: Timo Tijhof Date: Fri, 5 May 2017 23:31:25 +0000 (-0700) Subject: jquery.ui: Avoid deprecated jQuery.expr[":"] X-Git-Tag: 1.31.0-rc.0~3323^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22statistiques_visites%22%2C%22%22%29%20.%20%22?a=commitdiff_plain;h=9f3bec98c30695f4753ebdf0319c829ed2879d45;p=lhc%2Fweb%2Fwiklou.git jquery.ui: Avoid deprecated jQuery.expr[":"] Compatible with jQuery 1.11 and 3.x, as jQuery.expr.pseudos was introduced in jQuery 1.8. Note that this is not blocking jQuery 3 (T124742) since it is covered by jQuery Migrate. But fixing this makes the edit page less noisy by default. Change-Id: I7ffbfd2e55aa7dcc31860eb0117b203e63ca7283 --- diff --git a/resources/lib/jquery.ui/PATCHES b/resources/lib/jquery.ui/PATCHES index a8eba943cd..bcff2ac3b1 100644 --- a/resources/lib/jquery.ui/PATCHES +++ b/resources/lib/jquery.ui/PATCHES @@ -1,3 +1,7 @@ +jquery.ui.core.js +* I7ffbfd2e5 Avoid deprecated jQuery.expr[":"]. + + jquery.ui.draggable.js * 71e11de2a3 Fix positioning error with draggable, revert and grid. https://phabricator.wikimedia.org/T140965#2944610 @@ -9,6 +13,10 @@ jquery.ui.datepicker * 19531f3c23 Add translations in de-AT and de-CH +jquery.ui.widget.js +* I7ffbfd2e5 Avoid deprecated jQuery.expr[":"]. + + themes/smoothness/jquery.ui.theme.css * 5e772e39dd Remove dark color from links inside dialogs https://phabricator.wikimedia.org/T85857 diff --git a/resources/lib/jquery.ui/jquery.ui.core.js b/resources/lib/jquery.ui/jquery.ui.core.js index 4ef4b7610b..19f0069e25 100644 --- a/resources/lib/jquery.ui/jquery.ui.core.js +++ b/resources/lib/jquery.ui/jquery.ui.core.js @@ -157,7 +157,7 @@ function visible( element ) { }).length; } -$.extend( $.expr[ ":" ], { +$.extend( $.expr.pseudos, { data: $.expr.createPseudo ? $.expr.createPseudo(function( dataName ) { return function( elem ) { diff --git a/resources/lib/jquery.ui/jquery.ui.widget.js b/resources/lib/jquery.ui/jquery.ui.widget.js index 067476d979..4d84afcf39 100644 --- a/resources/lib/jquery.ui/jquery.ui.widget.js +++ b/resources/lib/jquery.ui/jquery.ui.widget.js @@ -36,7 +36,7 @@ $.widget = function( name, base, prototype ) { } // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); };