Add dependency for math edit button
Declare that ext.math.editbutton.enabler depends on mediawiki.action.edit. Follow up to: I3d126c1c252c27fa65ab8fb42ffab66a2d99cfa8 Bug: 60471 Change-Id: Ibcda91bbb164b0b896d4c3f5f7c2c6ea6658468e
This commit is contained in:
parent
c787eb34e7
commit
23f94d5b6a
3
Math.php
3
Math.php
|
@ -422,6 +422,9 @@ $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,13 +1,11 @@
|
||||||
( function ( mw ) {
|
( function ( mw ) {
|
||||||
if ( mw.toolbar ) {
|
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
|
||||||
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
|
mw.toolbar.addButton( {
|
||||||
mw.toolbar.addButton( {
|
imageFile: iconPath + 'button_math.png',
|
||||||
imageFile: iconPath + 'button_math.png',
|
speedTip: mw.msg( 'math_tip' ),
|
||||||
speedTip: mw.msg( 'math_tip' ),
|
tagOpen: '<math>',
|
||||||
tagOpen: '<math>',
|
tagClose: '</math>',
|
||||||
tagClose: '</math>',
|
sampleText: mw.msg( 'math_sample' ),
|
||||||
sampleText: mw.msg( 'math_sample' ),
|
imageId: 'mw-editbutton-math'
|
||||||
imageId: 'mw-editbutton-math'
|
} );
|
||||||
} );
|
|
||||||
}
|
|
||||||
} ( mediaWiki ) );
|
} ( mediaWiki ) );
|
||||||
|
|
Loading…
Reference in New Issue