Merge "Add dependency for math edit button"

This commit is contained in:
jenkins-bot 2014-04-07 21:26:50 +00:00 committed by Gerrit Code Review
commit c782b62261
2 changed files with 12 additions and 11 deletions

View File

@ -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',

View File

@ -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 ) );