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(
'scripts' => 'ext.math.editbutton.js',
'dependencies' => array(
'mediawiki.action.edit',
),
'messages' => array(
'math_tip',
'math_sample',

View File

@ -1,13 +1,11 @@
( function ( mw ) {
if ( mw.toolbar ) {
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
mw.toolbar.addButton( {
imageFile: iconPath + 'button_math.png',
speedTip: mw.msg( 'math_tip' ),
tagOpen: '<math>',
tagClose: '</math>',
sampleText: mw.msg( 'math_sample' ),
imageId: 'mw-editbutton-math'
} );
}
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
mw.toolbar.addButton( {
imageFile: iconPath + 'button_math.png',
speedTip: mw.msg( 'math_tip' ),
tagOpen: '<math>',
tagClose: '</math>',
sampleText: mw.msg( 'math_sample' ),
imageId: 'mw-editbutton-math'
} );
} ( mediaWiki ) );