mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
ve.init.MWWelcomeDialog: Don't mess with the actions dynamically
This removes an "ew" comment, which I presume indicates a hack. Change-Id: I57dfb173d5f37466686f3f9dd9c97a5e7d685199
This commit is contained in:
parent
3dfd203d1b
commit
adffe3788c
|
@ -51,7 +51,7 @@ mw.libs.ve.WelcomeDialog.static.actions = [
|
|||
action: 'accept',
|
||||
label: OO.ui.deferMsg( 'visualeditor-welcomedialog-action' ),
|
||||
flags: [ 'progressive', 'primary' ],
|
||||
modes: [ 've', 'wte' ]
|
||||
modes: [ 've', 'wte', 'noswitch' ]
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -84,12 +84,7 @@ mw.libs.ve.WelcomeDialog.prototype.getSetupProcess = function ( data ) {
|
|||
* @inheritdoc
|
||||
*/
|
||||
mw.libs.ve.WelcomeDialog.prototype.getReadyProcess = function () {
|
||||
if ( !this.switchable ) {
|
||||
// ew
|
||||
this.actions.remove( this.actions.get( { actions: 'switch-wte' } ) );
|
||||
this.actions.remove( this.actions.get( { actions: 'switch-ve' } ) );
|
||||
}
|
||||
this.actions.setMode( this.editor );
|
||||
this.actions.setMode( this.switchable ? this.editor : 'noswitch' );
|
||||
|
||||
return mw.libs.ve.WelcomeDialog.super.prototype.getReadyProcess.apply( this, arguments );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue