was removed.
* A user_password_expires column has been added to the user table. The User
object expects this column to exist. Use update.php to create this new field.
+* The jquery.delayedBind ResourceLoader module was deprecated in favor of the
+ jquery.throttle-debounce module. It will be removed in MediaWiki 1.24.
==== Removed classes ====
* FakeMemCachedClient (deprecated in 1.18)
'vector/vector.js',
),
'position' => 'top',
- 'dependencies' => 'jquery.delayedBind',
+ 'dependencies' => 'jquery.throttle-debounce',
'remoteBasePath' => $GLOBALS['wgStylePath'],
'localBasePath' => $GLOBALS['wgStyleDirectory'],
),
),
'jquery.expandableField' => array(
'scripts' => 'resources/jquery/jquery.expandableField.js',
- 'dependencies' => 'jquery.delayedBind',
),
'jquery.farbtastic' => array(
'scripts' => 'resources/jquery/jquery.farbtastic.js',
-( function ( $ ) {
+( function ( mw, $ ) {
/**
* Function that escapes spaces in event names. This is needed because
* "_delayedBind-foo bar-1000" refers to two events
}
} );
-}( jQuery ) );
+mw.log.deprecate( $.fn, 'delayedBind', $.fn.delayedBind,
+ 'Use the jquery.throttle-debounce module instead' );
+mw.log.deprecate( $.fn, 'delayedBindCancel', $.fn.delayedBindCancel,
+ 'Use the jquery.throttle-debounce module instead' );
+mw.log.deprecate( $.fn, 'delayedBindUnbind', $.fn.delayedBindUnbind,
+ 'Use the jquery.throttle-debounce module instead' );
+
+}( mediaWiki, jQuery ) );
args = arguments;
$( this ).each( function () {
- var key, context;
+ var key, context, timeout;
/* Construction / Loading */
$( this )
.addClass( 'expandableField' )
.focus( function ( e ) {
+ clearTimeout( timeout );
$.expandableField.expandField( e, context );
} )
- .delayedBind( 250, 'blur', function ( e ) {
- $.expandableField.condenseField( e, context );
+ .blur( function ( e ) {
+ timeout = setTimeout( function () {
+ $.expandableField.condenseField( e, context );
+ }, 250 );
} );
}
// Store the context for next time
} );
} );
- // if we haven't already bound our resize hanlder, bind it now
+ // if we haven't already bound our resize handler, bind it now
if ( !$.collapsibleTabs.boundEvent ) {
- $( window )
- .delayedBind( 500, 'resize', function () {
- $.collapsibleTabs.handleResize();
- } );
+ $( window ).on( 'resize', $.debounce( 500, function () {
+ $.collapsibleTabs.handleResize();
+ } ) );
+ $.collapsibleTabs.boundEvent = true;
}
+
// call our resize handler to setup the page
$.collapsibleTabs.handleResize();
return this;
}
return $settings;
},
- /**
- * @param {jQuery.Event} e
- */
handleResize: function () {
$.collapsibleTabs.instances.each( function () {
var $el = $( this ),