jquery.ui: Avoid deprecated jQuery.expr[":"]
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 5 May 2017 23:31:25 +0000 (16:31 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 5 May 2017 23:39:16 +0000 (16:39 -0700)
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

resources/lib/jquery.ui/PATCHES
resources/lib/jquery.ui/jquery.ui.core.js
resources/lib/jquery.ui/jquery.ui.widget.js

index a8eba94..bcff2ac 100644 (file)
@@ -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
index 4ef4b76..19f0069 100644 (file)
@@ -157,7 +157,7 @@ function visible( element ) {
                }).length;
 }
 
-$.extend( $.expr[ ":" ], {
+$.extend( $.expr.pseudos, {
        data: $.expr.createPseudo ?
                $.expr.createPseudo(function( dataName ) {
                        return function( elem ) {
index 067476d..4d84afc 100644 (file)
@@ -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 );
        };