// 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 ) {
( 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' );
} );
} );
}() );
// 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=' ),