mediawiki-extensions-WikiEd.../modules/ext.wikiEditor.dialogs.js
Timo Tijhof 7769baa56e Replace deprecated jQuery bind() and size()
> JQMIGRATE: jQuery.fn.bind() is deprecated
> JQMIGRATE: jQuery.fn.size() is deprecated; use the .length property

Note that bind() is not removed in v3, merely deprecated.
Even after the jQuery Migrate phase, it will continue to work.

size() was removed in v3 and works only during the Migrate phase.

https://api.jquery.com/size/
https://api.jquery.com/bind/
https://jquery.com/upgrade-guide/3.0/

Bug: T124742
Change-Id: I6bbd8f829ecf987228c6a5abd32c84e4e088a9bd
2016-11-21 18:23:50 -08:00

15 lines
374 B
JavaScript

/*
* JavaScript for WikiEditor Dialogs
*/
jQuery( function ( $ ) {
if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) {
return;
}
// Replace icons
$.wikiEditor.modules.dialogs.config.replaceIcons( $( '#wpTextbox1' ) );
// Add dialogs module
$( '#wpTextbox1' ).wikiEditor( 'addModule', $.wikiEditor.modules.dialogs.config.getDefaultConfig() );
} );