Add dependency on mediawiki.toolbar
Follows-up Ibcda91bbb164b0. ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface used to be part of mediawiki.action.edit but is now in its own module. Bug: T86235 Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c
This commit is contained in:
parent
7087d457bb
commit
0fd785b7d9
3
Math.php
3
Math.php
|
@ -496,9 +496,6 @@ $moduleTemplate = array(
|
||||||
|
|
||||||
$wgResourceModules['ext.math.editbutton.enabler'] = array(
|
$wgResourceModules['ext.math.editbutton.enabler'] = array(
|
||||||
'scripts' => 'ext.math.editbutton.js',
|
'scripts' => 'ext.math.editbutton.js',
|
||||||
'dependencies' => array(
|
|
||||||
'mediawiki.action.edit',
|
|
||||||
),
|
|
||||||
'messages' => array(
|
'messages' => array(
|
||||||
'math_tip',
|
'math_tip',
|
||||||
'math_sample',
|
'math_sample',
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
( function ( mw ) {
|
( function ( mw ) {
|
||||||
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
|
if ( mw.toolbar ) {
|
||||||
mw.toolbar.addButton( {
|
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
|
||||||
imageFile: iconPath + 'button_math.png',
|
mw.toolbar.addButton( {
|
||||||
speedTip: mw.msg( 'math_tip' ),
|
imageFile: iconPath + 'button_math.png',
|
||||||
tagOpen: '<math>',
|
speedTip: mw.msg( 'math_tip' ),
|
||||||
tagClose: '</math>',
|
tagOpen: '<math>',
|
||||||
sampleText: mw.msg( 'math_sample' ),
|
tagClose: '</math>',
|
||||||
imageId: 'mw-editbutton-math'
|
sampleText: mw.msg( 'math_sample' ),
|
||||||
} );
|
imageId: 'mw-editbutton-math'
|
||||||
} ( mediaWiki ) );
|
} );
|
||||||
|
}
|
||||||
|
}( mediaWiki ) );
|
||||||
|
|
Loading…
Reference in New Issue