X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.contributions.js;h=fb81dd8c5a48217b04e5a7f3b3d2114235266b49;hb=e53ea4b24790b4b313e34241b34d0be4457064d9;hp=6558bda513343b900d6228aba4421e239c0a5bc6;hpb=f506a05aaa035b96537b33244b0f18b093048e97;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special.contributions.js b/resources/src/mediawiki.special.contributions.js index 6558bda513..fb81dd8c5a 100644 --- a/resources/src/mediawiki.special.contributions.js +++ b/resources/src/mediawiki.special.contributions.js @@ -1,4 +1,4 @@ -( function ( mw, $ ) { +( function () { // Return a promise that is resolved when the element is blurred (loses focus). // If it already is blurred, resolved immediately. @@ -20,10 +20,10 @@ // 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 ) { @@ -35,4 +35,4 @@ } ); } ); -}( mediaWiki, jQuery ) ); +}() );