Avoid deprecated OO.ui.infuse( id )
authorEd Sanders <esanders@wikimedia.org>
Mon, 10 Dec 2018 19:49:41 +0000 (19:49 +0000)
committerEd Sanders <esanders@wikimedia.org>
Mon, 10 Dec 2018 20:09:11 +0000 (20:09 +0000)
Bug: T211154
Change-Id: Ib5fdaaa662d8c7d85e7fd3ca1007bf5b8e82e738

resources/src/mediawiki.special.contributions.js
resources/src/mediawiki.special.pageLanguage.js
resources/src/mediawiki.special.search/search.js

index 275e96a..fb81dd8 100644 (file)
                // date picker is open will cause the date picker to remain visible (but non-functional), but
                // not replacing the interface while the user is working with it is probably a good idea anyway.
                startReady = whenBlurred( $( '#mw-date-start .oo-ui-inputWidget-input' ) ).then( function () {
-                       return mw.widgets.DateInputWidget.static.infuse( 'mw-date-start' );
+                       return mw.widgets.DateInputWidget.static.infuse( $( '#mw-date-start' ) );
                } );
                endReady = whenBlurred( $( '#mw-date-end .oo-ui-inputWidget-input' ) ).then( function () {
-                       return mw.widgets.DateInputWidget.static.infuse( 'mw-date-end' );
+                       return mw.widgets.DateInputWidget.static.infuse( $( '#mw-date-end' ) );
                } );
 
                $.when( startReady, endReady ).then( function ( startInput, endInput ) {
index 589182a..8b70e1f 100644 (file)
@@ -4,8 +4,8 @@
 ( function () {
        $( function () {
                // Select the 'Language select' option if user is trying to select language
-               OO.ui.infuse( 'mw-pl-languageselector' ).on( 'change', function () {
-                       OO.ui.infuse( 'mw-pl-options' ).setValue( '2' );
+               OO.ui.infuse( $( '#mw-pl-languageselector' ) ).on( 'change', function () {
+                       OO.ui.infuse( $( '#mw-pl-options' ) ).setValue( '2' );
                } );
        } );
 }() );
index f0bc495..03ba0d2 100644 (file)
@@ -33,7 +33,7 @@
 
                // Change the header search links to what user entered
                $headerLinks = $( '.search-types a' );
-               searchWidget = OO.ui.infuse( 'searchText' );
+               searchWidget = OO.ui.infuse( $( '#searchText' ) );
                updateHeaderLinks = function ( value ) {
                        $headerLinks.each( function () {
                                var parts = $( this ).attr( 'href' ).split( 'search=' ),